Commit 621487a7 authored by 李维's avatar 李维

修改文件名 适配新的发布流水线

parent 29e1963b
{"frameRate":24,"name":"苹果","version":"5.5","compatibleVersion":"5.5","armature":[{"type":"Armature","frameRate":24,"name":"Armature","aabb":{"x":-1246,"y":-903,"width":799,"height":565},"bone":[{"name":"root"},{"length":97,"name":"Apple_02","parent":"root","transform":{"x":-1109.05,"y":-858.75,"skX":81.8908,"skY":81.8908}},{"length":107,"name":"Apple_021","parent":"root","transform":{"x":-658.05,"y":-883.05,"skX":80.3575,"skY":80.3575}},{"length":102,"name":"Apple_022","parent":"root","transform":{"x":-887.25,"y":-720.35,"skX":81.6959,"skY":81.6959}},{"length":105,"name":"Apple_023","parent":"root","transform":{"x":-576.7,"y":-566.15,"skX":80.8178,"skY":80.8178}},{"length":101,"name":"Apple_024","parent":"root","transform":{"x":-1034.05,"y":-462.65,"skX":81.0523,"skY":81.0523}}],"slot":[{"name":"Apple_01","parent":"Apple_02"},{"name":"Apple_02","parent":"Apple_021"},{"name":"Apple_03","parent":"Apple_022"},{"name":"Apple_04","parent":"Apple_024"},{"name":"Apple_05","parent":"Apple_023"}],"skin":[{"slot":[{"name":"Apple_04","display":[{"name":"五个苹果左右晃动三次/Apple_04","transform":{"x":-113.39,"y":-185.44,"skX":-81.05,"skY":-81.05}}]},{"name":"Apple_05","display":[{"name":"五个苹果左右晃动三次/Apple_05","transform":{"x":-81.41,"y":260.14,"skX":-80.82,"skY":-80.82}}]},{"name":"Apple_01","display":[{"name":"五个苹果左右晃动三次/Apple_01","transform":{"x":259.34,"y":-194.92,"skX":-81.89,"skY":-81.89}}]},{"name":"Apple_02","display":[{"name":"五个苹果左右晃动三次/Apple_02","transform":{"x":216.34,"y":282.17,"skX":-80.36,"skY":-80.36}}]},{"name":"Apple_03","display":[{"name":"五个苹果左右晃动三次/Apple_03","transform":{"x":111.86,"y":-12.73,"skX":-81.7,"skY":-81.7}}]}]}],"animation":[{"duration":120,"playTimes":0,"name":"normal","bone":[{"name":"Apple_02","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-16.02},{"duration":72}]},{"name":"Apple_021","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-16.02},{"duration":72}]},{"name":"Apple_022","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-16.02},{"duration":72}]},{"name":"Apple_023","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-16.02},{"duration":72}]},{"name":"Apple_024","rotateFrame":[{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-16.02},{"duration":72}]}]},{"duration":40,"playTimes":0,"name":"enlarge","bone":[{"name":"Apple_02","rotateFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8}],"scaleFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.72,"y":1.72},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":1.49,"y":1.49},{"duration":8}]},{"name":"Apple_021","rotateFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8}],"scaleFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.5,"y":1.5},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":1.52,"y":1.52},{"duration":8}]},{"name":"Apple_022","rotateFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8}],"scaleFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.52,"y":1.52},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":1.43,"y":1.43},{"duration":8}]},{"name":"Apple_023","rotateFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8}],"scaleFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.45,"y":1.45},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":1.31,"y":1.31},{"duration":8}]},{"name":"Apple_024","rotateFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"rotate":-15.29},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"rotate":-17.58},{"duration":8}],"scaleFrame":[{"duration":9,"tweenEasing":0},{"duration":7,"tweenEasing":0,"x":1.39,"y":1.39},{"duration":8,"tweenEasing":0},{"duration":8,"tweenEasing":0,"x":1.42,"y":1.42},{"duration":8}]}]}],"defaultActions":[{"gotoAndPlay":"normal"}],"canvas":{"width":2492,"height":3308}}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "ff020f6d-a4b6-4baf-bcad-94ae605c2977",
"subMetas": {}
}
\ No newline at end of file
{"name":"苹果","imagePath":"苹果_tex.png","SubTexture":[{"name":"五个苹果左右晃动三次/Apple_01","x":1,"height":427,"frameY":0,"y":1068,"frameHeight":547,"frameX":-24,"frameWidth":733,"width":709},{"name":"五个苹果左右晃动三次/Apple_02","x":685,"height":185,"frameY":0,"y":1497,"frameHeight":561,"frameX":-491,"frameWidth":692,"width":201},{"name":"五个苹果左右晃动三次/Apple_03","x":1,"height":427,"frameY":0,"y":1497,"frameHeight":505,"frameX":-93,"frameWidth":775,"width":682},{"name":"五个苹果左右晃动三次/Apple_04","x":1,"height":531,"frameY":0,"y":535,"frameHeight":531,"frameX":-98,"frameWidth":755,"width":657},{"name":"五个苹果左右晃动三次/Apple_05","x":1,"height":532,"frameY":0,"y":1,"frameHeight":532,"frameX":-112,"frameWidth":799,"width":687}],"height":2048,"width":1024}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "ac49bcc0-d84e-4dd4-a8e3-7d81d1885337",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "be757ae8-da77-4a47-82c1-cbd9d66dce16",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1024,
"height": 2048,
"platformSettings": {},
"subMetas": {
"苹果_tex": {
"ver": "1.0.4",
"uuid": "0ba60b3b-8638-409b-945e-9669d281d014",
"rawTextureUuid": "be757ae8-da77-4a47-82c1-cbd9d66dce16",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -68.5,
"offsetY": 61.5,
"trimX": 1,
"trimY": 1,
"width": 885,
"height": 1923,
"rawWidth": 1024,
"rawHeight": 2048,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"__type__": "cc.SpriteFrame",
"content": {
"name": "苹果_tex",
"texture": "be757ae8-da77-4a47-82c1-cbd9d66dce16",
"atlas": "",
"rect": [
1,
1,
885,
1923
],
"offset": [
-68.5,
61.5
],
"originalSize": [
1024,
2048
],
"capInsets": [
0,
0,
0,
0
]
}
}
\ No newline at end of file
"use strict"; "use strict";
cc._RF.push(module, '6acefvFAO9O7qvqEFnz5PJj', 'state'); cc._RF.push(module, '6acefvFAO9O7qvqEFnz5PJj', 'state_OP15');
// OP15/script/state.js // OP15/script/state_OP15.js
"use strict"; "use strict";
......
{
"__type__": "dragonBones.DragonBonesAtlasAsset",
"_name": "苹果_tex",
"_objFlags": 0,
"_native": "",
"_atlasJson": "{\"name\":\"苹果\",\"imagePath\":\"苹果_tex.png\",\"SubTexture\":[{\"name\":\"五个苹果左右晃动三次/Apple_01\",\"x\":1,\"height\":427,\"frameY\":0,\"y\":1068,\"frameHeight\":547,\"frameX\":-24,\"frameWidth\":733,\"width\":709},{\"name\":\"五个苹果左右晃动三次/Apple_02\",\"x\":685,\"height\":185,\"frameY\":0,\"y\":1497,\"frameHeight\":561,\"frameX\":-491,\"frameWidth\":692,\"width\":201},{\"name\":\"五个苹果左右晃动三次/Apple_03\",\"x\":1,\"height\":427,\"frameY\":0,\"y\":1497,\"frameHeight\":505,\"frameX\":-93,\"frameWidth\":775,\"width\":682},{\"name\":\"五个苹果左右晃动三次/Apple_04\",\"x\":1,\"height\":531,\"frameY\":0,\"y\":535,\"frameHeight\":531,\"frameX\":-98,\"frameWidth\":755,\"width\":657},{\"name\":\"五个苹果左右晃动三次/Apple_05\",\"x\":1,\"height\":532,\"frameY\":0,\"y\":1,\"frameHeight\":532,\"frameX\":-112,\"frameWidth\":799,\"width\":687}],\"height\":2048,\"width\":1024}",
"_texture": {
"__uuid__": "be757ae8-da77-4a47-82c1-cbd9d66dce16"
},
"texture": {
"__uuid__": "be757ae8-da77-4a47-82c1-cbd9d66dce16"
},
"_textureAtlasData": null
}
\ No newline at end of file
"use strict"; "use strict";
cc._RF.push(module, 'ade7a9A1W1Ah7vGKIj+9VNT', 'util'); cc._RF.push(module, 'ade7a9A1W1Ah7vGKIj+9VNT', 'util_OP15');
// OP15/script/util.js // OP15/script/util_OP15.js
"use strict"; "use strict";
......
{
"__type__": "cc.Texture2D",
"content": "0,9729,9729,33071,33071,0,0,1"
}
\ No newline at end of file
"use strict"; "use strict";
cc._RF.push(module, 'ccc6ebxJZFI24GNYY/uty5V', 'xstate'); cc._RF.push(module, 'ccc6ebxJZFI24GNYY/uty5V', 'xstate_OP15');
// OP15/script/xstate.js // OP15/script/xstate_OP15.js
"use strict"; "use strict";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"__type__": "dragonBones.DragonBonesAsset",
"_name": "苹果_ske",
"_objFlags": 0,
"_native": "",
"_dragonBonesJson": "{\"frameRate\":24,\"name\":\"苹果\",\"version\":\"5.5\",\"compatibleVersion\":\"5.5\",\"armature\":[{\"type\":\"Armature\",\"frameRate\":24,\"name\":\"Armature\",\"aabb\":{\"x\":-1246,\"y\":-903,\"width\":799,\"height\":565},\"bone\":[{\"name\":\"root\"},{\"length\":97,\"name\":\"Apple_02\",\"parent\":\"root\",\"transform\":{\"x\":-1109.05,\"y\":-858.75,\"skX\":81.8908,\"skY\":81.8908}},{\"length\":107,\"name\":\"Apple_021\",\"parent\":\"root\",\"transform\":{\"x\":-658.05,\"y\":-883.05,\"skX\":80.3575,\"skY\":80.3575}},{\"length\":102,\"name\":\"Apple_022\",\"parent\":\"root\",\"transform\":{\"x\":-887.25,\"y\":-720.35,\"skX\":81.6959,\"skY\":81.6959}},{\"length\":105,\"name\":\"Apple_023\",\"parent\":\"root\",\"transform\":{\"x\":-576.7,\"y\":-566.15,\"skX\":80.8178,\"skY\":80.8178}},{\"length\":101,\"name\":\"Apple_024\",\"parent\":\"root\",\"transform\":{\"x\":-1034.05,\"y\":-462.65,\"skX\":81.0523,\"skY\":81.0523}}],\"slot\":[{\"name\":\"Apple_01\",\"parent\":\"Apple_02\"},{\"name\":\"Apple_02\",\"parent\":\"Apple_021\"},{\"name\":\"Apple_03\",\"parent\":\"Apple_022\"},{\"name\":\"Apple_04\",\"parent\":\"Apple_024\"},{\"name\":\"Apple_05\",\"parent\":\"Apple_023\"}],\"skin\":[{\"slot\":[{\"name\":\"Apple_04\",\"display\":[{\"name\":\"五个苹果左右晃动三次/Apple_04\",\"transform\":{\"x\":-113.39,\"y\":-185.44,\"skX\":-81.05,\"skY\":-81.05}}]},{\"name\":\"Apple_05\",\"display\":[{\"name\":\"五个苹果左右晃动三次/Apple_05\",\"transform\":{\"x\":-81.41,\"y\":260.14,\"skX\":-80.82,\"skY\":-80.82}}]},{\"name\":\"Apple_01\",\"display\":[{\"name\":\"五个苹果左右晃动三次/Apple_01\",\"transform\":{\"x\":259.34,\"y\":-194.92,\"skX\":-81.89,\"skY\":-81.89}}]},{\"name\":\"Apple_02\",\"display\":[{\"name\":\"五个苹果左右晃动三次/Apple_02\",\"transform\":{\"x\":216.34,\"y\":282.17,\"skX\":-80.36,\"skY\":-80.36}}]},{\"name\":\"Apple_03\",\"display\":[{\"name\":\"五个苹果左右晃动三次/Apple_03\",\"transform\":{\"x\":111.86,\"y\":-12.73,\"skX\":-81.7,\"skY\":-81.7}}]}]}],\"animation\":[{\"duration\":120,\"playTimes\":0,\"name\":\"normal\",\"bone\":[{\"name\":\"Apple_02\",\"rotateFrame\":[{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-16.02},{\"duration\":72}]},{\"name\":\"Apple_021\",\"rotateFrame\":[{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-16.02},{\"duration\":72}]},{\"name\":\"Apple_022\",\"rotateFrame\":[{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-16.02},{\"duration\":72}]},{\"name\":\"Apple_023\",\"rotateFrame\":[{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-16.02},{\"duration\":72}]},{\"name\":\"Apple_024\",\"rotateFrame\":[{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-16.02},{\"duration\":72}]}]},{\"duration\":40,\"playTimes\":0,\"name\":\"enlarge\",\"bone\":[{\"name\":\"Apple_02\",\"rotateFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8}],\"scaleFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"x\":1.72,\"y\":1.72},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"x\":1.49,\"y\":1.49},{\"duration\":8}]},{\"name\":\"Apple_021\",\"rotateFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8}],\"scaleFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"x\":1.5,\"y\":1.5},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"x\":1.52,\"y\":1.52},{\"duration\":8}]},{\"name\":\"Apple_022\",\"rotateFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8}],\"scaleFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"x\":1.52,\"y\":1.52},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"x\":1.43,\"y\":1.43},{\"duration\":8}]},{\"name\":\"Apple_023\",\"rotateFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8}],\"scaleFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"x\":1.45,\"y\":1.45},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"x\":1.31,\"y\":1.31},{\"duration\":8}]},{\"name\":\"Apple_024\",\"rotateFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"rotate\":-15.29},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"rotate\":-17.58},{\"duration\":8}],\"scaleFrame\":[{\"duration\":9,\"tweenEasing\":0},{\"duration\":7,\"tweenEasing\":0,\"x\":1.39,\"y\":1.39},{\"duration\":8,\"tweenEasing\":0},{\"duration\":8,\"tweenEasing\":0,\"x\":1.42,\"y\":1.42},{\"duration\":8}]}]}],\"defaultActions\":[{\"gotoAndPlay\":\"normal\"}],\"canvas\":{\"width\":2492,\"height\":3308}}]}"
}
\ No newline at end of file
This diff is collapsed.
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"main": true, "main": true,
"url": "app://editor/index.html", "url": "app://editor/index.html",
"windowType": "dockable", "windowType": "dockable",
"x": 178, "x": 206,
"y": 144, "y": 206,
"width": 1280, "width": 1280,
"height": 720, "height": 720,
"layout": { "layout": {
...@@ -103,8 +103,7 @@ ...@@ -103,8 +103,7 @@
"inspector", "inspector",
"cocos-services" "cocos-services"
] ]
}, }
"worker": {}
}, },
"panels": {}, "panels": {},
"panelLabelWidth": {} "panelLabelWidth": {}
......
var fs = require('fs-extra');
var file = require('./util/file');
module.exports = {
load() {
},
unload() {
},
replaceDirUuid: function (path, dbpath) {
Editor.log('开始检查:' + path);
file.findDirUuid(path);
Editor.log('资源检查完成');
},
messages: {
'checkFileName'() {
var uuids = Editor.Selection.curSelection('asset');
uuids.forEach((uuid) => {
var dir_path = Editor.assetdb._uuid2path[uuid];
if (fs.existsSync(dir_path)) {
this.replaceDirUuid(dir_path, Editor.assetdb.uuidToUrl(uuid));
}
});
},
},
}
\ No newline at end of file
{
"name": "check-file-name",
"version": "0.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"version": "0.0.1",
"dependencies": {
"node-uuid": "1.4.8"
}
},
"node_modules/node-uuid": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
"integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=",
"deprecated": "Use uuid module instead",
"bin": {
"uuid": "bin/uuid"
}
}
},
"dependencies": {
"node-uuid": {
"version": "1.4.8",
"resolved": "https://registry.npmjs.org/node-uuid/-/node-uuid-1.4.8.tgz",
"integrity": "sha1-sEDrCSOWivq/jTL7HxfxFn/auQc="
}
}
}
{
"name": "check-file-name",
"version": "0.0.1",
"description": "check-file-name",
"author": "Cocos Creator",
"main": "main.js",
"main-menu": {
"i18n:MAIN_MENU.package.title/check-file-name": {
"message": "check-file-name:checkFileName"
}
},
"dependencies": {
"node-uuid": "1.4.8"
}
}
var fs = require("fs-extra");
var path = require("path");
var AppName = ""
module.exports = {
/**
* 递归目录 检查文件名
* 参考 https://docs.cocos.com/creator/manual/zh/advanced-topics/meta.html
*/
findDirUuid: function (dir) {
if(AppName == '') {
AppName = this.getRootDirName(dir);
if(AppName != "") {
Editor.log("AppName: " + AppName);
}
}
var stat = fs.statSync(dir);
if (!stat.isDirectory()) {
return;
}
var subpaths = fs.readdirSync(dir),
subpath;
for (var i = 0; i < subpaths.length; ++i) {
if (subpaths[i][0] === ".") {
continue;
}
subpath = path.join(dir, subpaths[i]);
stat = fs.statSync(subpath);
if (stat.isDirectory()) {
this.findDirUuid(subpath);
} else if (stat.isFile()) {
var metastr = subpath.substr(subpath.length - 5, 5);
if (metastr != ".meta") {
this.check(AppName, subpaths[i]);
}
}
}
},
getRootDirName: function (path) {
let pArr = path.split("/");
let assteIndex = -1;
pArr.find((item, index) => {
if(item == 'assets') {
assteIndex = index;
return true
} else {
return false
}
})
if(assteIndex > 0 && assteIndex<(pArr.length-1)) {
return pArr[assteIndex + 1];
} else {
return ""
}
},
check: (appName, filePath) => {
if(escape(filePath).indexOf("%u")>=0) {
Editor.log(`检测到[中文或中文符号]命名的文件: ${filePath}`);
}
if (!/^\S*$/.test(filePath)) {
Editor.log(`检测到[包含空格]命名的文件: ${filePath}`);
}
if (/[-]/.test(filePath)) {
Editor.log(`检测到存在[包含减号(-)]命名的文件: ${filePath}`);
}
if(filePath.indexOf(appName) == -1 && (filePath.endsWith(".js") || filePath.endsWith(".ts"))) {
Editor.log(`检测到[不包含包名(${appName})]的文件: ${filePath}`);
}
}
};
# 配置文件
config.json
\ No newline at end of file
### 1.3.0.20210929
1. 代码重构
2. 引入 eazax 框架
3. 查找性能大幅提升
4. 文件解析优化,增强稳定性
5. 去除「通过 uuid 查找」面板
6. 加入检查更新机制
### 1.2.0.20210405
1. 修复“双开编辑器卡死”的问题
2. 代码优化,提高查找速度
3. 增加多语言(英语)支持
4. 支持自定义快捷键(设置面板)
### 1.1.0-20201112
1. 增加“通过 uuid 查找”功能(新增面板)
2. 优化代码
### 1.0.0-20201103
1. 首次发布
MIT License
Copyright (c) 2021 陈皮皮
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# References Finder
## Introduction
[Cocos Creator Editor Extension]
**Find asset references in seconds by one press.**
## Open Source
This extension is an open source project, here is the git repository: [https://gitee.com/ifaswind/ccc-references-finder](https://gitee.com/ifaswind/ccc-references-finder)
If you like this project, don't forget to star [![star](https://gitee.com/ifaswind/ccc-references-finder/badge/star.svg?theme=dark)](https://gitee.com/ifaswind/ccc-references-finder/stargazers)!
*If you have any usage problems, just create an issue on Gitee or add my WeChat `im_chenpipi` and leave a message.*
## Screenshots
![screenshot-1](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-1.png)
![screenshot-2](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-2.png)
![settings-panel](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/settings-panel.png)
## Environment
Platform: Windows、macOS
Engine: Cocos Creator 2.x
## Download & Installation
### Install from Cocos Store
You can find this extension in Cocos Store now, click on *Extension -> Cocos Store* option to open the Cocos Store.
Enter "**References Finder**" in the search bar, find it and then install it.
![cocos-store](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/cocos-store.png)
*References Finder: [https://store.cocos.com/app/detail/2531](https://store.cocos.com/app/detail/2531)*
### Download from git repository
Click [here](https://gitee.com/ifaswind/ccc-references-finder/releases) or go to the release panel, download the latest version package of this extension.
And then unzip the package:
- Windows: Unzip to `C:\Users\${your username}\.CocosCreator\packages\`
- macOS: Unzip to `~/.CocosCreator/packages/`
For example, on my Windows computer, the full path of `package.json` file should be `C:\Users\Shaun\.CocosCreator\packages\ccc-references-finder\package.json`.
## Usage
### Find Asset References
1. Select any asset(s) in Asset Panel.
2. Press the hotkey (The default is `F6`) or click on *Extension -> References Finder -> Find Selected* option to find references.
3. Then all references of asset would be printed on Console Panel.
### Settings
Click on *Extension -> References Finder -> Setting* option to open the setting panel.
- **Show Details**: Show more details(node, component, property)
- **Fold Result**: Fold result in one log
In the **Hotkey** option, you can choose a hotkey(shortcut, for finding references of current selected asset) in preset list, or you can customize one in **Custom** option by yourself.
One thing you should know, not every keys/keys-combinations can be used, because some keys/keys-combinations have been used by the system or Cocos Creator.
*Accelerator reference: [https://www.electronjs.org/docs/api/accelerator](https://www.electronjs.org/docs/api/accelerator)*
🥳 Enjoy!
---
# 公众号
## 菜鸟小栈
😺 我是陈皮皮,一个还在不断学习的游戏开发者,一个热爱分享的 Cocos Star Writer。
🎨 这是我的个人公众号,专注但不仅限于游戏开发和前端技术分享。
💖 每一篇原创都非常用心,你的关注就是我原创的动力!
> Input and output.
![](https://gitee.com/ifaswind/image-storage/raw/master/weixin/official-account.png)
\ No newline at end of file
# 引用查找器
## 介绍
[Cocos Creator 编辑器扩展]
**一键查找资源的所有引用,可精确到预制体或场景中的节点、组件和属性(不包括代码中的动态引用)。**
## 开源
本扩展项目完全开源,仓库地址:[https://gitee.com/ifaswind/ccc-references-finder](https://gitee.com/ifaswind/ccc-references-finder)
如果你觉得这个项目还不错,请不要忘记点 [![star](https://gitee.com/ifaswind/ccc-references-finder/badge/star.svg?theme=dark)](https://gitee.com/ifaswind/ccc-references-finder/stargazers)!
*如有使用上的问题,可以在 Gitee 仓库中提 Issue 或者添加我的微信 `im_chenpipi` 并留言。*
## 截图
![screenshot-1](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-1.png)
![screenshot-2](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/screenshot-2.png)
![settings-panel](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/settings-panel.png)
## 运行环境
平台:Windows、macOS
引擎:Cocos Creator 2.x
## 下载 & 安装
### 扩展商店安装
本扩展已上架 Cocos 商店,点击 Cocos Creator 编辑器顶部菜单栏中的 *扩展 -> 扩展商店* 即可打开扩展商店。
在页面上方的搜索栏中搜索“**引用查找器**”就可以找到本插件,进入详情页即可直接安装(建议安装到全局)。
![cocos-store](https://gitee.com/ifaswind/image-storage/raw/master/repositories/ccc-references-finder/cocos-store.png)
*引用查找器:[https://store.cocos.com/app/detail/2531](https://store.cocos.com/app/detail/2531)*
### 自行下载安装
[此处](https://gitee.com/ifaswind/ccc-references-finder/releases)或仓库发行版处下载最新的扩展压缩包。
下载完成后将压缩包解压:
- Windows:解压到 `C:\Users\${你的用户名}\.CocosCreator\packages\` 目录下
- macOS:解压到 `~/.CocosCreator/packages/` 目录下
以 Windows 为例,扩展的 `package.json` 文件在我的电脑上的完整目录为 `C:\Users\Shaun\.CocosCreator\packages\ccc-references-finder\package.json`。
## 使用说明
### 一键查找资源引用
安装本扩展后,在资源管理器中选中任意资源,按下快捷键(默认为 `F6`)即可获取该资源的所有引用(不包括代码中的动态引用),结果将在控制台中以文本的方式打印出来。
> 查找快捷键可进入扩展的设置面板进行修改
### 设置
点击编辑器顶部菜单栏中的 *扩展 -> 引用查找器 -> 设置* 即可打开扩展的设置面板。
- **自动展开结果**:切换不同的结果展示方式(自动展开或手动展开)
- **精确到组件属性**:引用信息精确到预制体或场景中的节点上的组件和属性(有的话)
在设置面板中你可以更换快速查找引用的快捷键,也可以自定义一个自己喜欢的快捷键。
不过需要注意的是,并非所有的按键都可以使用,因为有些快捷键已被系统或 Cocos Creator 占用。
*键盘快捷键参考:[https://www.electronjs.org/docs/api/accelerator](https://www.electronjs.org/docs/api/accelerator)*
---
# 公众号
## 菜鸟小栈
😺 我是陈皮皮,一个还在不断学习的游戏开发者,一个热爱分享的 Cocos Star Writer。
🎨 这是我的个人公众号,专注但不仅限于游戏开发和前端技术分享。
💖 每一篇原创都非常用心,你的关注就是我原创的动力!
> Input and output.
![](https://gitee.com/ifaswind/image-storage/raw/master/weixin/official-account.png)
## 游戏开发交流群
皮皮创建了一个**游戏开发交流群**,供小伙伴们交流开发经验、问题求助和摸鱼(划掉)。
感兴趣的小伙伴可以添加我微信 `im_chenpipi` 并留言 `加群`
\ No newline at end of file
module.exports = {
'name': 'References Finder',
'find': 'Find Current Selected',
'find-panel': 'Find Panel',
'settings': 'Settings',
'check-update': 'Check Update',
// update
'current-latest': 'Currently the latest version!',
'has-new-version': 'New version found!',
'local-version': 'Local version: ',
'latest-version': 'Latest version: ',
'git-releases': 'Releases: https://gitee.com/ifaswind/ccc-references-finder/releases',
'cocos-store': 'Cocos Store: https://store.cocos.com/app/detail/2531',
// main
'please-select-assets': 'Please select asset(s) in Asset Panel first',
'invalid-uuid': 'Invalid uuid',
'not-support-folder': 'Does not support folder',
'find-asset-refs': 'Find references',
'no-refs': 'No references found',
'scene': 'Scene',
'prefab': 'Prefab',
'animation': 'Animation',
'material': 'Material',
'font': 'Font',
'node': 'Node',
'component': 'Component',
'property': 'Property',
'result': 'Reference result',
'node-refs': 'Node References',
'asset-refs': 'Asset References',
'asset-info': 'Asset Info',
'asset-type': 'Type: ',
'asset-uuid': 'Uuid: ',
'asset-url': 'Url: ',
'asset-path': 'Path: ',
// settings
'none': 'None',
'select-key': 'Hotkey',
'select-key-tooltip': 'Chose a hotkey to open the search bar quickly',
'custom-key': 'Custom',
'custom-key-placeholder': 'Choose a hotkey above or customize one by yourself',
'custom-key-tooltip': 'You can also customize your own hotkey',
'auto-check-update': 'Auto Check Update',
'auto-check-update-tooltip': 'Check if there is a new version when the extension is loaded',
'reference': '· Hotkey customization reference: ',
'accelerator': 'Keyboard Shortcuts',
'repository': '· Git repository of this extension: ',
'apply': 'Apply',
'quote-error': 'Do not use double quotes!',
'custom-key-error': 'Please specify a hotkey!',
'print-details': 'Show Details',
'print-details-tooltip': 'Show more details(node, component, property)',
'print-folding': 'Fold Result',
'print-folding-tooltip': 'Fold result in one log',
};
module.exports = {
'name': '引用查找器',
'find': '查找当前选中资源',
'find-panel': '查找面板',
'settings': '设置',
'check-update': '检查更新',
// update
'current-latest': '当前已是最新版本!',
'has-new-version': '发现新版本!',
'local-version': '本地版本:',
'latest-version': '最新版本:',
'git-releases': '发行版:https://gitee.com/ifaswind/ccc-references-finder/releases',
'cocos-store': 'Cocos 商店:https://store.cocos.com/app/detail/2531',
// main
'please-select-assets': '请先在资源管理器中选择需要查找引用的资源',
'invalid-uuid': '无效的 uuid',
'not-support-folder': '暂不支持查找文件夹',
'find-asset-refs': '查找资源引用',
'no-refs': '没有找到该资源的引用',
'scene': '场景',
'prefab': '预制体',
'animation': '动画',
'material': '材质',
'font': '字体',
'node': '节点',
'component': '组件',
'property': '属性',
'result': '引用查找结果',
'node-refs': '节点引用',
'asset-refs': '资源引用',
'asset-info': '资源信息',
'asset-type': 'Type:',
'asset-uuid': 'Uuid:',
'asset-url': 'Url:',
'asset-path': 'Path:',
// settings
'none': '',
'select-key': '快捷键',
'select-key-tooltip': '选择一个快速打开搜索栏的快捷键',
'custom-key': '自定义',
'custom-key-placeholder': '在上方选择一个快捷键或自定义一个快捷键',
'custom-key-tooltip': '自定义快速打开搜索栏的快捷键',
'auto-check-update': '自动检查更新',
'auto-check-update-tooltip': '扩展启动时自动检查是否有新版本',
'reference': '· 快捷键自定义请参考:',
'accelerator': '键盘快捷键',
'repository': '· 本扩展的 Git 仓库:',
'apply': '应用',
'quote-error': '请勿使用双引号!',
'custom-key-error': '请指定一个快捷键!',
'print-details': '展示详情',
'print-details-tooltip': '引用查找结果精确到节点、组件和属性',
'print-folding': '折叠结果',
'print-folding-tooltip': '引用查找结果将需要手动展开,拯救你的控制台',
};
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
"checkJs": false
},
"exclude": [
"node_modules"
],
"include": [
"lib/**/*",
"src/**/*",
"typings/**/*"
]
}
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "ccc-references-finder",
"version": "1.3.0.20210929",
"description": "一键查找资源的所有引用,可精确到预制体或场景中的节点、组件和属性(不包括代码中的动态引用)。",
"author": {
"name": "陈皮皮 (ifaswind)",
"email": "952157129@qq.com",
"url": "https://chenpipi.cn",
"wechat": "im_chenpipi",
"git-home": "https://gitee.com/ifaswind",
"official-account": "公众号「菜鸟小栈」"
},
"repository": "https://gitee.com/ifaswind/ccc-references-finder",
"license": "MIT",
"main": "src/main/index.js",
"main-menu": {
"i18n:MAIN_MENU.package.title/i18n:ccc-references-finder.name/i18n:ccc-references-finder.find": {
"message": "ccc-references-finder:find-current-selection",
"icon": "/images/search.png",
"accelerator": "F6"
},
"i18n:MAIN_MENU.package.title/i18n:ccc-references-finder.name/i18n:ccc-references-finder.settings": {
"message": "ccc-references-finder:open-settings-panel",
"icon": "/images/settings.png"
},
"i18n:MAIN_MENU.package.title/i18n:ccc-references-finder.name/i18n:ccc-references-finder.check-update": {
"message": "ccc-references-finder:menu-check-update",
"icon": "/images/update.png"
},
"i18n:MAIN_MENU.package.title/i18n:ccc-references-finder.name/v1.3.0.20210929": {
"message": "ccc-references-finder:menu-version",
"icon": "/images/version.png"
}
},
"reload": {
"renderer": [],
"ignore": [
"config.json",
"CHANGELOG.md",
"README.md",
"README.en.md"
]
}
}
\ No newline at end of file
const Path = require('path');
const Fs = require('fs');
const PackageUtil = require('../eazax/package-util');
/** 配置文件路径 */
const CONFIG_PATH = Path.join(__dirname, '../../config.json');
/** package.json 的路径 */
const PACKAGE_PATH = Path.join(__dirname, '../../package.json');
/** 包名 */
const PACKAGE_NAME = PackageUtil.name;
/** 快捷键行为 */
const ACTION_NAME = 'find';
/** package.json 中的菜单项 key */
const MENU_ITEM_KEY = `i18n:MAIN_MENU.package.title/i18n:${PACKAGE_NAME}.name/i18n:${PACKAGE_NAME}.${ACTION_NAME}`;
/**
* 配置管理器
*/
const ConfigManager = {
/**
* 默认配置
*/
get defaultConfig() {
return {
version: '1.1',
printDetails: true,
printFolding: true,
autoCheckUpdate: true,
};
},
/**
* 读取配置
*/
get() {
// 配置
const config = ConfigManager.defaultConfig;
if (Fs.existsSync(CONFIG_PATH)) {
const localConfig = JSON.parse(Fs.readFileSync(CONFIG_PATH));
for (const key in config) {
if (localConfig[key] !== undefined) {
config[key] = localConfig[key];
}
}
}
// 快捷键
config.hotkey = ConfigManager.getAccelerator();
// Done
return config;
},
/**
* 保存配置
* @param {*} value 配置
*/
set(value) {
// 配置
const config = ConfigManager.defaultConfig;
for (const key in config) {
if (value[key] !== undefined) {
config[key] = value[key];
}
}
Fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2));
// 快捷键
ConfigManager.setAccelerator(value.hotkey);
},
/**
* 获取快捷键
* @returns {string}
*/
getAccelerator() {
const package = JSON.parse(Fs.readFileSync(PACKAGE_PATH)),
item = package['main-menu'][MENU_ITEM_KEY];
return item['accelerator'] || '';
},
/**
* 设置快捷键
* @param {string} value
*/
setAccelerator(value) {
const package = JSON.parse(Fs.readFileSync(PACKAGE_PATH)),
item = package['main-menu'][MENU_ITEM_KEY];
if (value != undefined && value !== '') {
item['accelerator'] = value;
} else {
delete item['accelerator'];
}
Fs.writeFileSync(PACKAGE_PATH, JSON.stringify(package, null, 2));
},
};
module.exports = ConfigManager;
/**
* 浏览器工具
* @author 陈皮皮 (ifaswind)
* @version 20210729
*/
const BrowserUtil = {
/**
* 获取当前 Url 中的参数
* @param {string} key 键
* @returns {string}
*/
getUrlParam(key) {
if (!window || !window.location) {
return null;
}
const query = window.location.search.replace('?', '');
if (query === '') {
return null;
}
const substrings = query.split('&');
for (let i = 0; i < substrings.length; i++) {
const keyValue = substrings[i].split('=');
if (decodeURIComponent(keyValue[0]) === key) {
return decodeURIComponent(keyValue[1]);
}
}
return null;
},
/**
* 获取 Cookie 值
* @param {string} key 键
* @returns {string}
*/
getCookie(key) {
const regExp = new RegExp(`(^| )${key}=([^;]*)(;|$)`),
values = document.cookie.match(regExp);
if (values !== null) {
return values[2];
}
return null;
},
/**
* 设置 Cookie
* @param {string} key 键
* @param {string | number | boolean} value 值
* @param {string} expires 过期时间(GMT)
*/
setCookie(key, value, expires) {
let keyValues = `${key}=${encodeURIComponent(value)};`;
if (expires) {
keyValues += `expires=${expires};`;
}
document.cookie = keyValues;
},
};
module.exports = BrowserUtil;
/**
* 颜色工具
* @author 陈皮皮 (ifaswind)
* @version 20210725
*/
const ColorUtil = {
/**
* 将十六进制颜色值转为 RGB 格式
* @param {string} hex
* @returns {{ r: number, g: number, b: number }}
*/
hexToRGB(hex) {
// 是否为 HEX 格式
const regExp = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
if (!regExp.test(hex)) {
return null;
}
// 四位
if (hex.length === 4) {
const r = hex.slice(1, 2),
g = hex.slice(2, 3),
b = hex.slice(3, 4);
hex = `#${r}${r}${g}${g}${b}${b}`;
}
// 转换进制
const rgb = {
r: parseInt(`0x${hex.slice(1, 3)}`),
g: parseInt(`0x${hex.slice(3, 5)}`),
b: parseInt(`0x${hex.slice(5, 7)}`),
}
return rgb;
},
};
module.exports = ColorUtil;
/*
Cocos Creator 风格样式
版本: 20210911
作者: 陈皮皮 (ifaswind)
主页: https://gitee.com/ifaswind
公众号: 菜鸟小栈
*/
/* 属性容器 */
.properties {
width: 100%;
border: 1px solid #666;
border-radius: 3px;
padding: 5px;
box-sizing: border-box;
outline: 0;
display: flex;
flex-direction: column;
overflow: auto;
}
.properties > * {
margin: 2px 0;
}
.properties:first-child {
margin-top: 0;
}
.properties:last-child {
margin-bottom: 0;
}
/* 属性 */
.property {
width: 100%;
min-height: 23px;
box-sizing: border-box;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
}
/* 属性标签 */
.property > .label {
width: 38%;
min-width: 70px;
position: relative;
margin-left: 5px;
line-height: 23px;
font-size: 12px;
white-space: nowrap;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
flex-shrink: 0;
align-items: baseline;
justify-content: flex-start;
}
/* 属性标签文本:虚指 */
.property:hover > .label > .text {
color: #09f;
}
/* 属性标签文本:聚焦内部 */
.property:focus-within > .label > .text {
color: #fd942b;
}
/* 属性标签内容:聚焦内部 */
.property:focus-within > .content > * {
border-color: #fd942b;
}
/* tooltip */
.tooltip {
background-color: #333333;
padding: 5px 8px;
border: 1px solid #646464;
border-radius: 4px;
position: absolute;
top: -38px;
left: -5px;
visibility: hidden;
text-align: center;
z-index: 2;
}
/* tooltip 三角形 */
.tooltip::before,
.tooltip::after {
content: '';
display: block;
width: 0;
height: 0;
border: 6px solid transparent;
position: absolute;
left: 10px;
transform: rotate(-90deg);
}
/* tooltip 三角形 */
.tooltip::before {
border-right: 6px solid #333333;
top: 100%;
}
/* tooltip 三角形边框 */
.tooltip::after {
border-right: 6px solid #646464;
top: calc(100% + 1px);
z-index: -1;
}
/* 前一个元素虚指时的 tooltip */
*:hover + .tooltip {
visibility: visible;
}
/* 属性内容 */
.property > .content {
display: flex;
flex: 1;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: flex-start;
}
.property > .content > * {
width: auto;
min-width: 20px;
height: 21px;
flex: 1;
}
.property > .content > *:focus {
border-color: #fd942b;
}
/* 提示 */
.tip {
width: 100%;
min-height: 45px;
background: #333;
border: 1px solid #666;
border-radius: 3px;
padding: 12px 8px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: left;
color: #bdbdbd;
line-height: 17px;
font-size: 13px;
white-space: pre-line;
}
.tip > * {
display: inline-block;
}
/* *::滚动条 */
*::-webkit-scrollbar {
width: 11px;
}
/* *::滚动条-按钮 */
*::-webkit-scrollbar-button {
display: none;
}
/* *::滚动条-横竖交汇处 */
*::-webkit-scrollbar-corner {
display: none;
}
/* *::滚动条-轨道 */
*::-webkit-scrollbar-track {
/* background: rgba(0, 0, 0, 0.5); */
background: none !important;
background-clip: content-box;
border: 5px solid transparent;
}
/* *::滚动条-滑块 */
*::-webkit-scrollbar-thumb {
background: #7d7d7d;
background-clip: content-box;
border: 4px solid transparent;
border-radius: 6px;
}
/* *::滚动条-滑块:虚指 */
*::-webkit-scrollbar-thumb:hover {
background-color: #fd942b;
border: 3px solid transparent;
}
/*
Cocos Creator 风格标签 (橙黑)
版本: 20210725
作者: 陈皮皮 (ifaswind)
主页: https://gitee.com/ifaswind
公众号: 菜鸟小栈
*/
/* 下拉选择器 */
select {
background-color: #262626;
outline: none;
box-sizing: border-box;
border: 1px solid #171717;
border-radius: 100px;
padding: 0 8px;
font-size: 12px;
color: #bdbdbd;
cursor: pointer;
/* 替换默认的箭头 */
appearance: none;
-webkit-appearance: none;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA+ElEQVRYR+2VXw6CMAzGV3YUjSZ6CsI4l3gutnALH/xzEB8spokSQphbiwkv5RHafb9+awuYlR9YWd8ogDqgDqgDPx3w3h8A4FlV1UOysLz3O2stlmV5j+VHAbqu2yLijRIR8VzXdcOBaNu2KYriRDl93x+dc5e5/ChACGFjjBnIORBj8Q/A3jl3ZQFQcAiBKhgqz4GYiqdyklPAgeCKU5FJgFwnJOLZACkIqTgLgILnhOj9t9slE5N1BePunUKMv6Uajj0Fsbmfg5CIs68g5oRUfBEAJdOqBYCXdFUvBuCsZva/4B+H55zBnoKcQzkxCqAOqAOrO/AGwnWWIa30xvoAAAAASUVORK5CYII=);
background-size: 16px;
background-repeat: no-repeat;
background-position: right 3px center;
}
/* 下拉选择器:虚指 */
select:hover {
border-color: #888888;
}
/* 输入框,文本区域 */
input,
textarea {
background-color: #262626;
box-sizing: border-box;
padding: 0 5px;
border: 1px solid #171717;
border-radius: 3px;
color: #fd942b;
font-size: 12px;
outline: none;
}
/* 文本区域 */
textarea {
min-height: 40px;
resize: vertical;
}
/* 输入框,文本区域::占位符 */
input::placeholder,
textarea::placeholder {
font-size: 12px;
font-style: normal;
}
/* 数字输入框 */
input[type='number'] {
width: 50px !important;
}
/* 数字输入框::增减按钮 */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
/* appearance: none; */
/* -webkit-appearance: none; */
/* margin: 0; */
margin-right: -2px;
}
/* 复选框 */
input[type='checkbox'] {
appearance: none;
-webkit-appearance: none;
width: 16px !important;
height: 16px !important;
min-width: 16px !important;
background-image: none;
background-color: #262626;
border: 1px solid #171717;
border-radius: 3px;
padding-left: 0;
position: relative !important;
flex: 0 !important;
margin: 0;
color: #fd942b;
outline: none;
cursor: pointer;
}
/* 复选框:勾选 */
input[type='checkbox']:checked::after {
width: 12px;
height: 12px;
display: inline-block;
content: '';
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABKUlEQVRYR+2W2w2DMAxF41ZdBnWzqjMQZkBdjWUqkiqUgCHOO4Ef+EECwTlO7AvATj7gZD67BA5bgW/fcLXdj/cwnfVxiMD4aVomYQILKTssUV0Aw3XVWKKqgFr2G0BLTZqWqCbggq8NIHkVgSD43A/FBag9J8MOJL+/hq6oQGjlbIYrMUNAVSAEg/28+iI7BW4IuObVJZAK3wj45tUmkANfBFyNs08uLBIKd70DgroWNY0WKAGfVmBUHwlLWuFqcRWl4OsWREioh2zxuukTYtWoPlrGcOyfnIEkc9s3gsb9QLg5hiUkIuB0EOVIRMJJAXUxaTsS4FaBaIlEuFMgWCID7hXwSmTCgwSsEgXgwQJ/CZSYheBRAlpCEP/20UGFHij6R5Qicgn8AIQ23JRIyuB1AAAAAElFTkSuQmCC);
background-size: 12px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/* 输入框:虚指 */
input:hover {
border-color: #888888;
}
/* 滑动条 */
input[type='range'] {
appearance: none;
-webkit-appearance: none;
height: 4px !important;
background-color: #262626;
border: 1px solid #171717;
padding-left: 0;
padding-right: 0;
}
/* 滑动条:虚指|聚焦 */
input[type='range']:hover,
input[type='range']:focus,
*:focus-within input[type='range'] {
border-color: #171717 !important;
}
/* 滑动条::把手 */
input[type='range']::-webkit-slider-thumb {
appearance: none;
-webkit-appearance: none;
width: 12px;
height: 12px;
top: 2px;
background: #333;
box-sizing: border-box;
border: 2px solid #949494;
box-shadow: 0 1px 3px 1px #000 inset, 0 1px 1px 0 rgba(0, 0, 0, 0.9);
border-radius: 100%;
}
/* 滑动条::把手:虚指 */
input[type='range']::-webkit-slider-thumb:hover {
border-color: #bcbcbc;
cursor: pointer;
}
/* 滑动条::把手:激活 */
input[type='range']::-webkit-slider-thumb:active,
*:focus-within > input[type='range']::-webkit-slider-thumb {
color: #bdbdbd;
border-color: #fd942b !important;
cursor: ew-resize;
}
/* 取色器 */
input[type='color'] {
width: 16px;
height: 16px;
box-sizing: border-box;
border-radius: 1px;
padding: 0;
cursor: pointer;
}
/* 取色器::色板容器 */
input[type='color']::-webkit-color-swatch-wrapper {
padding: 0;
}
/* 取色器::色板 */
input[type='color']::-webkit-color-swatch {
border: none;
}
/* 超链接 */
a {
color: #fd942b;
text-decoration: none;
}
/* 超链接:虚指 */
a:hover {
text-decoration: underline;
}
/* 分割线 */
hr {
width: 100%;
height: 1px;
background-color: #666;
border: none;
margin: 10px 0 !important;
}
:root {
/* 背景颜色 */
--eazax-bg-color: #454545;
/* 主颜色 */
--eazax-main-color: #262626;
/* 强调色 */
--eazax-accent-color: #2e88fb;
/* 聚焦色 */
--eazax-focus-color: #fd942b;
/* 边框调色 */
--eazax-border-color: #171717;
/* 边框虚指调色 */
--eazax-border-hover-color: #888888;
/* 文本颜色 */
--eazax-font-color: #bdbdbd;
/* 内容颜色 */
--eazax-content-color: #fd942b;
}
const MainEvent = require('./main-event');
const { print, checkUpdate } = require('./editor-main-util');
/**
* (渲染进程)检查更新回调
* @param {Electron.IpcMainEvent} event
* @param {boolean} logWhatever 无论有无更新都打印提示
*/
function onCheckUpdateEvent(event, logWhatever) {
checkUpdate(logWhatever);
}
/**
* (渲染进程)打印事件回调
* @param {Electron.IpcMainEvent} event
* @param {'log' | 'info' | 'warn' | 'error' | any} type
* @param {any[]?} args
*/
function onPrintEvent(event, type) {
// print(type, ...args);
const args = [type];
for (let i = 2, l = arguments.length; i < l; i++) {
args.push(arguments[i]);
}
print.apply(null, args);
}
/**
* 编辑器主进程套件 (依赖 Cocos Creator 编辑器)
* @author 陈皮皮 (ifaswind)
* @version 20210818
*/
const EditorMainKit = {
/**
* 注册
*/
register() {
MainEvent.on('check-update', onCheckUpdateEvent);
MainEvent.on('print', onPrintEvent);
},
/**
* 取消注册
*/
unregister() {
MainEvent.removeListener('check-update', onCheckUpdateEvent);
MainEvent.removeListener('print', onPrintEvent);
},
};
module.exports = EditorMainKit;
const I18n = require('./i18n');
const PackageUtil = require('./package-util');
const Updater = require('./updater');
/** 编辑器语言 */
const LANG = Editor.lang || Editor.I18n.getLanguage();
/** 包名 */
const PACKAGE_NAME = PackageUtil.name;
/** 扩展名称 */
const EXTENSION_NAME = I18n.get(LANG, 'name');
/**
* 编辑器主进程工具 (依赖 Cocos Creator 编辑器)
* @author 陈皮皮 (ifaswind)
* @version 20210929
*/
const EditorMainUtil = {
/**
* 语言
*/
get language() {
return LANG;
},
/**
* i18n
* @param {string} key 关键词
* @returns {string}
*/
translate(key) {
return I18n.get(LANG, key);
},
/**
* 打印信息到控制台(带标题)
* @param {'log' | 'info' | 'warn' | 'error' | any} type
* @param {any[]?} args
*/
print(type) {
const args = [`[${EXTENSION_NAME}]`];
for (let i = 1, l = arguments.length; i < l; i++) {
args.push(arguments[i]);
}
const object = Editor.log ? Editor : console;
switch (type) {
case 'log': {
object.log.apply(object, args);
break;
}
case 'info': {
object.info.apply(object, args);
break;
}
case 'warn': {
object.warn.apply(object, args);
break;
}
case 'error': {
object.error.apply(object, args);
break;
}
default: {
args.splice(1, 0, type);
object.log.apply(object, args);
}
}
},
/**
* 打印信息到控制台(不带标题)
* @param {'log' | 'info' | 'warn' | 'error' | any} type
* @param {any[]?} args
*/
pureWithoutTitle(type) {
const args = [];
for (let i = 1, l = arguments.length; i < l; i++) {
args.push(arguments[i]);
}
const object = Editor.log ? Editor : console;
switch (type) {
case 'log': {
object.log.apply(object, args);
break;
}
case 'info': {
object.info.apply(object, args);
break;
}
case 'warn': {
object.warn.apply(object, args);
break;
}
case 'error': {
object.error.apply(object, args);
break;
}
default: {
args.splice(1, 0, type);
object.log.apply(object, args);
}
}
},
/**
* 检查更新
* @param {boolean} logWhatever 无论有无更新都打印提示
*/
async checkUpdate(logWhatever) {
// 编辑器本次启动是否已经检查过了
if (!logWhatever && (Editor[PACKAGE_NAME] && Editor[PACKAGE_NAME].hasCheckUpdate)) {
return;
}
Editor[PACKAGE_NAME] = { hasCheckUpdate: true };
// 是否有新版本
const hasNewVersion = await Updater.check();
// 打印到控制台
const { print, translate } = EditorMainUtil;
const localVersion = Updater.getLocalVersion();
if (hasNewVersion) {
const remoteVersion = await Updater.getRemoteVersion();
print('info', translate('has-new-version'));
print('info', `${translate('local-version')}${localVersion}`);
print('info', `${translate('latest-version')}${remoteVersion}`);
print('info', translate('git-releases'));
print('info', translate('cocos-store'));
} else if (logWhatever) {
print('info', translate('current-latest'));
print('info', `${translate('local-version')}${localVersion}`);
}
},
/**
* (3.x)重新加载扩展
*/
async reload() {
const path = await Editor.Package.getPath(PACKAGE_NAME);
await Editor.Package.unregister(path);
await Editor.Package.register(path);
await Editor.Package.enable(path);
},
};
module.exports = EditorMainUtil;
const RendererEvent = require("./renderer-event");
/**
* 编辑器渲染进程套件 (依赖 Cocos Creator 编辑器)
* @author 陈皮皮 (ifaswind)
* @version 20210818
*/
const EditorRendererKit = {
/**
* 打印信息到 Creator 编辑器控制台
* @param {'log' | 'info' | 'warn' | 'error' | any} type
* @param {any[]?} args
*/
print(type) {
// return RendererEvent.send('print', type, ...args);
const args = ['print', type];
for (let i = 1, l = arguments.length; i < l; i++) {
args.push(arguments[i]);
}
return RendererEvent.send.apply(RendererEvent, args);
},
};
module.exports = EditorRendererKit;
This diff is collapsed.
const zh = require('../../i18n/zh');
const en = require('../../i18n/en');
/**
* 多语言
* @author 陈皮皮 (ifaswind)
* @version 20210929
*/
const I18n = {
/**
* 中文
*/
zh,
/**
* 英文
*/
en,
/**
* 获取多语言文本
* @param {string} lang 语言
* @param {string} key 关键字
* @returns {string}
*/
get(lang, key) {
if (I18n[lang] && I18n[lang][key]) {
return I18n[lang][key];
}
return key;
},
};
module.exports = I18n;
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{"version":"1.0.8","stats":{"/Users/lmz/Documents/workspace/pro_hw/OP15/temp/quick-scripts/src/__qc_index__.js":"2022-08-15T02:20:44.207Z","/Users/lmz/Documents/workspace/pro_hw/OP15/temp/quick-scripts/src/assets/OP15/script/state.js":"2022-08-15T02:20:44.179Z","/Users/lmz/Documents/workspace/pro_hw/OP15/temp/quick-scripts/src/assets/OP15/script/xstate.js":"2022-08-15T02:20:44.186Z","/Users/lmz/Documents/workspace/pro_hw/OP15/temp/quick-scripts/src/assets/OP15/scene/OP15.js":"2022-08-15T02:20:44.188Z","/Users/lmz/Documents/workspace/pro_hw/OP15/temp/quick-scripts/src/assets/OP15/script/util.js":"2022-08-15T02:20:44.180Z","/Users/lmz/Documents/workspace/pro_hw/OP15/temp/quick-scripts/src/assets/OP15/script/defaultData.js":"2022-08-15T02:20:44.182Z"}} {"version":"1.0.8","stats":{"/Users/liwei/Documents/GitHub/Courseware/OP15/temp/quick-scripts/src/__qc_index__.js":"2023-02-23T10:40:34.453Z","/Users/liwei/Documents/GitHub/Courseware/OP15/temp/quick-scripts/src/assets/OP15/script/xstate.js":"2023-02-23T10:40:34.437Z","/Users/liwei/Documents/GitHub/Courseware/OP15/temp/quick-scripts/src/assets/OP15/script/util.js":"2023-02-23T10:40:34.435Z","/Users/liwei/Documents/GitHub/Courseware/OP15/temp/quick-scripts/src/assets/OP15/scene/OP15.js":"2023-02-23T10:40:34.437Z","/Users/liwei/Documents/GitHub/Courseware/OP15/temp/quick-scripts/src/assets/OP15/script/state.js":"2023-02-23T10:40:34.435Z","/Users/liwei/Documents/GitHub/Courseware/OP15/temp/quick-scripts/src/assets/OP15/script/defaultData.js":"2023-02-23T10:40:34.436Z"}}
This diff is collapsed.
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
function __define (exports, require, module) { function __define (exports, require, module) {
if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);} if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}
require('./assets/OP15/scene/OP15'); require('./assets/OP15/scene/OP15');
require('./assets/OP15/script/defaultData'); require('./assets/OP15/script/defaultData_OP15');
require('./assets/OP15/script/state'); require('./assets/OP15/script/state_OP15');
require('./assets/OP15/script/util'); require('./assets/OP15/script/util_OP15');
require('./assets/OP15/script/xstate'); require('./assets/OP15/script/xstate_OP15');
} }
if (nodeEnv) { if (nodeEnv) {
......
(function () { (function () {
var scripts = [{"deps":{"./assets/OP15/script/state":1,"./assets/OP15/script/xstate":2,"./assets/OP15/script/defaultData":5,"./assets/OP15/scene/OP15":3,"./assets/OP15/script/util":4},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/state.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/xstate.js"},{"deps":{"../script/defaultData":5,"../script/xstate":2,"../script/util":4},"path":"preview-scripts/assets/OP15/scene/OP15.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/util.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/defaultData.js"}]; var scripts = [{"deps":{"./assets/OP15/script/util_OP15":5,"./assets/OP15/script/defaultData_OP15":2,"./assets/OP15/script/state_OP15":3,"./assets/OP15/scene/OP15":1,"./assets/OP15/script/xstate_OP15":4},"path":"preview-scripts/__qc_index__.js"},{"deps":{"../script/util_OP15":5,"../script/xstate_OP15":4,"../script/defaultData_OP15":2},"path":"preview-scripts/assets/OP15/scene/OP15.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/defaultData_OP15.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/state_OP15.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/xstate_OP15.js"},{"deps":{},"path":"preview-scripts/assets/OP15/script/util_OP15.js"}];
var entries = ["preview-scripts/__qc_index__.js"]; var entries = ["preview-scripts/__qc_index__.js"];
var bundleScript = 'preview-scripts/__qc_bundle__.js'; var bundleScript = 'preview-scripts/__qc_bundle__.js';
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment