mirror of
https://github.com/cheney2013/UIState.git
synced 2024-12-24 10:48:57 +00:00
UIState
This commit is contained in:
parent
ed535d0481
commit
64abcdadf1
@ -0,0 +1,2 @@
|
||||
[InternetShortcut]
|
||||
URL=https://docs.cocos.com/creator/manual/en/scripting/setup.html#custom-script-template
|
5
.creator/default-meta.json
Normal file
5
.creator/default-meta.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"image": {
|
||||
"type": "sprite-frame"
|
||||
}
|
||||
}
|
24
.gitignore
vendored
Normal file
24
.gitignore
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
|
||||
#///////////////////////////
|
||||
# Cocos Creator 3D Project
|
||||
#///////////////////////////
|
||||
library/
|
||||
temp/
|
||||
local/
|
||||
build/
|
||||
profiles/
|
||||
native
|
||||
#//////////////////////////
|
||||
# NPM
|
||||
#//////////////////////////
|
||||
node_modules/
|
||||
|
||||
#//////////////////////////
|
||||
# VSCode
|
||||
#//////////////////////////
|
||||
.vscode/
|
||||
|
||||
#//////////////////////////
|
||||
# WebStorm
|
||||
#//////////////////////////
|
||||
.idea/
|
12
assets/scene.meta
Normal file
12
assets/scene.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "769e6680-cdd1-46cf-ab55-93e0b7d62a70",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
2562
assets/scene/Main.scene
Normal file
2562
assets/scene/Main.scene
Normal file
File diff suppressed because it is too large
Load Diff
11
assets/scene/Main.scene.meta
Normal file
11
assets/scene/Main.scene.meta
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "1.1.43",
|
||||
"importer": "scene",
|
||||
"imported": true,
|
||||
"uuid": "420b3c54-9433-4d1f-8cda-f534eab902bb",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
12
assets/script.meta
Normal file
12
assets/script.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "cc79b51d-f528-4fd3-b491-2cf36b7337aa",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
32
assets/script/Main.ts
Normal file
32
assets/script/Main.ts
Normal file
@ -0,0 +1,32 @@
|
||||
import { Button, Component, Node, NodeEventType, _decorator } from 'cc';
|
||||
import UIState from './component/UIState';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('Main')
|
||||
export class Main extends Component {
|
||||
@property(Button)
|
||||
btnChangeOutter:Button;
|
||||
|
||||
@property(Button)
|
||||
btnChangeInner:Button;
|
||||
|
||||
@property(Node)
|
||||
innerBox:Node;
|
||||
|
||||
start() {
|
||||
this.btnChangeOutter.node.on(NodeEventType.TOUCH_END, () => {
|
||||
const uiState = this.node.getComponent(UIState);
|
||||
uiState.state = uiState.state === 0 ? 1 : 0;
|
||||
});
|
||||
this.btnChangeInner.node.on(NodeEventType.TOUCH_END, () => {
|
||||
const uiState = this.innerBox.getComponent(UIState);
|
||||
uiState.state = uiState.state === 0 ? 1 : 0;
|
||||
});
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
9
assets/script/Main.ts.meta
Normal file
9
assets/script/Main.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "101c5b27-c9ec-4479-9458-b724e38afec6",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
12
assets/script/component.meta
Normal file
12
assets/script/component.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "8d43befd-5bf6-45b8-9872-12ec976af5ba",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
653
assets/script/component/UIState.ts
Normal file
653
assets/script/component/UIState.ts
Normal file
@ -0,0 +1,653 @@
|
||||
/*
|
||||
author:cy
|
||||
version:1.0.0
|
||||
date:2023.06.02
|
||||
qq:1183875513
|
||||
使用过程中遇到问题可以联系我
|
||||
*/
|
||||
|
||||
import {
|
||||
CCClass,
|
||||
CCString,
|
||||
Color,
|
||||
Component,
|
||||
Enum,
|
||||
Label,
|
||||
Node,
|
||||
RichText, Sprite, SpriteFrame, UIRenderer,
|
||||
Widget,
|
||||
_decorator, assetManager
|
||||
} from "cc";
|
||||
import { EDITOR } from "cc/env";
|
||||
|
||||
let isInitDebugComp = false;
|
||||
|
||||
enum States {
|
||||
Default
|
||||
}
|
||||
|
||||
/**
|
||||
* 会记录的组件及其属性
|
||||
*/
|
||||
const COMP_ATTR_RECORD = <const>{
|
||||
"UITransform": ["width", "height", "anchorX", "anchorY"],
|
||||
"Widget": ["isAlignBottom", "isAlignTop", "isAlignLeft", "isAlignRight", "isAlignVerticalCenter", "isAlignHorizontalCenter",
|
||||
"isAbsoluteTop", "isAbsoluteBottom", "isAbsoluteLeft", "isAbsoluteRight", "isAbsoluteHorizontalCenter", "isAbsoluteVerticalCenter",
|
||||
"left", "right", "top", "bottom", "horizontalCenter", "verticalCenter", "alignMode", "alignFlags"],
|
||||
"UIOpacity": ["opacity"],
|
||||
"UIRenderer": ["color"],
|
||||
"Label": ["color", "string", "horizontalAlign", "verticalAlign", "fontSize", "fontFamily", "lineHeight", "overflow", "isBold", "isItalic", "isUnderline", "underlineHeight"],
|
||||
"RichText": ["string", "horizontalAlign", "verticalAlign", "fontSize", "fontFamily", "maxWidth", "lineHeight"],
|
||||
"Sprite": ["color", "spriteFrame", "grayscale", "sizeMode", "type", "trim"]
|
||||
}
|
||||
|
||||
type KEY_OF_COMP_ATTR_RECORD = keyof typeof COMP_ATTR_RECORD;
|
||||
type STRUCT_OF_COMP_ATTR_RECORD<K extends KEY_OF_COMP_ATTR_RECORD> = typeof COMP_ATTR_RECORD[K];
|
||||
|
||||
type RecordProps = {
|
||||
[K in KEY_OF_COMP_ATTR_RECORD]?: {[key in STRUCT_OF_COMP_ATTR_RECORD<K>[number]]:any};
|
||||
} & {
|
||||
node: Node;
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
angle: number;
|
||||
active: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* 判断在真正的编辑器模式中。
|
||||
* 由于编辑器预览 EDITOR 也为 true,
|
||||
* 但又不想让特定代码在编辑器预览执行
|
||||
*/
|
||||
//@ts-ignore
|
||||
const REAL_EDITOR = EDITOR && !cc.GAME_VIEW;
|
||||
|
||||
const { ccclass, property, executeInEditMode, disallowMultiple } = _decorator;
|
||||
@ccclass("UIState")
|
||||
@executeInEditMode
|
||||
@disallowMultiple
|
||||
export default class UIState extends Component {
|
||||
@property
|
||||
private _states: string[] = ["Default"];
|
||||
|
||||
@property({ type: [CCString], step: 1 })
|
||||
set states(value: string[]) {
|
||||
if (EDITOR) {
|
||||
// 状态数量减少时
|
||||
if (value.length < this._states.length){
|
||||
let hasData = false;
|
||||
for (let i = value.length; i < this._states.length; i++) {
|
||||
hasData = !!(this._records![i] && this._records![i].length);
|
||||
if (hasData) break;
|
||||
}
|
||||
// 二次确认
|
||||
if (hasData){
|
||||
Editor.Dialog.warn("要删除的状态中含有数据,删除操作不可逆,是否继续?", {
|
||||
cancel:1,
|
||||
buttons: ["是", "否"]
|
||||
}).then(returnValue=>{
|
||||
// 否
|
||||
if(returnValue.response === 1)
|
||||
return;
|
||||
|
||||
for (let i = value.length; i < this._states.length; i++) {
|
||||
delete this._records![i];
|
||||
}
|
||||
this._states = value;
|
||||
this.updateStateEnumList();
|
||||
|
||||
// 软刷新场景,编辑器会闪一下,应该有更好的接口可以不闪的刷新吧,不过懒得找了
|
||||
Editor.Message.request("scene", "soft-reload");
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
this._states = value;
|
||||
this.updateStateEnumList();
|
||||
}else{
|
||||
this._states = value;
|
||||
}
|
||||
}
|
||||
|
||||
get states() {
|
||||
return this._states;
|
||||
}
|
||||
|
||||
@property
|
||||
private _state: States = States.Default;
|
||||
|
||||
set state(val: number) {
|
||||
if (this._state === val) return;
|
||||
// 编辑器模式时,切换状态前保存当前状态数据
|
||||
if (REAL_EDITOR) {
|
||||
this.walkNode(this.node, child => {
|
||||
this.recordBeforeStateChange(child);
|
||||
// this.removeListener(child);
|
||||
});
|
||||
}
|
||||
|
||||
let stateRecord = this.records[val];
|
||||
// 新的状态不存在的话
|
||||
if (!stateRecord) {
|
||||
// 编辑器模式下,从当前状态复制
|
||||
if (REAL_EDITOR) {
|
||||
stateRecord = this.createState(val);
|
||||
const currStateRecord = this.records[this._state];
|
||||
|
||||
currStateRecord.forEach(record => {
|
||||
stateRecord.push(this.cloneRecord(record));
|
||||
});
|
||||
}
|
||||
else return;
|
||||
}
|
||||
|
||||
this._state = val;
|
||||
this.applyState();
|
||||
if (REAL_EDITOR) this.onFocusInEditor!();
|
||||
}
|
||||
|
||||
@property({ type: Enum(States) })
|
||||
get state() {
|
||||
return this._state;
|
||||
}
|
||||
|
||||
// creator bug 用二维数组的数据结构,在编辑器里删除一个节点,再撤销会报错
|
||||
// 找不到原因,只能用对象实现了
|
||||
// private _records:RecordProps[][] = [];
|
||||
/** 关键:加上 @property 让编辑器序列化保存这个数据 */
|
||||
@property
|
||||
private _records?: { [k in number]: RecordProps[] } = undefined;
|
||||
|
||||
private _backupRecords?: { [k in number]: RecordProps[] };
|
||||
|
||||
get records() {
|
||||
// creator bug 在编辑器里删除一个节点,再撤销会重新赋初始值给组件所有
|
||||
// 带 @property 装饰器的属性,导致数据丢失,无奈只能用另一个变量来恢复数据了
|
||||
if (!this._records) this._records = this._backupRecords;
|
||||
return this._records!;
|
||||
}
|
||||
|
||||
/** 根据 uuid 快速找到记录(当前状态) */
|
||||
private _uuidRecordMap?: Map<string, RecordProps>;
|
||||
|
||||
/** 当前状态的节点记录,用于判断节点是否修改 */
|
||||
private _defaultNodeState = new Map<string, RecordProps>();
|
||||
|
||||
onLoad() {
|
||||
// 编辑器模式下,确保一个场景或预制只初始化一次
|
||||
if (REAL_EDITOR) {
|
||||
if (!isInitDebugComp){
|
||||
isInitDebugComp = true;
|
||||
UIStateDecorator(Component);
|
||||
}
|
||||
}
|
||||
|
||||
if (!this._records) this._records = {};
|
||||
this._backupRecords = this._records;
|
||||
|
||||
if (REAL_EDITOR) this.updateStateEnumList();
|
||||
|
||||
if (!this.records[this._state])
|
||||
this.createState(this._state);
|
||||
this.applyState();
|
||||
}
|
||||
|
||||
private updateStateEnumList() {
|
||||
const enumList: { name: string; value: number }[] = [];
|
||||
this.states.forEach((state, index) => {
|
||||
enumList.push({ name: state, value: index });
|
||||
});
|
||||
CCClass.Attr.setClassAttr(this, "state", "enumList", enumList);
|
||||
}
|
||||
|
||||
onDestroy() {
|
||||
if (REAL_EDITOR) this.saveCurrentState();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存当前状态
|
||||
*/
|
||||
saveCurrentState() {
|
||||
// 编辑器模式时
|
||||
this.walkNode(this.node, child => {
|
||||
this.recordBeforeStateChange(child);
|
||||
});
|
||||
console.log("已保存当前状态");
|
||||
}
|
||||
|
||||
/** 必须要有个默认状态 */
|
||||
private createState(state:number) {
|
||||
const stateRecord:RecordProps[] = [];
|
||||
this.records[state] = stateRecord;
|
||||
return stateRecord;
|
||||
}
|
||||
|
||||
private applyState() {
|
||||
let stateRecord = this.records[this._state];
|
||||
|
||||
// 建立当前状态的缓存映射关系
|
||||
this._uuidRecordMap = new Map();
|
||||
stateRecord.forEach(record => {
|
||||
if (record.node) this._uuidRecordMap?.set(record.node.uuid, record);
|
||||
});
|
||||
|
||||
// 应用状态
|
||||
for (let i = stateRecord.length - 1; i >= 0; i--) {
|
||||
const record = stateRecord[i];
|
||||
const node = record.node;
|
||||
|
||||
// 删除无效的记录
|
||||
if (!node || !node.parent){
|
||||
stateRecord.splice(i, 1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (node === this.node) continue;
|
||||
node.active = record.active!;
|
||||
node.angle = record.angle;
|
||||
node.setScale(record.scaleX, record.scaleY);
|
||||
|
||||
// 在编辑器模式下设置属性会有额外的操作,比如很多组件的属性都会影响 Widget 的属性
|
||||
// 为了避免异常,先从节点树移除
|
||||
let temp:Node;
|
||||
let tempSiblingIndex:number;
|
||||
if (REAL_EDITOR){
|
||||
tempSiblingIndex = node.getSiblingIndex();
|
||||
temp = node.parent;
|
||||
node.parent = null;
|
||||
}
|
||||
Object.keys(COMP_ATTR_RECORD).forEach(compName=>{
|
||||
const comp = node.getComponent(`cc.${compName}`);
|
||||
if (comp){
|
||||
const recordCompAttr = record[compName as keyof RecordProps];
|
||||
if (recordCompAttr) {
|
||||
switch(compName){
|
||||
case "Label":
|
||||
Object.keys(recordCompAttr).forEach(attr => {
|
||||
this.applyLabelAttr(attr, comp as Label, recordCompAttr);
|
||||
});
|
||||
break;
|
||||
case "Sprite":
|
||||
Object.keys(recordCompAttr).forEach(attr => {
|
||||
this.applySpriteAttr(attr, comp as Sprite, recordCompAttr);
|
||||
});
|
||||
break;
|
||||
case "UIRenderer":
|
||||
Object.keys(recordCompAttr).forEach(attr => {
|
||||
this.applyUIRendererAttr(attr, comp as UIRenderer, recordCompAttr);
|
||||
});
|
||||
break;
|
||||
case "Widget":
|
||||
Object.assign(comp, recordCompAttr);
|
||||
break;
|
||||
default:
|
||||
Object.assign(comp, recordCompAttr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if (REAL_EDITOR){
|
||||
temp.insertChild(node, tempSiblingIndex);
|
||||
}
|
||||
|
||||
// 应用组件启用状态
|
||||
node.components.forEach((comp, index) => {
|
||||
const compName = (comp as any).__proto__.constructor.name as keyof RecordProps;
|
||||
const recordCompAttr = record[compName];
|
||||
// 没有记录且没在 COMP_ATTR_RECORD 中表明是在其他状态新增的组件,那么在当前状态就需要禁用
|
||||
if(!recordCompAttr && COMP_ATTR_RECORD[compName as KEY_OF_COMP_ATTR_RECORD]){
|
||||
comp.enabled = false;
|
||||
}
|
||||
});
|
||||
const widget = node.getComponent(Widget);
|
||||
if (!widget || !widget.enabled)
|
||||
node.setPosition(record.x, record.y);
|
||||
}
|
||||
|
||||
this._defaultNodeState.clear();
|
||||
this.walkNodeWithSubUIState(this.node, child => {
|
||||
this._defaultNodeState.set(child.uuid, this.recordNode(child));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 记录节点
|
||||
* @param node
|
||||
* @returns
|
||||
*/
|
||||
private recordNode(node: Node, record?: RecordProps) {
|
||||
if (!record)
|
||||
record = {
|
||||
node,
|
||||
active: node.active,
|
||||
x: node.position.x,
|
||||
y: node.position.y,
|
||||
angle: node.angle,
|
||||
scaleX: node.scale.x,
|
||||
scaleY: node.scale.y
|
||||
};
|
||||
else{
|
||||
record.active = node.active;
|
||||
record.x = node.position.x;
|
||||
record.y = node.position.y;
|
||||
record.angle = node.angle;
|
||||
record.scaleX = node.scale.x;
|
||||
record.scaleY = node.scale.y;
|
||||
}
|
||||
|
||||
// 记录组件启用状态
|
||||
node.components.forEach(comp => {
|
||||
const compName = (comp as any).__proto__.constructor.name as KEY_OF_COMP_ATTR_RECORD;
|
||||
if (COMP_ATTR_RECORD[compName]){
|
||||
const compAttrs = COMP_ATTR_RECORD[compName].slice();
|
||||
// 记录组件的 enabled
|
||||
compAttrs.push("enabled" as never);
|
||||
const recordCompAttr:any = {};
|
||||
record![compName] = recordCompAttr;
|
||||
switch(compName){
|
||||
case "Label":
|
||||
compAttrs.forEach(attr => {
|
||||
this.recordLabelAttr(attr, comp as Label, recordCompAttr);
|
||||
});
|
||||
break;
|
||||
case "Sprite":
|
||||
compAttrs.forEach(attr => {
|
||||
this.recordSpriteAttr(attr, comp as Sprite, recordCompAttr);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
compAttrs.forEach(attr => {
|
||||
recordCompAttr[attr] = comp[attr as keyof typeof comp];
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return record;
|
||||
}
|
||||
|
||||
private recordLabelAttr(attr:string, comp:Label, recordCompAttr:any){
|
||||
switch(attr){
|
||||
case "color":
|
||||
recordCompAttr[attr] = comp.color.toHEX();
|
||||
break;
|
||||
case "string":
|
||||
// 有多语言组件时不处理
|
||||
if (comp.getComponent("L10nLabel")) break;
|
||||
default:
|
||||
recordCompAttr[attr] = comp[attr as keyof typeof comp];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private applyLabelAttr(attr:string, comp:Label, recordCompAttr:any){
|
||||
switch(attr){
|
||||
case "color":
|
||||
comp.color.fromHEX(recordCompAttr[attr]);
|
||||
(comp as any)["_updateColor"]();
|
||||
break;
|
||||
default:
|
||||
(comp as any)[attr] = recordCompAttr[attr];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private recordSpriteAttr(attr:string, comp:Sprite, recordCompAttr:any){
|
||||
switch(attr){
|
||||
case "color":
|
||||
recordCompAttr[attr] = comp.color.toHEX();
|
||||
break;
|
||||
case "spriteFrame":
|
||||
recordCompAttr[attr] = comp.spriteFrame?.uuid;
|
||||
break;
|
||||
default:
|
||||
recordCompAttr[attr] = comp[attr as keyof typeof comp];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private applySpriteAttr(attr:string, comp:Sprite, recordCompAttr:any){
|
||||
switch(attr){
|
||||
case "color":
|
||||
comp.color.fromHEX(recordCompAttr[attr]);
|
||||
(comp as any)["_updateColor"]();
|
||||
break;
|
||||
case "spriteFrame":
|
||||
if (comp.spriteFrame!.uuid === recordCompAttr[attr]) return;
|
||||
|
||||
assetManager.loadAny<SpriteFrame>(recordCompAttr[attr], (err, asset) => {
|
||||
if (err){
|
||||
console.warn(err);
|
||||
return;
|
||||
}
|
||||
comp.spriteFrame = asset;
|
||||
|
||||
// 特定情况下会出现SpriteFrame没有更新,点击 Creator 能够刷新
|
||||
// 使用软刷新场景的接口,编辑器会闪一下,体验不是太好,不过可以保证显示正确
|
||||
REAL_EDITOR && Editor.Message.request("scene", "soft-reload");
|
||||
});
|
||||
break;
|
||||
default:
|
||||
(comp as any)[attr] = recordCompAttr[attr];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private applyUIRendererAttr(attr:string, comp:UIRenderer, recordCompAttr:any){
|
||||
switch(attr){
|
||||
case "color":
|
||||
comp.color.fromHEX(recordCompAttr[attr]);
|
||||
(comp as any)["_updateColor"]();
|
||||
break;
|
||||
default:
|
||||
(comp as any)[attr] = recordCompAttr[attr];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存状态
|
||||
* 新增的节点不需要处理
|
||||
* 修改的节点
|
||||
* 有记录:更新状态当前记录
|
||||
* 无记录:保存当前状态,并在其他状态上保存默认的状态
|
||||
*/
|
||||
private recordBeforeStateChange(node: Node) {
|
||||
const defaultNodeState = this._defaultNodeState.get(node.uuid)!;
|
||||
|
||||
// 新增的节点记录到 _defaultNodeState
|
||||
if (!defaultNodeState){
|
||||
this._defaultNodeState.set(node.uuid, this.recordNode(node));
|
||||
return;
|
||||
}
|
||||
|
||||
let isModify = false;
|
||||
let record = this._uuidRecordMap?.get(node.uuid);
|
||||
// 清理已经删除的组件
|
||||
Object.keys(COMP_ATTR_RECORD).some(compName=>{
|
||||
if (node.getComponent(`cc.${compName}`)) return false;
|
||||
|
||||
if (defaultNodeState[compName as keyof RecordProps]){
|
||||
isModify = true;
|
||||
|
||||
// 如果没有记录就退出循环,因为已经知道了修改状态,而且也不需要更新记录
|
||||
if (!record) return true;
|
||||
|
||||
delete record![compName as keyof RecordProps];
|
||||
return false;
|
||||
}else if (record){
|
||||
delete record![compName as keyof RecordProps];
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
if (!isModify){
|
||||
if (defaultNodeState.active !== node.active || defaultNodeState.x!== node.position.x ||
|
||||
defaultNodeState.y!== node.position.y|| defaultNodeState.angle !== node.angle ||
|
||||
defaultNodeState.scaleX!== node.scale.x || defaultNodeState.scaleY!== node.scale.y)
|
||||
isModify = true;
|
||||
}
|
||||
|
||||
if (!isModify)
|
||||
// 检查节点是否有增加或修改
|
||||
isModify = node.components.some(component =>{
|
||||
const compName = (component as any).__proto__.constructor.name as keyof RecordProps;
|
||||
|
||||
// 不在 COMP_ATTR_RECORD 里的组件不记录
|
||||
if (!COMP_ATTR_RECORD[compName as KEY_OF_COMP_ATTR_RECORD])
|
||||
return false;
|
||||
|
||||
// 新增的组件
|
||||
if (!defaultNodeState[compName])
|
||||
return true;
|
||||
|
||||
const compAttrRecord = defaultNodeState[compName]!;
|
||||
return Object.keys(compAttrRecord).some(key => {
|
||||
switch(key){
|
||||
case "color":
|
||||
return (compAttrRecord as any)[key] !== ((component as any)[key] as Color).toHEX();
|
||||
case "spriteFrame":
|
||||
return (compAttrRecord as any)[key] !== ((component as any)[key] as SpriteFrame).uuid;
|
||||
default:
|
||||
if ((compAttrRecord as any)[key] !== (component as any)[key])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
if (isModify){
|
||||
if (record){
|
||||
this.recordNode(node, record);
|
||||
}else{
|
||||
Object.values(this.records).forEach((stateRecord, state) => {
|
||||
if (this._state === state) {
|
||||
record = this.recordNode(node);
|
||||
this._uuidRecordMap?.set(node.uuid, record);
|
||||
}else {
|
||||
// 深度拷贝
|
||||
record = this.cloneRecord(this._defaultNodeState.get(node.uuid)!);
|
||||
}
|
||||
stateRecord.push(record);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 遍历时包括拥有UIState的子节点
|
||||
* @param node
|
||||
* @param func
|
||||
*/
|
||||
private walkNodeWithSubUIState(node: Node, func: (target: Node) => void) {
|
||||
let skipUuid = "";
|
||||
node.walk(
|
||||
child => {
|
||||
if (skipUuid) return;
|
||||
// if (child === node) return;
|
||||
if (child.getComponent(RichText)) {
|
||||
skipUuid = child.uuid;
|
||||
}
|
||||
func(child);
|
||||
},
|
||||
(child: Node) => {
|
||||
if (skipUuid && skipUuid === child.uuid) {
|
||||
skipUuid = "";
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private walkNode(node: Node, func: (target: Node) => void) {
|
||||
let skipUuid = "";
|
||||
node.walk(
|
||||
child => {
|
||||
if (skipUuid) return;
|
||||
// if (child === node) return;
|
||||
if (child.getComponent(RichText) || (child !== node && child.getComponent(UIState))) {
|
||||
skipUuid = child.uuid;
|
||||
}
|
||||
func(child);
|
||||
},
|
||||
(child: Node) => {
|
||||
if (skipUuid && skipUuid === child.uuid) {
|
||||
skipUuid = "";
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 深拷贝记录
|
||||
* @param sourceRecord 要拷贝的记录
|
||||
* @returns 克隆的记录
|
||||
*/
|
||||
private cloneRecord(sourceRecord:RecordProps){
|
||||
let clone = Object.assign({}, sourceRecord);
|
||||
(clone.node as any) = undefined;
|
||||
clone = JSON.parse(JSON.stringify(clone)) as RecordProps;
|
||||
clone.node = sourceRecord.node;
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
|
||||
// 场景编辑器左下角的自定义信息显示
|
||||
const DIV_NAME = "UIStateElement";
|
||||
const UIStateDecorator = function (ctr: Function) {
|
||||
let createUIStateElement = function () {
|
||||
var div = document.createElement("div");
|
||||
div.id = DIV_NAME;
|
||||
div.style.background = "#2b2b2b";
|
||||
div.style.position = "fixed";
|
||||
div.style.padding = "10px";
|
||||
div.style.color = "#cccccc";
|
||||
div.style.fontSize = "14px";
|
||||
div.style.left = "0px";
|
||||
div.style.bottom = "0px";
|
||||
div.style.zIndex = "99999";
|
||||
div.style.borderRadius = "calc(var(--size-normal-radius) * 2px)";
|
||||
div.style.boxShadow = "inset 0 0 0 calc(var(--size-normal-border) * 1px) var(--color-default-border-normal)";
|
||||
document.getElementById("GameDiv")!.append(div);
|
||||
return div;
|
||||
};
|
||||
|
||||
let __oldOnFocusInEditor = ctr.prototype.onFocusInEditor;
|
||||
ctr.prototype.onFocusInEditor = function () {
|
||||
let targetElement = document.getElementById(DIV_NAME);
|
||||
if (!targetElement) targetElement = createUIStateElement();
|
||||
|
||||
if (targetElement) {
|
||||
// 找到 UIState
|
||||
let uiState: UIState;
|
||||
let node = this.node;
|
||||
while (node) {
|
||||
uiState = node.getComponent(UIState);
|
||||
if (uiState) break;
|
||||
node = node.parent;
|
||||
}
|
||||
|
||||
if (!node) return;
|
||||
|
||||
Editor.Message.send("uistate-inspector", "record-uuid", uiState!.uuid);
|
||||
|
||||
targetElement.innerHTML = `<span style="font-size:12px;color:#888">UIState</span> <br/> ${node.name} <br/> state: ${
|
||||
uiState!.states[uiState!.state]
|
||||
} `;
|
||||
}
|
||||
__oldOnFocusInEditor?.apply(this, arguments);
|
||||
};
|
||||
|
||||
let __oldOnLostFocusInEditor = ctr.prototype.onLostFocusInEditor;
|
||||
ctr.prototype.onLostFocusInEditor = function () {
|
||||
if (document.getElementById(DIV_NAME)) {
|
||||
document.getElementById(DIV_NAME)!.remove();
|
||||
}
|
||||
__oldOnLostFocusInEditor?.apply(this, arguments);
|
||||
};
|
||||
};
|
9
assets/script/component/UIState.ts.meta
Normal file
9
assets/script/component/UIState.ts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ec297f87-5b1e-4f05-84ac-867a55fc4304",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
12
assets/wealth.meta
Normal file
12
assets/wealth.meta
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "0185c6e0-48fc-45f5-827b-2c51e01f63f7",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
BIN
assets/wealth/ljcz_img_004.png
Normal file
BIN
assets/wealth/ljcz_img_004.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 68 KiB |
134
assets/wealth/ljcz_img_004.png.meta
Normal file
134
assets/wealth/ljcz_img_004.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.25",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "7c56ab6d-27a1-4557-bf3c-907ab88ddae0",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "7c56ab6d-27a1-4557-bf3c-907ab88ddae0@6c48a",
|
||||
"displayName": "ljcz_img_004",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "7c56ab6d-27a1-4557-bf3c-907ab88ddae0",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "7c56ab6d-27a1-4557-bf3c-907ab88ddae0@f9941",
|
||||
"displayName": "ljcz_img_004",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 709,
|
||||
"height": 395,
|
||||
"rawWidth": 709,
|
||||
"rawHeight": 395,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-354.5,
|
||||
-197.5,
|
||||
0,
|
||||
354.5,
|
||||
-197.5,
|
||||
0,
|
||||
-354.5,
|
||||
197.5,
|
||||
0,
|
||||
354.5,
|
||||
197.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
395,
|
||||
709,
|
||||
395,
|
||||
0,
|
||||
0,
|
||||
709,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-354.5,
|
||||
-197.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
354.5,
|
||||
197.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "7c56ab6d-27a1-4557-bf3c-907ab88ddae0@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.11",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": true,
|
||||
"redirect": "7c56ab6d-27a1-4557-bf3c-907ab88ddae0@f9941"
|
||||
}
|
||||
}
|
BIN
assets/wealth/ly_bg_004.jpg
Normal file
BIN
assets/wealth/ly_bg_004.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 174 KiB |
134
assets/wealth/ly_bg_004.jpg.meta
Normal file
134
assets/wealth/ly_bg_004.jpg.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.25",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "475bdcef-71c8-422c-9ac0-76197650e12b",
|
||||
"files": [
|
||||
".jpg",
|
||||
".json"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "475bdcef-71c8-422c-9ac0-76197650e12b@6c48a",
|
||||
"displayName": "ly_bg_004",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "475bdcef-71c8-422c-9ac0-76197650e12b",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "475bdcef-71c8-422c-9ac0-76197650e12b@f9941",
|
||||
"displayName": "ly_bg_004",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1560,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1560,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-360,
|
||||
-780,
|
||||
0,
|
||||
360,
|
||||
-780,
|
||||
0,
|
||||
-360,
|
||||
780,
|
||||
0,
|
||||
360,
|
||||
780,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
1560,
|
||||
720,
|
||||
1560,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-360,
|
||||
-780,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
360,
|
||||
780,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "475bdcef-71c8-422c-9ac0-76197650e12b@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.11",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": false,
|
||||
"redirect": "475bdcef-71c8-422c-9ac0-76197650e12b@f9941"
|
||||
}
|
||||
}
|
BIN
assets/wealth/mkxx_img_038.png
Normal file
BIN
assets/wealth/mkxx_img_038.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
134
assets/wealth/mkxx_img_038.png.meta
Normal file
134
assets/wealth/mkxx_img_038.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.25",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "88b7887e-b33d-40bb-9eb0-76fd4b99feca",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "88b7887e-b33d-40bb-9eb0-76fd4b99feca@6c48a",
|
||||
"displayName": "mkxx_img_038",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "88b7887e-b33d-40bb-9eb0-76fd4b99feca",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "88b7887e-b33d-40bb-9eb0-76fd4b99feca@f9941",
|
||||
"displayName": "mkxx_img_038",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 62,
|
||||
"height": 34,
|
||||
"rawWidth": 62,
|
||||
"rawHeight": 34,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-31,
|
||||
-17,
|
||||
0,
|
||||
31,
|
||||
-17,
|
||||
0,
|
||||
-31,
|
||||
17,
|
||||
0,
|
||||
31,
|
||||
17,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
34,
|
||||
62,
|
||||
34,
|
||||
0,
|
||||
0,
|
||||
62,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-31,
|
||||
-17,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
31,
|
||||
17,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "88b7887e-b33d-40bb-9eb0-76fd4b99feca@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.11",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": true,
|
||||
"redirect": "88b7887e-b33d-40bb-9eb0-76fd4b99feca@f9941"
|
||||
}
|
||||
}
|
BIN
assets/wealth/ty_bg_003.jpg
Normal file
BIN
assets/wealth/ty_bg_003.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
134
assets/wealth/ty_bg_003.jpg.meta
Normal file
134
assets/wealth/ty_bg_003.jpg.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.25",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "bde4de98-18d7-47fa-ae16-b5c0651b5ab3",
|
||||
"files": [
|
||||
".jpg",
|
||||
".json"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "bde4de98-18d7-47fa-ae16-b5c0651b5ab3@6c48a",
|
||||
"displayName": "ty_bg_003",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "bde4de98-18d7-47fa-ae16-b5c0651b5ab3",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "bde4de98-18d7-47fa-ae16-b5c0651b5ab3@f9941",
|
||||
"displayName": "ty_bg_003",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 720,
|
||||
"height": 1560,
|
||||
"rawWidth": 720,
|
||||
"rawHeight": 1560,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-360,
|
||||
-780,
|
||||
0,
|
||||
360,
|
||||
-780,
|
||||
0,
|
||||
-360,
|
||||
780,
|
||||
0,
|
||||
360,
|
||||
780,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
1560,
|
||||
720,
|
||||
1560,
|
||||
0,
|
||||
0,
|
||||
720,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-360,
|
||||
-780,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
360,
|
||||
780,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "bde4de98-18d7-47fa-ae16-b5c0651b5ab3@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.11",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": false,
|
||||
"redirect": "bde4de98-18d7-47fa-ae16-b5c0651b5ab3@f9941"
|
||||
}
|
||||
}
|
BIN
assets/wealth/ty_btn_036.png
Normal file
BIN
assets/wealth/ty_btn_036.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
134
assets/wealth/ty_btn_036.png.meta
Normal file
134
assets/wealth/ty_btn_036.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.25",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "53ca0b26-dfd7-48f5-b7cb-579e1220e44f",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "53ca0b26-dfd7-48f5-b7cb-579e1220e44f@6c48a",
|
||||
"displayName": "ty_btn_036",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "53ca0b26-dfd7-48f5-b7cb-579e1220e44f",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "53ca0b26-dfd7-48f5-b7cb-579e1220e44f@f9941",
|
||||
"displayName": "ty_btn_036",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 216,
|
||||
"height": 76,
|
||||
"rawWidth": 216,
|
||||
"rawHeight": 76,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-108,
|
||||
-38,
|
||||
0,
|
||||
108,
|
||||
-38,
|
||||
0,
|
||||
-108,
|
||||
38,
|
||||
0,
|
||||
108,
|
||||
38,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
76,
|
||||
216,
|
||||
76,
|
||||
0,
|
||||
0,
|
||||
216,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-108,
|
||||
-38,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
108,
|
||||
38,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "53ca0b26-dfd7-48f5-b7cb-579e1220e44f@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.11",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": true,
|
||||
"redirect": "53ca0b26-dfd7-48f5-b7cb-579e1220e44f@f9941"
|
||||
}
|
||||
}
|
BIN
assets/wealth/ty_btn_037.png
Normal file
BIN
assets/wealth/ty_btn_037.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
134
assets/wealth/ty_btn_037.png.meta
Normal file
134
assets/wealth/ty_btn_037.png.meta
Normal file
@ -0,0 +1,134 @@
|
||||
{
|
||||
"ver": "1.0.25",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "0591e33d-d09b-45e9-8f83-b0c645ce8dac",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "0591e33d-d09b-45e9-8f83-b0c645ce8dac@6c48a",
|
||||
"displayName": "ty_btn_037",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "0591e33d-d09b-45e9-8f83-b0c645ce8dac",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "0591e33d-d09b-45e9-8f83-b0c645ce8dac@f9941",
|
||||
"displayName": "ty_btn_037",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 163,
|
||||
"height": 58,
|
||||
"rawWidth": 163,
|
||||
"rawHeight": 58,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-81.5,
|
||||
-29,
|
||||
0,
|
||||
81.5,
|
||||
-29,
|
||||
0,
|
||||
-81.5,
|
||||
29,
|
||||
0,
|
||||
81.5,
|
||||
29,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
58,
|
||||
163,
|
||||
58,
|
||||
0,
|
||||
0,
|
||||
163,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-81.5,
|
||||
-29,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
81.5,
|
||||
29,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "0591e33d-d09b-45e9-8f83-b0c645ce8dac@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.11",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": true,
|
||||
"redirect": "0591e33d-d09b-45e9-8f83-b0c645ce8dac@f9941"
|
||||
}
|
||||
}
|
1318
extensions/uistate-inspector/@types/editor.d.ts
vendored
Normal file
1318
extensions/uistate-inspector/@types/editor.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
16090
extensions/uistate-inspector/@types/electron.d.ts
vendored
Normal file
16090
extensions/uistate-inspector/@types/electron.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
66
extensions/uistate-inspector/@types/extension.d.ts
vendored
Normal file
66
extensions/uistate-inspector/@types/extension.d.ts
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
declare namespace Editor {
|
||||
|
||||
namespace Interface {
|
||||
// ---- Package ---- start
|
||||
interface PackageInfo {
|
||||
debug: boolean;
|
||||
enable: boolean;
|
||||
// TODO 更名为 packageJSON 更合适
|
||||
info: PackageJson;
|
||||
invalid: boolean;
|
||||
name: string;
|
||||
path: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
interface PackageJson {
|
||||
name: string;
|
||||
version: string;
|
||||
|
||||
title?: string;
|
||||
author?: string;
|
||||
debug?: boolean;
|
||||
description?: string;
|
||||
main?: string;
|
||||
editor?: string;
|
||||
panel?: any;
|
||||
migrations?: {
|
||||
version: string;
|
||||
profile?: string;
|
||||
custom?: string;
|
||||
}[];
|
||||
contributions?: {
|
||||
[key: string]: any;
|
||||
builder?: string; // 构建插件注册脚本
|
||||
};
|
||||
}
|
||||
// ---- Package ---- end
|
||||
|
||||
// ---- UI ---- start
|
||||
interface PanelInfo {
|
||||
template?: string;
|
||||
style?: string;
|
||||
listeners?: { [key: string]: () => {} };
|
||||
methods?: { [key: string]: Function };
|
||||
$?: { [key: string]: string };
|
||||
ready?(): void;
|
||||
update?(...args: any[]): void;
|
||||
beforeClose?(): void;
|
||||
close?(): void;
|
||||
}
|
||||
|
||||
namespace UIKit {
|
||||
interface UIPanelInfo extends PanelInfo {
|
||||
// 向上触发事件
|
||||
dispath(eventName: string, ...arg: any): void;
|
||||
}
|
||||
|
||||
interface EditorElementBase extends HTMLElement {
|
||||
value: any;
|
||||
dispath: (name: string, event: any) => void;
|
||||
}
|
||||
|
||||
}
|
||||
// ---- UI ---- end
|
||||
}
|
||||
}
|
2
extensions/uistate-inspector/@types/index.d.ts
vendored
Normal file
2
extensions/uistate-inspector/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/// <reference path="./editor.d.ts"/>
|
||||
/// <reference path="./message.d.ts"/>
|
31
extensions/uistate-inspector/@types/message.d.ts
vendored
Normal file
31
extensions/uistate-inspector/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
// import * as AssetDB from './packages/asset-db/@types/message';
|
||||
// import * as Scene from './packages/scene/@types/message';
|
||||
// import * as Engine from './packages/engine/@types/message';
|
||||
// import * as Builder from './packages/builder/@types/public/message';
|
||||
// import * as Programming from './packages/programming/@types/message';
|
||||
// import * as Extension from './packages/extension/@types/message';
|
||||
import { IpcMainEvent } from 'electron';
|
||||
declare global {
|
||||
interface EditorMessageContent {
|
||||
params: any[],
|
||||
result: any;
|
||||
}
|
||||
|
||||
interface EditorMessageMap {
|
||||
[x: string]: EditorMessageContent;
|
||||
}
|
||||
|
||||
interface EditorMessageMaps {
|
||||
[x: string]: EditorMessageMap;
|
||||
// 'asset-db': AssetDB.message;
|
||||
// 'scene': Scene.message;
|
||||
// 'engine': Engine.message;
|
||||
// 'builder': Builder.message;
|
||||
// 'programming': Programming.message,
|
||||
// 'extension': Extension.message;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IMessageEvent extends IpcMainEvent {
|
||||
reply(error: null | Error | unknown, ...args: any[]): void;
|
||||
}
|
14
extensions/uistate-inspector/@types/packages/alipay-mini-game/@types/index.d.ts
vendored
Normal file
14
extensions/uistate-inspector/@types/packages/alipay-mini-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
/// <reference path='../../../@types/index'/>
|
||||
|
||||
export * from '@editor/library-type/packages/builder/@types/protect';
|
||||
import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
export type IOrientation = 'landscape' | 'portrait';
|
||||
|
||||
export interface ITaskOption extends IInternalBuildOptions {
|
||||
packages: {
|
||||
'alipay-mini-game': {
|
||||
deviceOrientation: IOrientation;
|
||||
};
|
||||
};
|
||||
}
|
72
extensions/uistate-inspector/@types/packages/android/@types/index.d.ts
vendored
Normal file
72
extensions/uistate-inspector/@types/packages/android/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
/// <reference path='../../../@types/index'/>
|
||||
export * from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect';
|
||||
import { IOptions as INativeOption } from '@editor/library-type/packages/native';
|
||||
|
||||
export type IOrientation = 'landscape' | 'portrait';
|
||||
|
||||
export interface ITaskOption extends IInternalBuildOptions {
|
||||
packages: {
|
||||
'android': IOptions;
|
||||
native: INativeOption;
|
||||
}
|
||||
}
|
||||
|
||||
export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64';
|
||||
|
||||
export interface IOptions {
|
||||
packageName: string;
|
||||
orientation: {
|
||||
landscapeRight: boolean;
|
||||
landscapeLeft: boolean;
|
||||
portrait: boolean;
|
||||
upsideDown: boolean;
|
||||
},
|
||||
|
||||
apiLevel: number;
|
||||
appABIs: IAppABI[];
|
||||
|
||||
useDebugKeystore: boolean;
|
||||
keystorePath: string;
|
||||
keystorePassword: string;
|
||||
keystoreAlias: string;
|
||||
keystoreAliasPassword: string;
|
||||
|
||||
appBundle: boolean;
|
||||
androidInstant: boolean;
|
||||
remoteUrl: string;
|
||||
sdkPath: string;
|
||||
ndkPath: string;
|
||||
|
||||
swappy: boolean;
|
||||
|
||||
renderBackEnd: {
|
||||
vulkan: boolean;
|
||||
gles3: boolean;
|
||||
gles2: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IBuildResult extends InternalBuildResult {
|
||||
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||
}
|
||||
|
||||
export interface ICertificateSetting {
|
||||
country: string;
|
||||
state: string;
|
||||
locality: string;
|
||||
organizationalUnit: string;
|
||||
organization: string;
|
||||
email: string;
|
||||
certificatePath: string;
|
||||
|
||||
password: string; // 密钥密码
|
||||
confirmPassword: string; // 确认密钥密码
|
||||
|
||||
alias: string; // 密钥别名
|
||||
aliasPassword: string;
|
||||
confirmAliasPassword: string;
|
||||
|
||||
validity: number; // 有效期
|
||||
}
|
179
extensions/uistate-inspector/@types/packages/asset-db/@types/message.d.ts
vendored
Normal file
179
extensions/uistate-inspector/@types/packages/asset-db/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,179 @@
|
||||
import { AssetInfo, QueryAssetsOption, AssetOperationOption, AssetDBOptions, IAssetMeta } from './public';
|
||||
|
||||
export interface message extends EditorMessageMap {
|
||||
'query-ready': {
|
||||
params: [],
|
||||
result: boolean,
|
||||
},
|
||||
'create-asset': {
|
||||
params: [
|
||||
string,
|
||||
string | Buffer | null,
|
||||
] | [
|
||||
string,
|
||||
string | Buffer | null,
|
||||
AssetOperationOption,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'import-asset': {
|
||||
params: [
|
||||
string,
|
||||
string,
|
||||
] | [
|
||||
string,
|
||||
string,
|
||||
AssetOperationOption,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'copy-asset': {
|
||||
params: [
|
||||
string,
|
||||
string,
|
||||
] | [
|
||||
string,
|
||||
string,
|
||||
AssetOperationOption,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'move-asset': {
|
||||
params: [
|
||||
string,
|
||||
string,
|
||||
] | [
|
||||
string,
|
||||
string,
|
||||
AssetOperationOption,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'delete-asset': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'open-asset': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: void,
|
||||
},
|
||||
'save-asset': {
|
||||
params: [
|
||||
string,
|
||||
string | Buffer,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'save-asset-meta': {
|
||||
params: [
|
||||
string,
|
||||
string,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'reimport-asset': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: boolean,
|
||||
},
|
||||
'refresh-asset': {
|
||||
params: [
|
||||
string
|
||||
],
|
||||
result: boolean,
|
||||
},
|
||||
'query-asset-info': {
|
||||
params: [
|
||||
string, // uuid | url | path
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'query-asset-meta': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: IAssetMeta | null,
|
||||
},
|
||||
'query-path': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: string | null,
|
||||
},
|
||||
'query-url': {
|
||||
params: [
|
||||
string
|
||||
],
|
||||
result: string | null,
|
||||
},
|
||||
'query-uuid': {
|
||||
params: [
|
||||
string
|
||||
],
|
||||
result: string | null,
|
||||
},
|
||||
'query-assets': {
|
||||
params: [] | [
|
||||
QueryAssetsOption,
|
||||
],
|
||||
result: AssetInfo[],
|
||||
},
|
||||
'generate-available-url': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: string,
|
||||
},
|
||||
|
||||
// private
|
||||
|
||||
'query-asset-mtime': {
|
||||
params: [
|
||||
string
|
||||
],
|
||||
result: string | null,
|
||||
},
|
||||
'refresh': {
|
||||
params: [],
|
||||
result: void,
|
||||
},
|
||||
'open-devtools': {
|
||||
params: [],
|
||||
result: void,
|
||||
},
|
||||
'query-db-info': {
|
||||
params: [
|
||||
string,
|
||||
],
|
||||
result: AssetDBOptions,
|
||||
},
|
||||
'create-asset-dialog': {
|
||||
params: [
|
||||
string,
|
||||
] | [
|
||||
string,
|
||||
string,
|
||||
],
|
||||
result: string | null,
|
||||
},
|
||||
'init-asset': {
|
||||
params: [
|
||||
string,
|
||||
string,
|
||||
],
|
||||
result: AssetInfo | null,
|
||||
},
|
||||
'query-all-importer': {
|
||||
params: [],
|
||||
result: string[],
|
||||
},
|
||||
'query-all-asset-types': {
|
||||
params: [],
|
||||
result: string[],
|
||||
},
|
||||
}
|
120
extensions/uistate-inspector/@types/packages/asset-db/@types/public.d.ts
vendored
Normal file
120
extensions/uistate-inspector/@types/packages/asset-db/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
// Basic information about the resource
|
||||
// 资源的基础信息
|
||||
export interface AssetInfo {
|
||||
// Asset name
|
||||
// 资源名字
|
||||
name: string;
|
||||
// Asset display name
|
||||
// 资源用于显示的名字
|
||||
displayName: string;
|
||||
// URL
|
||||
source: string;
|
||||
// loader 加载的层级地址
|
||||
path: string;
|
||||
// loader 加载地址会去掉扩展名,这个参数不去掉
|
||||
url: string;
|
||||
// 绝对路径
|
||||
file: string;
|
||||
// 资源的唯一 ID
|
||||
uuid: string;
|
||||
// 使用的导入器名字
|
||||
importer: string;
|
||||
// 类型
|
||||
type: string;
|
||||
// 是否是文件夹
|
||||
isDirectory: boolean;
|
||||
// 导入资源的 map
|
||||
library: { [key: string]: string };
|
||||
// 子资源 map
|
||||
subAssets: { [key: string]: AssetInfo };
|
||||
// 是否显示
|
||||
visible: boolean;
|
||||
// 是否只读
|
||||
readonly: boolean;
|
||||
|
||||
// 虚拟资源可以实例化成实体的话,会带上这个扩展名
|
||||
instantiation?: string;
|
||||
// 跳转指向资源
|
||||
redirect?: IRedirectInfo;
|
||||
// 继承类型
|
||||
extends?: string[];
|
||||
// 是否导入完成
|
||||
imported: boolean;
|
||||
// 是否导入失败
|
||||
invalid: boolean;
|
||||
}
|
||||
|
||||
export interface IRedirectInfo {
|
||||
// 跳转资源的类型
|
||||
type: string;
|
||||
// 跳转资源的 uuid
|
||||
uuid: string;
|
||||
}
|
||||
|
||||
export interface QueryAssetsOption {
|
||||
type?: string;
|
||||
pattern?: string;
|
||||
ccType?: string;
|
||||
extname?: string;
|
||||
importer?: string;
|
||||
isBundle?: boolean;
|
||||
}
|
||||
|
||||
export interface AssetOperationOption {
|
||||
// 是否强制覆盖已经存在的文件,默认 false
|
||||
overwrite?: boolean;
|
||||
// 是否自动重命名冲突文件,默认 false
|
||||
rename?: boolean;
|
||||
}
|
||||
|
||||
export interface AssetDBOptions {
|
||||
name: string;
|
||||
target: string;
|
||||
library: string;
|
||||
temp: string;
|
||||
/**
|
||||
* 0: 忽略错误
|
||||
* 1: 仅仅打印错误
|
||||
* 2: 打印错误、警告
|
||||
* 3: 打印错误、警告、日志
|
||||
* 4: 打印错误、警告、日志、调试信息
|
||||
*/
|
||||
level: number;
|
||||
ignoreFiles: string[];
|
||||
readonly: boolean;
|
||||
}
|
||||
|
||||
export interface ContributionInfo {
|
||||
mount?: {
|
||||
path: string;
|
||||
readonly?: boolean;
|
||||
visible?: boolean;
|
||||
enable?: string;
|
||||
};
|
||||
openMessage?: {
|
||||
[importerName: string]: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ExecuteAssetDBScriptMethodOptions {
|
||||
name: string;
|
||||
method: string;
|
||||
args: any[];
|
||||
}
|
||||
|
||||
export interface IAssetMeta {
|
||||
ver: string;
|
||||
importer: string;
|
||||
imported: boolean;
|
||||
uuid: string;
|
||||
files: string[];
|
||||
subMetas: {
|
||||
[index: string]: IAssetMeta;
|
||||
};
|
||||
userData: {
|
||||
[index: string]: any;
|
||||
};
|
||||
displayName: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
24
extensions/uistate-inspector/@types/packages/assets/@types/public.d.ts
vendored
Normal file
24
extensions/uistate-inspector/@types/packages/assets/@types/public.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 外部插件注册搜索方式指定返回的接口
|
||||
*
|
||||
* @export
|
||||
* @interface SearchMenuItem
|
||||
*/
|
||||
export interface SearchMenuItem {
|
||||
label: string;
|
||||
key: string;
|
||||
// handler 方法是外部扩展的搜索方法,返回 true 表示匹配搜索成功
|
||||
// searchValue 表示 assets 面板输入的搜索内容,asset 表示匹配搜索时的节点信息
|
||||
handler: (searchVale: string, asset: any) => boolean | Promise<boolean>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 外部插件注册扩展的入口
|
||||
* 可以是搜索方式或限定搜索类型
|
||||
*
|
||||
* @export
|
||||
* @interface SearchExtension
|
||||
*/
|
||||
export interface SearchExtension {
|
||||
searchMenu: Function; // 搜索方式
|
||||
}
|
7
extensions/uistate-inspector/@types/packages/assets/@types/vue.d.ts
vendored
Normal file
7
extensions/uistate-inspector/@types/packages/assets/@types/vue.d.ts
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
// 因为外围使用了 'vue/dist/vue.js' 否则不需要此声明文件
|
||||
|
||||
declare module 'vue/dist/vue.js' {
|
||||
import Vue from 'vue';
|
||||
export * from 'vue';
|
||||
export default Vue;
|
||||
}
|
2
extensions/uistate-inspector/@types/packages/builder/@types/index.d.ts
vendored
Normal file
2
extensions/uistate-inspector/@types/packages/builder/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
export * from './public';
|
45
extensions/uistate-inspector/@types/packages/builder/@types/message.d.ts
vendored
Normal file
45
extensions/uistate-inspector/@types/packages/builder/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
import { IBundleConfig, ISettings } from './public/build-result';
|
||||
import { IBuildTaskItemJSON } from './public/options';
|
||||
export interface message extends EditorMessageMap {
|
||||
'open': {
|
||||
params: [],
|
||||
result: void,
|
||||
},
|
||||
'query-worker-ready': {
|
||||
params: [],
|
||||
result: boolean,
|
||||
},
|
||||
|
||||
// 'open-devtools': {
|
||||
// params: [],
|
||||
// result: void,
|
||||
// },
|
||||
// 'generate-preview-setting': {
|
||||
// params: any[],
|
||||
// result: Promise<{
|
||||
// settings: ISettings;
|
||||
// script2library: Record<string, string>;
|
||||
// bundleConfigs: IBundleConfig[];
|
||||
// }>,
|
||||
// },
|
||||
// 'query-tasks-info': {
|
||||
// params: [],
|
||||
// result: {
|
||||
// queue: Record<string, IBuildTaskItemJSON>,
|
||||
// free: Promise<boolean>,
|
||||
// },
|
||||
// },
|
||||
// 'query-task': {
|
||||
// params: string[],
|
||||
// result: Promise<IBuildTaskItemJSON>,
|
||||
// },
|
||||
// /**
|
||||
// * 预览合图
|
||||
// * @param {object} pacUuid
|
||||
// */
|
||||
// 'preview-pac': {
|
||||
// params: string[],
|
||||
// result: Promise<IBuildTaskItemJSON>,
|
||||
// },
|
||||
|
||||
}
|
117
extensions/uistate-inspector/@types/packages/builder/@types/public/build-plugin.d.ts
vendored
Normal file
117
extensions/uistate-inspector/@types/packages/builder/@types/public/build-plugin.d.ts
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
import { ITextureCompressType, IPVRQuality, IASTCQuality, IETCQuality, ITextureFormatInfo } from './texture-compress';
|
||||
import { IBuildTaskOption, IConsoleType } from './options';
|
||||
import { IBuildResult } from './build-result';
|
||||
|
||||
export interface IBuildPluginConfig {
|
||||
doc?: string; // 文档地址,支持 HTTP 地址,支持相对于编辑器官方 URL 的地址
|
||||
hooks?: string; // relate url about IHook
|
||||
options?: IDisplayOptions; // config of options
|
||||
verifyRuleMap?: IVerificationRuleMap;
|
||||
}
|
||||
|
||||
export interface IBuildPluginProfile {
|
||||
builder?: {
|
||||
common?: Record<string, any>;
|
||||
// { platform: options }
|
||||
options?: Record<string, Record<string, any>>;
|
||||
// id: options
|
||||
taskOptionsMap?: Record<string, any>;
|
||||
}
|
||||
__version__: string;
|
||||
|
||||
// 旧版本的数据格式,已废弃
|
||||
common?: Record<string, any>;
|
||||
// { platform: options }
|
||||
options?: Record<string, Record<string, any>>;
|
||||
}
|
||||
|
||||
export type IVerificationFunc = (val: any, ...arg: any[]) => boolean | Promise<boolean>;
|
||||
export type IInternalVerificationFunc = (val: any, ...arg: any[]) => boolean;
|
||||
|
||||
export type IVerificationRuleMap = Record<string, IVerificationRule>;
|
||||
|
||||
export interface IVerificationRule {
|
||||
func: IVerificationFunc;
|
||||
message: string;
|
||||
}
|
||||
export interface IInternalVerificationRule {
|
||||
func: IInternalVerificationFunc;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export interface ITextureFormatConfig {
|
||||
displayName: string;
|
||||
options: IDisplayOptions;
|
||||
formats: ITextureFormatInfo[]; // 未指定 formats 则当前格式 key 作为存储的格式 value
|
||||
suffix: string;
|
||||
}
|
||||
|
||||
export type IDisplayOptions = Record<string, IConfigItem>;
|
||||
|
||||
export type ArrayItem = {
|
||||
label: string;
|
||||
value: string;
|
||||
};
|
||||
|
||||
export interface IConfigItem {
|
||||
key?: string; // 唯一标识符
|
||||
// 配置显示的名字,如果需要翻译,则传入 i18n:${key}
|
||||
label?: string;
|
||||
// 设置的简单说明
|
||||
description?: string;
|
||||
|
||||
experiment?: boolean; // 是否为实验性属性
|
||||
// 默认值
|
||||
default?: any;
|
||||
// 配置的类型
|
||||
type?: 'array' | 'object';
|
||||
itemConfigs?: IConfigItem[] | Record<string, IConfigItem>;
|
||||
verifyRules?: string[];
|
||||
verifyLevel?: IConsoleType, // 不赋值是默认为 error,等级为 error 时校验不通过将会无法点击构建,其他则仅做界面提示
|
||||
hidden?: boolean; // 是否隐藏
|
||||
render?: {
|
||||
ui: string;
|
||||
attributes?: Record<string, string | boolean | number>;
|
||||
items?: ArrayItem[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IBuildPlugin {
|
||||
configs?: BuildPlugin.Configs;
|
||||
assetHandlers?: BuildPlugin.AssetHandlers;
|
||||
load?: BuildPlugin.load;
|
||||
unload?: BuildPlugin.Unload;
|
||||
}
|
||||
export type IBaseHooks = (options: IBuildTaskOption, result: IBuildResult) => Promise<void> | void;
|
||||
export type IBuildStageHooks = (root: string, options: IBuildTaskOption) => Promise<void> | void;
|
||||
|
||||
export namespace BuildPlugin {
|
||||
export type Configs = Record<string, IBuildPluginConfig>;
|
||||
export type AssetHandlers = string;
|
||||
export type load = () => Promise<void> | void;
|
||||
export type Unload = () => Promise<void> | void;
|
||||
}
|
||||
|
||||
export namespace BuildHook {
|
||||
export type throwError = boolean; // 插件注入的钩子函数,在执行失败时是否直接退出构建流程
|
||||
export type title = string; // 插件任务整体 title,支持 i18n 写法
|
||||
|
||||
export type onError = IBaseHooks; // 构建发生中断错误时的回调,仅作为事件通知,并不能劫持错误
|
||||
|
||||
export type onBeforeBuild = IBaseHooks;
|
||||
export type onBeforeCompressSettings = IBaseHooks;
|
||||
export type onAfterCompressSettings = IBaseHooks;
|
||||
export type onAfterBuild = IBaseHooks;
|
||||
|
||||
export type onAfterMake = IBuildStageHooks;
|
||||
export type onBeforeMake = IBuildStageHooks;
|
||||
|
||||
export type load = () => Promise<void> | void;
|
||||
export type unload = () => Promise<void> | void;
|
||||
}
|
||||
|
||||
export namespace AssetHandlers {
|
||||
export type compressTextures = (
|
||||
tasks: { src: string; dest: string; quality: number | IPVRQuality | IASTCQuality | IETCQuality; format: ITextureCompressType }[],
|
||||
) => Promise<void>;
|
||||
}
|
199
extensions/uistate-inspector/@types/packages/builder/@types/public/build-result.d.ts
vendored
Normal file
199
extensions/uistate-inspector/@types/packages/builder/@types/public/build-result.d.ts
vendored
Normal file
@ -0,0 +1,199 @@
|
||||
/**
|
||||
* settings.js 里定义的数据
|
||||
*/
|
||||
|
||||
import { ISplashSetting, ICustomJointTextureLayout, UUID, IPhysicsConfig, IOrientation } from './options';
|
||||
|
||||
// ****************************** settings ************************************************
|
||||
|
||||
// debug: true
|
||||
// designResolution: {width: "960", height: "640", policy: 4}
|
||||
// jsList: ["assets/resources/b.js", "assets/resources/a.js"]
|
||||
// launchScene: "db://assets/New Scene-001.scene"
|
||||
// platform: "web-desktop"
|
||||
// rawAssets: {
|
||||
// assets: {
|
||||
// "0e95a9f8-d4e7-4849-875a-7a11dd692b34": ["mesh/env/gltf/textures/birch_yellow_mat_baseColor.png", "cc.ImageAsset"]
|
||||
// }
|
||||
// internal: {
|
||||
// "1baf0fc9-befa-459c-8bdd-af1a450a0319": ["effects/builtin-standard.effect", "cc.EffectAsset"]
|
||||
// }
|
||||
// }
|
||||
// scenes: [{url: "db://assets/New Scene-001.scene", uuid: "69dc4a42-cc6c-49fb-9a57-7de0c212f83d"},…]
|
||||
// startScene: "current_scene"
|
||||
|
||||
export interface ISettings {
|
||||
CocosEngine: string;
|
||||
engine: {
|
||||
debug: boolean;
|
||||
macros: Record<string, any>;
|
||||
customLayers: {name: string, bit: number}[];
|
||||
sortingLayers: {id: number, name: string, value: number}[];
|
||||
platform: string;
|
||||
engineModules?: string[];
|
||||
builtinAssets: string[];
|
||||
};
|
||||
physics?: IPhysicsConfig;
|
||||
rendering: {
|
||||
renderPipeline: string;
|
||||
renderMode?: number;
|
||||
// effect.bin
|
||||
effectSettingsPath?: string;
|
||||
};
|
||||
assets: {
|
||||
server: string;
|
||||
remoteBundles: string[];
|
||||
bundleVers: Record<string, string>;
|
||||
preloadBundles: { bundle: string, version?: string }[];
|
||||
importBase?: string;
|
||||
nativeBase?: string;
|
||||
subpackages: string[];
|
||||
preloadAssets: string[];
|
||||
jsbDownloaderMaxTasks?: number;
|
||||
jsbDownloaderTimeout?: number;
|
||||
projectBundles: string[];
|
||||
};
|
||||
plugins: {
|
||||
jsList: string[];
|
||||
};
|
||||
scripting: {
|
||||
scriptPackages?: string[];
|
||||
};
|
||||
launch: {
|
||||
launchScene: string;
|
||||
};
|
||||
screen: {
|
||||
frameRate?: number;
|
||||
exactFitScreen: boolean;
|
||||
orientation?: IOrientation;
|
||||
designResolution: ISettingsDesignResolution;
|
||||
};
|
||||
splashScreen?: ISplashSetting;
|
||||
animation: {
|
||||
customJointTextureLayouts?: ICustomJointTextureLayout[];
|
||||
};
|
||||
profiling?: {
|
||||
showFPS: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
// 物理配置
|
||||
export interface IVec3Like {
|
||||
x: number;
|
||||
y: number;
|
||||
z: number;
|
||||
}
|
||||
|
||||
export interface ICollisionMatrix {
|
||||
[x: string]: number;
|
||||
}
|
||||
|
||||
export interface IPhysicsMaterial {
|
||||
friction: number; // 0.5
|
||||
rollingFriction: number; // 0.1
|
||||
spinningFriction: number; // 0.1
|
||||
restitution: number; // 0.1
|
||||
}
|
||||
|
||||
export interface IPackageInfo {
|
||||
name: string;
|
||||
path: string;
|
||||
uuids: UUID[];
|
||||
}
|
||||
|
||||
export interface ISettingsDesignResolution {
|
||||
width: number;
|
||||
height: number;
|
||||
policy: number;
|
||||
}
|
||||
|
||||
interface IAssetPathBase {
|
||||
bundleName?: string;
|
||||
redirect?: string; // 重定向的 bundle 包名
|
||||
}
|
||||
|
||||
export interface IRawAssetPathInfo extends IAssetPathBase {
|
||||
raw: string[];
|
||||
}
|
||||
export declare interface IAssetPathInfo extends IAssetPathBase {
|
||||
raw?: string[];
|
||||
json?: string;
|
||||
groupIndex?: number;
|
||||
}
|
||||
|
||||
export interface IJsonPathInfo extends IAssetPathBase {
|
||||
json?: string;
|
||||
groupIndex?: number;
|
||||
}
|
||||
|
||||
export interface IBuildPaths {
|
||||
dir: string; // 构建资源输出地址( assets 所在的目录,并不一定与构建目录对应)
|
||||
settings: string; // settings.json 输出地址
|
||||
systemJs?: string; // system.js 生成地址
|
||||
engineDir?: string; // 引擎生成地址
|
||||
polyfillsJs?: string; // polyfill.js 生成地址
|
||||
assets: string; // assets 目录
|
||||
subpackages: string; // subpackages 目录
|
||||
remote: string; // remote 目录
|
||||
bundleScripts: string // bundle 的脚本,某些平台无法下载脚本,则将远程包中的脚本移到本地
|
||||
applicationJS: string; // application.js 的生成地址
|
||||
compileConfig?: string; // cocos.compile.config.json
|
||||
importMap: string; // import-map 文件地址
|
||||
}
|
||||
|
||||
export declare class IBuildResult {
|
||||
dest: string; // options 指定的构建目录
|
||||
|
||||
paths: IBuildPaths; // 构建后资源相关地址集合
|
||||
|
||||
settings?: ISettings;
|
||||
|
||||
/**
|
||||
* 指定的 uuid 资源是否包含在构建资源中
|
||||
*/
|
||||
containsAsset: (uuid: string) => boolean;
|
||||
|
||||
/**
|
||||
* 获取指定 uuid 原始资源的存放路径(不包括序列化 json)
|
||||
* 自动图集的小图 uuid 和自动图集的 uuid 都将会查询到合图大图的生成路径
|
||||
* 实际返回多个路径的情况:查询 uuid 为自动图集资源,且对应图集生成多张大图,纹理压缩会有多个图片格式路径
|
||||
*/
|
||||
getRawAssetPaths: (uuid: string) => IRawAssetPathInfo[];
|
||||
|
||||
/**
|
||||
* 获取指定 uuid 资源的序列化 json 路径
|
||||
*/
|
||||
getJsonPathInfo: (uuid: string) => IJsonPathInfo[];
|
||||
|
||||
/**
|
||||
* 获取指定 uuid 资源的路径相关信息
|
||||
* @return {raw?: string[]; json?: string; groupIndex?: number;}
|
||||
* @return.raw: 该资源源文件的实际存储位置
|
||||
* @return.json: 该资源序列化 json 的实际存储位置,不存在为空
|
||||
* @return.groupIndex: 若该资源的序列化 json 在某个 json 分组内,这里标识在分组内的 index,不存在为空
|
||||
*/
|
||||
getAssetPathInfo: (uuid: string) => IAssetPathInfo[];
|
||||
}
|
||||
|
||||
export interface IBundleConfig {
|
||||
importBase: string; // bundle 中 import 目录的名称,通常是 'import'
|
||||
nativeBase: string; // native 中 native 目录的名称,通常是 'native'
|
||||
name: string; // bundle 的名称,可以通过 bundle 名称加载 bundle
|
||||
deps: string[]; // 该 bundle 依赖的其他 bundle 名称
|
||||
uuids: UUID[]; // 该 bundle 中的所有资源的 uuid
|
||||
paths: Record<string, any[]>; // 该 bundle 中可以通过路径加载的资源,参考以前 settings 中 rawAssets 的定义
|
||||
scenes: Record<string, UUID|number>; // 该 bundle 中所有场景,场景名为 key, uuid 为 value
|
||||
packs: Record<UUID, UUID[]>; // 该 bundle 中所有合并的 json, 参考以前 settings 中 packedAssets 的定义
|
||||
versions: { import: Array<string|number>, native: Array<string|number> }; // 该 bundle 中所有资源的版本号,参考以前 settings 中 md5AssetsMap 的定义
|
||||
redirect: Array<string|number>; // 该 bundle 中重定向到其他 bundle 的资源
|
||||
debug: boolean; // 是否是 debug 模式,debug 模式会对 config.json 的数据进行压缩,所以运行时得解压
|
||||
types?: string[]; // paths 中的类型数组,参考以前 settings 中 assetTypes 的定义
|
||||
encrypted?: boolean; // 原生上使用,标记该 bundle 中的脚本是否加密
|
||||
isZip?: boolean; // 是否是 zip 模式
|
||||
zipVersion?: string;
|
||||
extensionMap: Record<string, UUID[]>;
|
||||
/**
|
||||
* 是否有需要预加载的脚本,默认为 `false`。
|
||||
*/
|
||||
hasPreloadScript: boolean;
|
||||
}
|
6
extensions/uistate-inspector/@types/packages/builder/@types/public/global.d.ts
vendored
Normal file
6
extensions/uistate-inspector/@types/packages/builder/@types/public/global.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import { IBuild } from '.';
|
||||
|
||||
// 定义 builder 进程内的全局变量
|
||||
declare global {
|
||||
const Build: IBuild;
|
||||
}
|
102
extensions/uistate-inspector/@types/packages/builder/@types/public/index.d.ts
vendored
Normal file
102
extensions/uistate-inspector/@types/packages/builder/@types/public/index.d.ts
vendored
Normal file
@ -0,0 +1,102 @@
|
||||
import { ITransformOptions } from './options';
|
||||
|
||||
export * from './build-result';
|
||||
export * from './build-plugin';
|
||||
export * from './texture-compress';
|
||||
export * from './options';
|
||||
|
||||
interface IAppendRes {
|
||||
hash: string;
|
||||
paths: string[];
|
||||
}
|
||||
|
||||
interface ICreateBundleOptions {
|
||||
excludes?: string[];
|
||||
debug?: boolean;
|
||||
sourceMap?: boolean;
|
||||
targets?: string;
|
||||
}
|
||||
export interface IBuildUtils {
|
||||
/**
|
||||
* 压缩 uuid
|
||||
* 'fc991dd7-0033-4b80-9d41-c8a86a702e59' -> 'fc9913XADNLgJ1ByKhqcC5Z'
|
||||
*/
|
||||
compressUuid: (uuid: string, min: boolean) => string;
|
||||
|
||||
/**
|
||||
* 解压缩 uuid
|
||||
* 'fc9913XADNLgJ1ByKhqcC5Z' -> 'fc991dd7-0033-4b80-9d41-c8a86a702e59'
|
||||
*/
|
||||
decompressUuid: (uuid: string) => string;
|
||||
|
||||
/**
|
||||
* 翻译带有 i18n 开头的名称(i18n:test)(待定)
|
||||
* 'i18n:test' -> '测试'
|
||||
*/
|
||||
transI18nName: (name: string) => string;
|
||||
|
||||
/**
|
||||
* 移除 db 前缀
|
||||
* 'db://assets/test.jpg' -> 'assets/test.jpg'
|
||||
*/
|
||||
removeDbHeader: (url: string) => string;
|
||||
|
||||
/**
|
||||
* 将 db 开头的 url 转为项目里的实际 url
|
||||
* 'db://assets/test.jpg' -> 'c:/project/assets/test.jpg'
|
||||
*/
|
||||
dbUrlToRawPath: (url: string) => string;
|
||||
|
||||
/**
|
||||
* 从路径里获取存在的 uuid
|
||||
* 'E:\test3d\library\oc\0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c.json' -> '0c0c1f5742-89b0-4a1e-b5eb-914d84f48c1c'
|
||||
*/
|
||||
getUuidFromPath: (path: string) => string;
|
||||
|
||||
/**
|
||||
* 检查是否全局安装了 nodejs
|
||||
*/
|
||||
isInstallNodeJs: () => Promise<boolean>;
|
||||
|
||||
/**
|
||||
* 逐文件拷贝
|
||||
*/
|
||||
copyDirSync: (src: string, dest: string) => void;
|
||||
|
||||
/**
|
||||
* 获取相对路径接口
|
||||
* 返回 / 拼接的相对路径
|
||||
*/
|
||||
relativeUrl: (from: string, to: string) => string;
|
||||
|
||||
transformCode: (code: string, options: ITransformOptions) => Promise<string>;
|
||||
|
||||
/**
|
||||
* 给指定路径添加 md5
|
||||
*/
|
||||
appendMd5ToPaths: (paths: string[]) => Promise<IAppendRes | null>;
|
||||
|
||||
calcMd5: (data: Buffer | string) => string;
|
||||
|
||||
copyPaths: (paths: { src: string; dest: string }[]) => Promise<void[]>;
|
||||
|
||||
createBundle: (src: string, dest: string, options?: ICreateBundleOptions) => Promise<unknown>;
|
||||
}
|
||||
export interface IBuild {
|
||||
Utils: IBuildUtils;
|
||||
|
||||
LIBRARY_NAME: string;
|
||||
IMPORT_HEADER: string;
|
||||
NATIVE_HEADER: string;
|
||||
ASSETS_HEADER: string;
|
||||
SUBPACKAGES_HEADER: string;
|
||||
REMOTE_HEADER: string;
|
||||
BUNDLE_SCRIPTS_HEADER: string;
|
||||
SCRIPT_NAME: string;
|
||||
CONFIG_NAME: string;
|
||||
BUNDLE_ZIP_NAME: string;
|
||||
projectTempDir: string;
|
||||
globalTempDir: string;
|
||||
buildTemplateDir: string; // 构建模板地址 build-templates
|
||||
isCommand: boolean; // 是否为命令行构建
|
||||
}
|
222
extensions/uistate-inspector/@types/packages/builder/@types/public/options.d.ts
vendored
Normal file
222
extensions/uistate-inspector/@types/packages/builder/@types/public/options.d.ts
vendored
Normal file
@ -0,0 +1,222 @@
|
||||
import * as babel from '@babel/core';
|
||||
|
||||
export interface IPhysicsConfig {
|
||||
gravity: IVec3Like; // (0,-10, 0)
|
||||
allowSleep: boolean; // true
|
||||
sleepThreshold: number; // 0.1,最小 0
|
||||
autoSimulation: boolean; // true
|
||||
fixedTimeStep: number; // 1 / 60 ,最小 0
|
||||
maxSubSteps: number; // 1,最小 0
|
||||
defaultMaterial?: string; // 物理材质 uuid
|
||||
useNodeChains: boolean; // true
|
||||
collisionMatrix: ICollisionMatrix;
|
||||
physicsEngine: string;
|
||||
}
|
||||
|
||||
export type IConsoleType = 'log' | 'warn' | 'error' | 'debug';
|
||||
|
||||
/**
|
||||
* 构建所需的完整参数
|
||||
*/
|
||||
export interface IBuildTaskOption {
|
||||
taskId?: string; // 指定构建任务 id,可选
|
||||
// 构建后的游戏文件夹生成的路径
|
||||
buildPath: string;
|
||||
debug: boolean;
|
||||
inlineSpriteFrames: boolean;
|
||||
md5Cache: boolean;
|
||||
|
||||
// bundle 设置
|
||||
mainBundleCompressionType: BundleCompressionType;
|
||||
mainBundleIsRemote: boolean;
|
||||
useBuiltinServer: boolean; // 使用内置的服务器地址,实验性功能
|
||||
server?: string; // 服务器地址
|
||||
// 小游戏平台将会自动勾选
|
||||
moveRemoteBundleScript: boolean;
|
||||
|
||||
mergeJson: boolean;
|
||||
name: string;
|
||||
// packAutoAtlas: boolean;
|
||||
platform: Platform;
|
||||
scenes: IBuildSceneItem[];
|
||||
skipCompressTexture: boolean;
|
||||
sourceMaps: boolean;
|
||||
startScene: string;
|
||||
outputName: string;
|
||||
experimentalEraseModules: boolean;
|
||||
polyfills?: IPolyFills;
|
||||
nextStages?: string[];
|
||||
|
||||
// 构建阶段性任务绑定分组
|
||||
buildStageGroup?: Record<string, string[]>;
|
||||
|
||||
/**
|
||||
* 是否是预览进程发送的构建请求。
|
||||
* @default false
|
||||
*/
|
||||
preview?: boolean;
|
||||
|
||||
// 项目设置
|
||||
includeModules?: string[];
|
||||
renderPipeline?: string;
|
||||
designResolution?: IBuildDesignResolution;
|
||||
physicsConfig?: IPhysicsConfig;
|
||||
flags?: Record<string, boolean>;
|
||||
customLayers: {name: string, value: number}[];
|
||||
sortingLayers: {id: number, name: string, value: number}[];
|
||||
|
||||
// 是否使用自定义插屏选项
|
||||
useSplashScreen?: boolean;
|
||||
splashScreen: ISplashSetting;
|
||||
|
||||
packages?: Record<string, any>;
|
||||
id?: string; // 手动配置构建任务 id
|
||||
// recompileConfig?: IRecompileConfig;
|
||||
|
||||
// 一些偏好设置选项
|
||||
useBuildAssetCache?: boolean;
|
||||
useBuildEngineCache?: boolean;
|
||||
useBuildTextureCompressCache?: boolean;
|
||||
useBuildAutoAtlasCache?: boolean;
|
||||
__version__?: string;
|
||||
}
|
||||
|
||||
export type UUID = string;
|
||||
|
||||
export interface ISplashSetting {
|
||||
displayRatio: number;
|
||||
totalTime: number;
|
||||
watermarkLocation: 'default' | 'topLeft' | 'topRight' | 'topCenter' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
||||
autoFit: boolean;
|
||||
|
||||
url?: string;
|
||||
|
||||
// 运行时使用的数据
|
||||
bgBase64?: string;
|
||||
base64src?: string;
|
||||
}
|
||||
|
||||
|
||||
export interface ICustomJointTextureLayout {
|
||||
textureLength: number;
|
||||
contents: IChunkContent[];
|
||||
}
|
||||
|
||||
export interface IChunkContent {
|
||||
skeleton: null | string;
|
||||
clips: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建使用的设计分辨率数据
|
||||
*/
|
||||
export interface IBuildDesignResolution {
|
||||
height: number;
|
||||
width: number;
|
||||
fitWidth?: boolean;
|
||||
fitHeight?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建使用的场景的数据
|
||||
*/
|
||||
export interface IBuildSceneItem {
|
||||
url: string;
|
||||
uuid: string;
|
||||
inBundle?: boolean;
|
||||
}
|
||||
|
||||
export interface IPolyFills {
|
||||
/**
|
||||
* True if async functions polyfills(i.e. regeneratorRuntime) needs to be included.
|
||||
* You need to turn on this field if you want to use async functions in language.
|
||||
*/
|
||||
asyncFunctions?: boolean;
|
||||
|
||||
/**
|
||||
* If true, [core-js](https://github.com/zloirock/core-js) polyfills are included.
|
||||
* The default options of [core-js-builder](https://github.com/zloirock/core-js/tree/master/packages/core-js-builder)
|
||||
* will be used to build the core-js.
|
||||
*/
|
||||
coreJs?: boolean;
|
||||
|
||||
targets?: string;
|
||||
}
|
||||
|
||||
// **************************** options *******************************************
|
||||
export type Platform =
|
||||
| 'web-desktop'
|
||||
| 'web-mobile'
|
||||
| 'wechatgame'
|
||||
| 'wechatprogram'
|
||||
| 'oppo-mini-game'
|
||||
| 'vivo-mini-game'
|
||||
| 'huawei-quick-game'
|
||||
| 'alipay-mini-game'
|
||||
| 'taobao-creative-app'
|
||||
| 'taobao-mini-game'
|
||||
| 'mac'
|
||||
| 'ios'
|
||||
| 'linux'
|
||||
// | 'ios-app-clip'
|
||||
| 'android'
|
||||
| 'ohos'
|
||||
| 'open-harmonyos'
|
||||
| 'windows'
|
||||
| 'xiaomi-quick-game'
|
||||
| 'baidu-mini-game'
|
||||
| 'bytedance-mini-game'
|
||||
| 'cocos-play'
|
||||
| 'huawei-agc'
|
||||
| 'link-sure'
|
||||
| 'qtt'
|
||||
| 'fb-instant-games'
|
||||
| 'cocos-runtime'
|
||||
| 'xr-meta'
|
||||
| 'xr-huaweivr'
|
||||
| 'xr-pico'
|
||||
| 'xr-rokid'
|
||||
| 'xr-monado'
|
||||
| 'ar-android'
|
||||
| 'ar-ios'
|
||||
| 'xr-spaces'
|
||||
| 'xr-seed'
|
||||
| 'online'
|
||||
| 'xr-gsxr'
|
||||
| 'xr-yvr'
|
||||
| 'xr-htc'
|
||||
| 'xr-iqiyi'
|
||||
| 'xr-skyworth'
|
||||
| 'xr-ffalcon'
|
||||
| 'xr-nreal'
|
||||
| 'xr-inmo'
|
||||
| 'xr-lenovo'
|
||||
;
|
||||
|
||||
export type BundleCompressionType = 'none' | 'merge_dep' | 'merge_all_json' | 'subpackage' | 'zip';
|
||||
export type IModules = 'esm' | 'commonjs' | 'systemjs';
|
||||
|
||||
export interface ITransformOptions {
|
||||
importMapFormat: IModules;
|
||||
plugins?: babel.PluginItem[];
|
||||
}
|
||||
|
||||
export type ITaskState = 'waiting' | 'success' | 'failure' | 'cancel' | 'processing';
|
||||
|
||||
export interface ITaskItemJSON{
|
||||
id: string;
|
||||
progress: number;
|
||||
state: ITaskState;
|
||||
message: string;
|
||||
time: string;
|
||||
}
|
||||
|
||||
export interface IBuildTaskItemJSON extends ITaskItemJSON {
|
||||
stage: 'build' | string;
|
||||
options: IBuildTaskOption;
|
||||
dirty: boolean;
|
||||
rawOptions?: IBuildTaskOption;
|
||||
type: 'build',
|
||||
}
|
||||
|
||||
export type IOrientation = 'auto' | 'landscape' | 'portrait';
|
71
extensions/uistate-inspector/@types/packages/builder/@types/public/texture-compress.d.ts
vendored
Normal file
71
extensions/uistate-inspector/@types/packages/builder/@types/public/texture-compress.d.ts
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
export type ITextureCompressType =
|
||||
| 'jpg'
|
||||
| 'png'
|
||||
| 'webp'
|
||||
| 'pvrtc_4bits_rgb'
|
||||
| 'pvrtc_4bits_rgba'
|
||||
| 'pvrtc_4bits_rgb_a'
|
||||
| 'pvrtc_2bits_rgb'
|
||||
| 'pvrtc_2bits_rgba'
|
||||
| 'pvrtc_2bits_rgb_a'
|
||||
| 'etc1_rgb'
|
||||
| 'etc1_rgb_a'
|
||||
| 'etc2_rgb'
|
||||
| 'etc2_rgba'
|
||||
| 'astc_4x4'
|
||||
| 'astc_5x5'
|
||||
| 'astc_6x6'
|
||||
| 'astc_8x8'
|
||||
| 'astc_10x5'
|
||||
| 'astc_10x10'
|
||||
| 'astc_12x12'
|
||||
| string;
|
||||
export type ITextureCompressPlatform = 'miniGame' | 'web' | 'ios' | 'android';
|
||||
|
||||
export interface IHandlerInfo {
|
||||
type: 'program' | 'npm' | 'function';
|
||||
info: ICommandInfo | Function;
|
||||
func?: Function;
|
||||
}
|
||||
|
||||
export interface ICustomConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
path: string;
|
||||
command: string;
|
||||
format: string;
|
||||
overwrite?: boolean;
|
||||
num?: number;
|
||||
}
|
||||
|
||||
export interface ICommandInfo {
|
||||
command: string;
|
||||
params?: string[];
|
||||
path: string;
|
||||
}
|
||||
|
||||
export interface ITextureFormatInfo {
|
||||
displayName: string;
|
||||
value: ITextureCompressType | string;
|
||||
formatSuffix?: string;
|
||||
alpha?: boolean;
|
||||
formatType?: string;
|
||||
handler?: IHandlerInfo;
|
||||
custom?: boolean;
|
||||
params?: string[];
|
||||
}
|
||||
export interface ISupportFormat {
|
||||
rgb: ITextureCompressType[];
|
||||
rgba: ITextureCompressType[];
|
||||
}
|
||||
export interface IConfigGroupsInfo {
|
||||
defaultSupport?: ISupportFormat,
|
||||
support: ISupportFormat,
|
||||
displayName: string;
|
||||
icon: string;
|
||||
}
|
||||
export type IConfigGroups = Record<ITextureCompressPlatform, IConfigGroupsInfo>;
|
||||
|
||||
export type IPVRQuality = 'fastest' | 'fast' | 'normal' | 'high' | 'best';
|
||||
export type IETCQuality = 'slow' | 'fast';
|
||||
export type IASTCQuality = 'veryfast' | 'fast' | 'medium' | 'thorough' | 'exhaustive';
|
26
extensions/uistate-inspector/@types/packages/bytedance-mini-game/@types/index.d.ts
vendored
Normal file
26
extensions/uistate-inspector/@types/packages/bytedance-mini-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/// <reference path='../../../@types/index'/>
|
||||
|
||||
export * from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
export type IOrientation = 'auto' | 'landscape' | 'portrait';
|
||||
|
||||
export interface IOptions {
|
||||
appid: string;
|
||||
buildOpenDataContextTemplate: boolean;
|
||||
orientation: IOrientation;
|
||||
physX: {
|
||||
use: 'physX' | 'project';
|
||||
notPackPhysXLibs: boolean;
|
||||
mutiThread: boolean;
|
||||
subThreadCount: number;
|
||||
epsilon: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ITaskOption extends IInternalBuildOptions {
|
||||
packages: {
|
||||
'bytedance-mini-game': IOptions;
|
||||
};
|
||||
}
|
1
extensions/uistate-inspector/@types/packages/certificate/@types/index.d.ts
vendored
Normal file
1
extensions/uistate-inspector/@types/packages/certificate/@types/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
/// <reference path='../../../@types/index'/>
|
1
extensions/uistate-inspector/@types/packages/channel-upload-tools/@types/index.d.ts
vendored
Normal file
1
extensions/uistate-inspector/@types/packages/channel-upload-tools/@types/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
/// <reference path='../../../@types/index'/>
|
33
extensions/uistate-inspector/@types/packages/console/@types/pritate.d.ts
vendored
Normal file
33
extensions/uistate-inspector/@types/packages/console/@types/pritate.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
export type logType = 'log' | 'warn' | 'error' | 'info';
|
||||
export interface IMessageItem {
|
||||
rows: number; // 内部有几行 包括 details & stacks
|
||||
translateY: number;
|
||||
show: boolean;
|
||||
title: string;
|
||||
content: string[]; // details
|
||||
count: number; // 重复的个数
|
||||
fold: boolean; // 折叠
|
||||
type: logType;
|
||||
message: any;
|
||||
texture: string; // 纹理 light or dark
|
||||
date?: number; // 格式化的时间
|
||||
time?: number; // 时间戳
|
||||
process?: string;
|
||||
stack: string[];
|
||||
}
|
||||
|
||||
export interface INewItem {
|
||||
type: logType
|
||||
[propName: string]: any
|
||||
}
|
||||
|
||||
export type ILogCounter = Record<logType, number>;
|
||||
|
||||
export type IConsoleExtension = {
|
||||
name: string,
|
||||
key: string,
|
||||
label: string,
|
||||
value?: boolean,
|
||||
show: boolean
|
||||
}
|
684
extensions/uistate-inspector/@types/packages/engine-extends/@types/glTF.d.ts
vendored
Normal file
684
extensions/uistate-inspector/@types/packages/engine-extends/@types/glTF.d.ts
vendored
Normal file
@ -0,0 +1,684 @@
|
||||
export type GlTfId = number;
|
||||
/**
|
||||
* Indices of those attributes that deviate from their initialization value.
|
||||
*/
|
||||
export interface AccessorSparseIndices {
|
||||
/**
|
||||
* The index of the bufferView with sparse indices. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
||||
*/
|
||||
'bufferView': GlTfId;
|
||||
/**
|
||||
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
||||
*/
|
||||
'byteOffset'?: number;
|
||||
/**
|
||||
* The indices data type.
|
||||
*/
|
||||
'componentType': 5121 | 5123 | 5125 | number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Array of size `accessor.sparse.count` times number of components storing the displaced accessor attributes pointed by `accessor.sparse.indices`.
|
||||
*/
|
||||
export interface AccessorSparseValues {
|
||||
/**
|
||||
* The index of the bufferView with sparse values. Referenced bufferView can't have ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target.
|
||||
*/
|
||||
'bufferView': GlTfId;
|
||||
/**
|
||||
* The offset relative to the start of the bufferView in bytes. Must be aligned.
|
||||
*/
|
||||
'byteOffset'?: number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Sparse storage of attributes that deviate from their initialization value.
|
||||
*/
|
||||
export interface AccessorSparse {
|
||||
/**
|
||||
* Number of entries stored in the sparse array.
|
||||
*/
|
||||
'count': number;
|
||||
/**
|
||||
* Index array of size `count` that points to those accessor attributes that deviate from their initialization value. Indices must strictly increase.
|
||||
*/
|
||||
'indices': AccessorSparseIndices;
|
||||
/**
|
||||
* Array of size `count` times number of components, storing the displaced accessor attributes pointed by `indices`. Substituted values must have the same `componentType` and number of components as the base accessor.
|
||||
*/
|
||||
'values': AccessorSparseValues;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A typed view into a bufferView. A bufferView contains raw binary data. An accessor provides a typed view into a bufferView or a subset of a bufferView similar to how WebGL's `vertexAttribPointer()` defines an attribute in a buffer.
|
||||
*/
|
||||
export interface Accessor {
|
||||
/**
|
||||
* The index of the bufferView.
|
||||
*/
|
||||
'bufferView'?: GlTfId;
|
||||
/**
|
||||
* The offset relative to the start of the bufferView in bytes.
|
||||
*/
|
||||
'byteOffset'?: number;
|
||||
/**
|
||||
* The datatype of components in the attribute.
|
||||
*/
|
||||
'componentType': 5120 | 5121 | 5122 | 5123 | 5125 | 5126 | number;
|
||||
/**
|
||||
* Specifies whether integer data values should be normalized.
|
||||
*/
|
||||
'normalized'?: boolean;
|
||||
/**
|
||||
* The number of attributes referenced by this accessor.
|
||||
*/
|
||||
'count': number;
|
||||
/**
|
||||
* Specifies if the attribute is a scalar, vector, or matrix.
|
||||
*/
|
||||
'type': 'SCALAR' | 'VEC2' | 'VEC3' | 'VEC4' | 'MAT2' | 'MAT3' | 'MAT4' | string;
|
||||
/**
|
||||
* Maximum value of each component in this attribute.
|
||||
*/
|
||||
'max'?: number[];
|
||||
/**
|
||||
* Minimum value of each component in this attribute.
|
||||
*/
|
||||
'min'?: number[];
|
||||
/**
|
||||
* Sparse storage of attributes that deviate from their initialization value.
|
||||
*/
|
||||
'sparse'?: AccessorSparse;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* The index of the node and TRS property that an animation channel targets.
|
||||
*/
|
||||
export interface AnimationChannelTarget {
|
||||
/**
|
||||
* The index of the node to target.
|
||||
*/
|
||||
'node'?: GlTfId;
|
||||
/**
|
||||
* The name of the node's TRS property to modify, or the "weights" of the Morph Targets it instantiates. For the "translation" property, the values that are provided by the sampler are the translation along the x, y, and z axes. For the "rotation" property, the values are a quaternion in the order (x, y, z, w), where w is the scalar. For the "scale" property, the values are the scaling factors along the x, y, and z axes.
|
||||
*/
|
||||
'path': 'translation' | 'rotation' | 'scale' | 'weights' | string;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Targets an animation's sampler at a node's property.
|
||||
*/
|
||||
export interface AnimationChannel {
|
||||
/**
|
||||
* The index of a sampler in this animation used to compute the value for the target.
|
||||
*/
|
||||
'sampler': GlTfId;
|
||||
/**
|
||||
* The index of the node and TRS property to target.
|
||||
*/
|
||||
'target': AnimationChannelTarget;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
||||
*/
|
||||
export interface AnimationSampler {
|
||||
/**
|
||||
* The index of an accessor containing keyframe input values, e.g., time.
|
||||
*/
|
||||
'input': GlTfId;
|
||||
/**
|
||||
* Interpolation algorithm.
|
||||
*/
|
||||
'interpolation'?: 'LINEAR' | 'STEP' | 'CUBICSPLINE' | string;
|
||||
/**
|
||||
* The index of an accessor, containing keyframe output values.
|
||||
*/
|
||||
'output': GlTfId;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A keyframe animation.
|
||||
*/
|
||||
export interface Animation {
|
||||
/**
|
||||
* An array of channels, each of which targets an animation's sampler at a node's property. Different channels of the same animation can't have equal targets.
|
||||
*/
|
||||
'channels': AnimationChannel[];
|
||||
/**
|
||||
* An array of samplers that combines input and output accessors with an interpolation algorithm to define a keyframe graph (but not its target).
|
||||
*/
|
||||
'samplers': AnimationSampler[];
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Metadata about the glTF asset.
|
||||
*/
|
||||
export interface Asset {
|
||||
/**
|
||||
* A copyright message suitable for display to credit the content creator.
|
||||
*/
|
||||
'copyright'?: string;
|
||||
/**
|
||||
* Tool that generated this glTF model. Useful for debugging.
|
||||
*/
|
||||
'generator'?: string;
|
||||
/**
|
||||
* The glTF version that this asset targets.
|
||||
*/
|
||||
'version': string;
|
||||
/**
|
||||
* The minimum glTF version that this asset targets.
|
||||
*/
|
||||
'minVersion'?: string;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A buffer points to binary geometry, animation, or skins.
|
||||
*/
|
||||
export interface Buffer {
|
||||
/**
|
||||
* The uri of the buffer.
|
||||
*/
|
||||
'uri'?: string;
|
||||
/**
|
||||
* The length of the buffer in bytes.
|
||||
*/
|
||||
'byteLength': number;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A view into a buffer generally representing a subset of the buffer.
|
||||
*/
|
||||
export interface BufferView {
|
||||
/**
|
||||
* The index of the buffer.
|
||||
*/
|
||||
'buffer': GlTfId;
|
||||
/**
|
||||
* The offset into the buffer in bytes.
|
||||
*/
|
||||
'byteOffset'?: number;
|
||||
/**
|
||||
* The length of the bufferView in bytes.
|
||||
*/
|
||||
'byteLength': number;
|
||||
/**
|
||||
* The stride, in bytes.
|
||||
*/
|
||||
'byteStride'?: number;
|
||||
/**
|
||||
* The target that the GPU buffer should be bound to.
|
||||
*/
|
||||
'target'?: 34962 | 34963 | number;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* An orthographic camera containing properties to create an orthographic projection matrix.
|
||||
*/
|
||||
export interface CameraOrthographic {
|
||||
/**
|
||||
* The floating-point horizontal magnification of the view. Must not be zero.
|
||||
*/
|
||||
'xmag': number;
|
||||
/**
|
||||
* The floating-point vertical magnification of the view. Must not be zero.
|
||||
*/
|
||||
'ymag': number;
|
||||
/**
|
||||
* The floating-point distance to the far clipping plane. `zfar` must be greater than `znear`.
|
||||
*/
|
||||
'zfar': number;
|
||||
/**
|
||||
* The floating-point distance to the near clipping plane.
|
||||
*/
|
||||
'znear': number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A perspective camera containing properties to create a perspective projection matrix.
|
||||
*/
|
||||
export interface CameraPerspective {
|
||||
/**
|
||||
* The floating-point aspect ratio of the field of view.
|
||||
*/
|
||||
'aspectRatio'?: number;
|
||||
/**
|
||||
* The floating-point vertical field of view in radians.
|
||||
*/
|
||||
'yfov': number;
|
||||
/**
|
||||
* The floating-point distance to the far clipping plane.
|
||||
*/
|
||||
'zfar'?: number;
|
||||
/**
|
||||
* The floating-point distance to the near clipping plane.
|
||||
*/
|
||||
'znear': number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A camera's projection. A node can reference a camera to apply a transform to place the camera in the scene.
|
||||
*/
|
||||
export interface Camera {
|
||||
/**
|
||||
* An orthographic camera containing properties to create an orthographic projection matrix.
|
||||
*/
|
||||
'orthographic'?: CameraOrthographic;
|
||||
/**
|
||||
* A perspective camera containing properties to create a perspective projection matrix.
|
||||
*/
|
||||
'perspective'?: CameraPerspective;
|
||||
/**
|
||||
* Specifies if the camera uses a perspective or orthographic projection.
|
||||
*/
|
||||
'type': 'perspective' | 'orthographic' | string;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Image data used to create a texture. Image can be referenced by URI or `bufferView` index. `mimeType` is required in the latter case.
|
||||
*/
|
||||
export interface Image {
|
||||
/**
|
||||
* The uri of the image.
|
||||
*/
|
||||
'uri'?: string;
|
||||
/**
|
||||
* The image's MIME type. Required if `bufferView` is defined.
|
||||
*/
|
||||
'mimeType'?: 'image/jpeg' | 'image/png' | string;
|
||||
/**
|
||||
* The index of the bufferView that contains the image. Use this instead of the image's uri property.
|
||||
*/
|
||||
'bufferView'?: GlTfId;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Reference to a texture.
|
||||
*/
|
||||
export interface TextureInfo {
|
||||
/**
|
||||
* The index of the texture.
|
||||
*/
|
||||
'index': GlTfId;
|
||||
/**
|
||||
* The set index of texture's TEXCOORD attribute used for texture coordinate mapping.
|
||||
*/
|
||||
'texCoord'?: number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.
|
||||
*/
|
||||
export interface MaterialPbrMetallicRoughness {
|
||||
/**
|
||||
* The material's base color factor.
|
||||
*/
|
||||
'baseColorFactor'?: number[];
|
||||
/**
|
||||
* The base color texture.
|
||||
*/
|
||||
'baseColorTexture'?: TextureInfo;
|
||||
/**
|
||||
* The metalness of the material.
|
||||
*/
|
||||
'metallicFactor'?: number;
|
||||
/**
|
||||
* The roughness of the material.
|
||||
*/
|
||||
'roughnessFactor'?: number;
|
||||
/**
|
||||
* The metallic-roughness texture.
|
||||
*/
|
||||
'metallicRoughnessTexture'?: TextureInfo;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface MaterialNormalTextureInfo {
|
||||
'index'?: any;
|
||||
'texCoord'?: any;
|
||||
/**
|
||||
* The scalar multiplier applied to each normal vector of the normal texture.
|
||||
*/
|
||||
'scale'?: number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
export interface MaterialOcclusionTextureInfo {
|
||||
'index'?: any;
|
||||
'texCoord'?: any;
|
||||
/**
|
||||
* A scalar multiplier controlling the amount of occlusion applied.
|
||||
*/
|
||||
'strength'?: number;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* The material appearance of a primitive.
|
||||
*/
|
||||
export interface Material {
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
/**
|
||||
* A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology. When not specified, all the default values of `pbrMetallicRoughness` apply.
|
||||
*/
|
||||
'pbrMetallicRoughness'?: MaterialPbrMetallicRoughness;
|
||||
/**
|
||||
* The normal map texture.
|
||||
*/
|
||||
'normalTexture'?: MaterialNormalTextureInfo;
|
||||
/**
|
||||
* The occlusion map texture.
|
||||
*/
|
||||
'occlusionTexture'?: MaterialOcclusionTextureInfo;
|
||||
/**
|
||||
* The emissive map texture.
|
||||
*/
|
||||
'emissiveTexture'?: TextureInfo;
|
||||
/**
|
||||
* The emissive color of the material.
|
||||
*/
|
||||
'emissiveFactor'?: number[];
|
||||
/**
|
||||
* The alpha rendering mode of the material.
|
||||
*/
|
||||
'alphaMode'?: 'OPAQUE' | 'MASK' | 'BLEND' | string;
|
||||
/**
|
||||
* The alpha cutoff value of the material.
|
||||
*/
|
||||
'alphaCutoff'?: number;
|
||||
/**
|
||||
* Specifies whether the material is double sided.
|
||||
*/
|
||||
'doubleSided'?: boolean;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Geometry to be rendered with the given material.
|
||||
*/
|
||||
export interface MeshPrimitive {
|
||||
/**
|
||||
* A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
|
||||
*/
|
||||
'attributes': {
|
||||
[k: string]: GlTfId;
|
||||
};
|
||||
/**
|
||||
* The index of the accessor that contains the indices.
|
||||
*/
|
||||
'indices'?: GlTfId;
|
||||
/**
|
||||
* The index of the material to apply to this primitive when rendering.
|
||||
*/
|
||||
'material'?: GlTfId;
|
||||
/**
|
||||
* The type of primitives to render.
|
||||
*/
|
||||
'mode'?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | number;
|
||||
/**
|
||||
* An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only `POSITION`, `NORMAL`, and `TANGENT` supported) to their deviations in the Morph Target.
|
||||
*/
|
||||
'targets'?: {
|
||||
[k: string]: GlTfId;
|
||||
}[];
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A set of primitives to be rendered. A node can contain one mesh. A node's transform places the mesh in the scene.
|
||||
*/
|
||||
export interface Mesh {
|
||||
/**
|
||||
* An array of primitives, each defining geometry to be rendered with a material.
|
||||
*/
|
||||
'primitives': MeshPrimitive[];
|
||||
/**
|
||||
* Array of weights to be applied to the Morph Targets.
|
||||
*/
|
||||
'weights'?: number[];
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A node in the node hierarchy. When the node contains `skin`, all `mesh.primitives` must contain `JOINTS_0` and `WEIGHTS_0` attributes. A node can have either a `matrix` or any combination of `translation`/`rotation`/`scale` (TRS) properties. TRS properties are converted to matrices and postmultiplied in the `T * R * S` order to compose the transformation matrix; first the scale is applied to the vertices, then the rotation, and then the translation. If none are provided, the transform is the identity. When a node is targeted for animation (referenced by an animation.channel.target), only TRS properties may be present; `matrix` will not be present.
|
||||
*/
|
||||
export interface Node {
|
||||
/**
|
||||
* The index of the camera referenced by this node.
|
||||
*/
|
||||
'camera'?: GlTfId;
|
||||
/**
|
||||
* The indices of this node's children.
|
||||
*/
|
||||
'children'?: GlTfId[];
|
||||
/**
|
||||
* The index of the skin referenced by this node.
|
||||
*/
|
||||
'skin'?: GlTfId;
|
||||
/**
|
||||
* A floating-point 4x4 transformation matrix stored in column-major order.
|
||||
*/
|
||||
'matrix'?: number[];
|
||||
/**
|
||||
* The index of the mesh in this node.
|
||||
*/
|
||||
'mesh'?: GlTfId;
|
||||
/**
|
||||
* The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.
|
||||
*/
|
||||
'rotation'?: number[];
|
||||
/**
|
||||
* The node's non-uniform scale, given as the scaling factors along the x, y, and z axes.
|
||||
*/
|
||||
'scale'?: number[];
|
||||
/**
|
||||
* The node's translation along the x, y, and z axes.
|
||||
*/
|
||||
'translation'?: number[];
|
||||
/**
|
||||
* The weights of the instantiated Morph Target. Number of elements must match number of Morph Targets of used mesh.
|
||||
*/
|
||||
'weights'?: number[];
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Texture sampler properties for filtering and wrapping modes.
|
||||
*/
|
||||
export interface Sampler {
|
||||
/**
|
||||
* Magnification filter.
|
||||
*/
|
||||
'magFilter'?: 9728 | 9729 | number;
|
||||
/**
|
||||
* Minification filter.
|
||||
*/
|
||||
'minFilter'?: 9728 | 9729 | 9984 | 9985 | 9986 | 9987 | number;
|
||||
/**
|
||||
* s wrapping mode.
|
||||
*/
|
||||
'wrapS'?: 33071 | 33648 | 10497 | number;
|
||||
/**
|
||||
* t wrapping mode.
|
||||
*/
|
||||
'wrapT'?: 33071 | 33648 | 10497 | number;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* The root nodes of a scene.
|
||||
*/
|
||||
export interface Scene {
|
||||
/**
|
||||
* The indices of each root node.
|
||||
*/
|
||||
'nodes'?: GlTfId[];
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* Joints and matrices defining a skin.
|
||||
*/
|
||||
export interface Skin {
|
||||
/**
|
||||
* The index of the accessor containing the floating-point 4x4 inverse-bind matrices. The default is that each matrix is a 4x4 identity matrix, which implies that inverse-bind matrices were pre-applied.
|
||||
*/
|
||||
'inverseBindMatrices'?: GlTfId;
|
||||
/**
|
||||
* The index of the node used as a skeleton root. When undefined, joints transforms resolve to scene root.
|
||||
*/
|
||||
'skeleton'?: GlTfId;
|
||||
/**
|
||||
* Indices of skeleton nodes, used as joints in this skin.
|
||||
*/
|
||||
'joints': GlTfId[];
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* A texture and its sampler.
|
||||
*/
|
||||
export interface Texture {
|
||||
/**
|
||||
* The index of the sampler used by this texture. When undefined, a sampler with repeat wrapping and auto filtering should be used.
|
||||
*/
|
||||
'sampler'?: GlTfId;
|
||||
/**
|
||||
* The index of the image used by this texture.
|
||||
*/
|
||||
'source'?: GlTfId;
|
||||
'name'?: any;
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
||||
/**
|
||||
* The root object for a glTF asset.
|
||||
*/
|
||||
export interface GlTf {
|
||||
/**
|
||||
* Names of glTF extensions used somewhere in this asset.
|
||||
*/
|
||||
'extensionsUsed'?: string[];
|
||||
/**
|
||||
* Names of glTF extensions required to properly load this asset.
|
||||
*/
|
||||
'extensionsRequired'?: string[];
|
||||
/**
|
||||
* An array of accessors.
|
||||
*/
|
||||
'accessors'?: Accessor[];
|
||||
/**
|
||||
* An array of keyframe animations.
|
||||
*/
|
||||
'animations'?: Animation[];
|
||||
/**
|
||||
* Metadata about the glTF asset.
|
||||
*/
|
||||
'asset': Asset;
|
||||
/**
|
||||
* An array of buffers.
|
||||
*/
|
||||
'buffers'?: Buffer[];
|
||||
/**
|
||||
* An array of bufferViews.
|
||||
*/
|
||||
'bufferViews'?: BufferView[];
|
||||
/**
|
||||
* An array of cameras.
|
||||
*/
|
||||
'cameras'?: Camera[];
|
||||
/**
|
||||
* An array of images.
|
||||
*/
|
||||
'images'?: Image[];
|
||||
/**
|
||||
* An array of materials.
|
||||
*/
|
||||
'materials'?: Material[];
|
||||
/**
|
||||
* An array of meshes.
|
||||
*/
|
||||
'meshes'?: Mesh[];
|
||||
/**
|
||||
* An array of nodes.
|
||||
*/
|
||||
'nodes'?: Node[];
|
||||
/**
|
||||
* An array of samplers.
|
||||
*/
|
||||
'samplers'?: Sampler[];
|
||||
/**
|
||||
* The index of the default scene.
|
||||
*/
|
||||
'scene'?: GlTfId;
|
||||
/**
|
||||
* An array of scenes.
|
||||
*/
|
||||
'scenes'?: Scene[];
|
||||
/**
|
||||
* An array of skins.
|
||||
*/
|
||||
'skins'?: Skin[];
|
||||
/**
|
||||
* An array of textures.
|
||||
*/
|
||||
'textures'?: Texture[];
|
||||
'extensions'?: any;
|
||||
'extras'?: any;
|
||||
[k: string]: any;
|
||||
}
|
109
extensions/uistate-inspector/@types/packages/engine-extends/@types/gltf-validator.d.ts
vendored
Normal file
109
extensions/uistate-inspector/@types/packages/engine-extends/@types/gltf-validator.d.ts
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
|
||||
declare module 'gltf-validator' {
|
||||
/**
|
||||
* Returns a version string.
|
||||
*/
|
||||
export const version: string;
|
||||
|
||||
/**
|
||||
* Returns an array of supported extensions names.
|
||||
*/
|
||||
export const supportedExtensions: string[];
|
||||
|
||||
/**
|
||||
* @param uri Relative URI of the external resource.
|
||||
* @returns Promise with Uint8Array data.
|
||||
*/
|
||||
export type ExternalResourceFunction = (uri: string) => Promise<Uint8Array>;
|
||||
|
||||
export interface ValidationOptions {
|
||||
/**
|
||||
* Absolute or relative asset URI that will be copied to validation report.
|
||||
*/
|
||||
uri?: string;
|
||||
|
||||
/**
|
||||
* Max number of reported issues. Use 0 for unlimited output.
|
||||
*/
|
||||
maxIssues?: number;
|
||||
|
||||
/**
|
||||
* Array of ignored issue codes.
|
||||
*/
|
||||
ignoredIssues?: string[];
|
||||
|
||||
/**
|
||||
* Object with overridden severities for issue codes.
|
||||
*/
|
||||
severityOverrides?: {
|
||||
[x: string]: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function for loading external resources. If omitted, external resources are not validated.
|
||||
*/
|
||||
externalResourceFunction?: ExternalResourceFunction;
|
||||
|
||||
/**
|
||||
* Set to false to skip reading of accessor data.
|
||||
*/
|
||||
validateAccessorData?: boolean;
|
||||
}
|
||||
|
||||
export interface Resource {
|
||||
pointer: string;
|
||||
mimeType: string;
|
||||
storage: string;
|
||||
uri: string;
|
||||
}
|
||||
|
||||
export interface Report {
|
||||
uri: string;
|
||||
mimeType: string;
|
||||
validatorVersion: string;
|
||||
validatedAt: string;
|
||||
issues: {
|
||||
numErrors: number;
|
||||
numWarnings: number;
|
||||
numInfos: number;
|
||||
numHints: number;
|
||||
messages: Array<{
|
||||
code: string;
|
||||
message: string;
|
||||
pointer: string;
|
||||
severity: number;
|
||||
}>;
|
||||
truncated: boolean;
|
||||
};
|
||||
info: {
|
||||
version: string;
|
||||
generator: string;
|
||||
resources: Array<{
|
||||
pointer: string;
|
||||
mimeType: string;
|
||||
storage: string;
|
||||
uri: string;
|
||||
}>;
|
||||
hasAnimations: boolean;
|
||||
hasMaterials: boolean;
|
||||
hasMorphTargets: boolean;
|
||||
hasSkins: boolean;
|
||||
hasTextures: boolean;
|
||||
hasDefaultScene: boolean;
|
||||
primitivesCount: number;
|
||||
maxAttributesUsed: number;
|
||||
};
|
||||
}
|
||||
|
||||
export function validateBytes(data: Uint8Array, options?: ValidationOptions): Promise<Report>;
|
||||
|
||||
export function validateString(json: string, options?: ValidationOptions): Promise<Report>;
|
||||
|
||||
export const enum Severity {
|
||||
Error = 0,
|
||||
|
||||
Warning = 1,
|
||||
|
||||
Information = 2,
|
||||
}
|
||||
}
|
811
extensions/uistate-inspector/@types/packages/engine-extends/@types/i18n-well-defined.d.ts
vendored
Normal file
811
extensions/uistate-inspector/@types/packages/engine-extends/@types/i18n-well-defined.d.ts
vendored
Normal file
@ -0,0 +1,811 @@
|
||||
declare module '@base/electron-i18n' {
|
||||
export function translation(key: string, language?: any): string;
|
||||
}
|
||||
|
||||
declare interface I18NWellDefinedDictionary {
|
||||
['about.title']: [];
|
||||
['about.editor']: [];
|
||||
['about.engine']: [];
|
||||
['about.version']: [];
|
||||
['animator.title']: [];
|
||||
['animator.loading.wait_scene_ready']: [];
|
||||
['animator.loading.init_animation_data']: [];
|
||||
['animator.mask.need_select_node']: [];
|
||||
['animator.mask.need_animation_component']: [];
|
||||
['animator.mask.need_animation_clip']: [];
|
||||
['animator.mask.enter_animation_mode']: [];
|
||||
['animator.mask.add_animation_component']: [];
|
||||
['animator.mask.add_animation_clip']: [];
|
||||
['animator.toolbar.exit']: [];
|
||||
['animator.toolbar.setting']: [];
|
||||
['animator.toolbar.order']: [];
|
||||
['animator.toolbar.jump_first_frame']: [];
|
||||
['animator.toolbar.jump_prev_frame']: [];
|
||||
['animator.toolbar.play_animation']: [];
|
||||
['animator.toolbar.stop_animation']: [];
|
||||
['animator.toolbar.pause_animation']: [];
|
||||
['animator.toolbar.jump_next_frame']: [];
|
||||
['animator.toolbar.jump_last_frame']: [];
|
||||
['animator.toolbar.insert_event']: [];
|
||||
['animator.toolbar.save_clip']: [];
|
||||
['animator.property.title']: [];
|
||||
['animator.property.create_prop']: [];
|
||||
['animator.property.remove_prop']: [];
|
||||
['animator.property.clear_keys']: [];
|
||||
['animator.property.create_key']: [];
|
||||
['animator.property.remove_key']: [];
|
||||
['animator.property.copy_key']: [];
|
||||
['animator.property.paste_key']: [];
|
||||
['animator.property.spacing_key']: [];
|
||||
['animator.property.spacing_frame']: [];
|
||||
['animator.event.title']: [];
|
||||
['animator.event.add_func']: [];
|
||||
['animator.event.del_func']: [];
|
||||
['animator.event.add_params']: [];
|
||||
['animator.event.del_params']: [];
|
||||
['animator.event.clear_params']: [];
|
||||
['animator.event.create']: [];
|
||||
['animator.event.paste']: [];
|
||||
['animator.bezier.title']: [];
|
||||
['animator.bezier.click_to_apply']: [];
|
||||
['animator.node.title']: [];
|
||||
['animator.node.move_data']: [];
|
||||
['animator.node.move_data_to']: [];
|
||||
['animator.node.clear_data']: [];
|
||||
['animator.preview_row.line_tips']: [];
|
||||
['animator.preview_row.open_curve_editor']: [];
|
||||
['animator.preview_row.asset_type_should_be']: [];
|
||||
['animator.preview_row.asset_position_tips']: [];
|
||||
['animator.is_save']: [];
|
||||
['animator.is_save_message']: [];
|
||||
['animator.is_paste_overwrite']: [];
|
||||
['animator.is_paste_overwrite_message']: [];
|
||||
['animator.overwrite']: [];
|
||||
['animator.is_clear']: [];
|
||||
['animator.is_clear_message']: [];
|
||||
['animator.is_move_data']: [];
|
||||
['animator.is_move_data_message']: [];
|
||||
['animator.is_remove_prop.title']: [];
|
||||
['animator.is_remove_prop.message']: [];
|
||||
['animator.is_remove_prop.remove']: [];
|
||||
['animator.is_clear_prop.title']: [];
|
||||
['animator.is_clear_prop.message']: [];
|
||||
['animator.is_clear_prop.remove']: [];
|
||||
['animator.move']: [];
|
||||
['animator.clear']: [];
|
||||
['animator.copy']: [];
|
||||
['animator.paste']: [];
|
||||
['animator.save']: [];
|
||||
['animator.abort']: [];
|
||||
['animator.cancel']: [];
|
||||
['animator.edit']: [];
|
||||
['animator.delete']: [];
|
||||
['animator.toolbar.spacing_frame']: [];
|
||||
['asset-db.mask.startup']: [];
|
||||
['asset-db.mask.loading']: [];
|
||||
['asset-db.debug-mode']: [];
|
||||
['asset-db.operate.dialogError']: [];
|
||||
['asset-db.operate.dialogWarning']: [];
|
||||
['asset-db.operate.dialogQuestion']: [];
|
||||
['asset-db.operate.dialogInfo']: [];
|
||||
['asset-db.fail.readonly']: [];
|
||||
['asset-db.createAsset.fail.unknown']: [];
|
||||
['asset-db.createAsset.fail.url']: [];
|
||||
['asset-db.createAsset.fail.exist']: [];
|
||||
['asset-db.createAsset.fail.drop']: [];
|
||||
['asset-db.createAsset.fail.toUrl']: [];
|
||||
['asset-db.createAsset.fail.uuid']: [];
|
||||
['asset-db.createAsset.fail.content']: [];
|
||||
['asset-db.createAsset.fail.readonly']: [];
|
||||
['asset-db.createAsset.warn.overwrite']: [];
|
||||
['asset-db.dropAsset.overwrite']: [];
|
||||
['asset-db.dropAsset.reserve']: [];
|
||||
['asset-db.dropAsset.fail.unknown']: [];
|
||||
['asset-db.dropAsset.fail.url']: [];
|
||||
['asset-db.dropAsset.fail.filepaths']: [];
|
||||
['asset-db.dropAsset.fail.readonly']: [];
|
||||
['asset-db.dropAsset.warn.overwrite']: [];
|
||||
['asset-db.dropAsset.warn.sameway']: [];
|
||||
['asset-db.saveAsset.fail.unknown']: [];
|
||||
['asset-db.saveAsset.fail.uuid']: [];
|
||||
['asset-db.saveAsset.fail.content']: [];
|
||||
['asset-db.saveAsset.fail.readonly']: [];
|
||||
['asset-db.saveAssetMeta.fail.unknown']: [];
|
||||
['asset-db.saveAssetMeta.fail.uuid']: [];
|
||||
['asset-db.saveAssetMeta.fail.content']: [];
|
||||
['asset-db.saveAssetMeta.fail.readonly']: [];
|
||||
['asset-db.copyAsset.fail.unknown']: [];
|
||||
['asset-db.copyAsset.fail.url']: [];
|
||||
['asset-db.copyAsset.fail.source']: [];
|
||||
['asset-db.copyAsset.fail.target']: [];
|
||||
['asset-db.copyAsset.fail.include']: [];
|
||||
['asset-db.copyAsset.fail.parent']: [];
|
||||
['asset-db.copyAsset.fail.readonly']: [];
|
||||
['asset-db.copyAsset.fail.metauuid']: [];
|
||||
['asset-db.moveAsset.fail.unknown']: [];
|
||||
['asset-db.moveAsset.fail.url']: [];
|
||||
['asset-db.moveAsset.fail.source']: [];
|
||||
['asset-db.moveAsset.fail.target']: [];
|
||||
['asset-db.moveAsset.fail.exist']: [];
|
||||
['asset-db.moveAsset.fail.include']: [];
|
||||
['asset-db.moveAsset.fail.parent']: [];
|
||||
['asset-db.moveAsset.fail.readonly_source']: [];
|
||||
['asset-db.moveAsset.fail.readonly']: [];
|
||||
['asset-db.moveAsset.warn.overwrite']: [];
|
||||
['asset-db.deleteAsset.fail.unknown']: [];
|
||||
['asset-db.deleteAsset.fail.url']: [];
|
||||
['asset-db.deleteAsset.fail.unexist']: [];
|
||||
['asset-db.deleteAsset.fail.readonly']: [];
|
||||
['asset-db.preferences.log_level']: [];
|
||||
['asset-db.preferences.log_level_debug']: [];
|
||||
['asset-db.preferences.log_level_log']: [];
|
||||
['asset-db.preferences.log_level_warn']: [];
|
||||
['asset-db.preferences.log_level_error']: [];
|
||||
['asset-db.importers.glTF.glTF_asset_group_mesh']: [];
|
||||
['asset-db.importers.glTF.glTF_asset_group_animation']: [];
|
||||
['asset-db.importers.glTF.glTF_asset_group_node']: [];
|
||||
['asset-db.importers.glTF.glTF_asset_group_skin']: [];
|
||||
['asset-db.importers.glTF.glTF_asset_group_sampler']: [];
|
||||
['asset-db.importers.glTF.glTF_asset']: [{
|
||||
group: any;
|
||||
index: any;
|
||||
name: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.glTF_asset_no_name']: [{
|
||||
group: any;
|
||||
index: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.unsupported_alpha_mode']: [{
|
||||
material: any;
|
||||
mode: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.unsupported_texture_parameter']: [{
|
||||
texture: any;
|
||||
sampler: any;
|
||||
type: any;
|
||||
value: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.texture_parameter_min_filter']: [];
|
||||
['asset-db.importers.glTF.texture_parameter_mag_filter']: [];
|
||||
['asset-db.importers.glTF.unsupported_channel_path']: [{
|
||||
animation: any;
|
||||
channel: any;
|
||||
path: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.reference_skin_in_different_scene']: [{
|
||||
node: any;
|
||||
skin: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.disallow_cubic_spline_channel_split']: [{
|
||||
animation: any;
|
||||
channel: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.failed_to_calculate_tangents_due_to_lack_of_normals']: [{
|
||||
mesh: any;
|
||||
primitive: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.failed_to_calculate_tangents_due_to_lack_of_uvs']: [{
|
||||
mesh: any;
|
||||
primitive: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.failed_to_load_image']: [{
|
||||
url: any;
|
||||
reason: any;
|
||||
}];
|
||||
['asset-db.importers.glTF.image_uri_should_be_file_url']: [];
|
||||
['asset-db.importers.glTF.failed_to_convert_tga']: [];
|
||||
['asset-db.importers.fbx.failed_to_convert_fbx_file']: [{
|
||||
path: any;
|
||||
}];
|
||||
['asset-db.importers.fbx.no_available_fbx_temp_dir']: [];
|
||||
['asset-db.importers.fbx.fbx2glTF_exists_with_non_zero_code']: [{
|
||||
code: any;
|
||||
output: any;
|
||||
}];
|
||||
['asset-db.importers.javascript.transform_failure']: [{
|
||||
path: any;
|
||||
reason: any;
|
||||
}];
|
||||
['assets.title']: [];
|
||||
['assets.previewTitle']: [];
|
||||
['assets.menu.createMenu']: [];
|
||||
['assets.menu.searchPlaceholder_name']: [];
|
||||
['assets.menu.searchPlaceholder_uuid']: [];
|
||||
['assets.menu.searchPlaceholder_type']: [];
|
||||
['assets.menu.searchTip']: [];
|
||||
['assets.menu.search']: [];
|
||||
['assets.menu.searchName']: [];
|
||||
['assets.menu.searchUuid']: [];
|
||||
['assets.menu.searchType']: [];
|
||||
['assets.menu.sort']: [];
|
||||
['assets.menu.sortName']: [];
|
||||
['assets.menu.sortType']: [];
|
||||
['assets.menu.refresh']: [];
|
||||
['assets.menu.allExpand']: [];
|
||||
['assets.menu.allCollapse']: [];
|
||||
['assets.menu.new']: [];
|
||||
['assets.menu.newFolder']: [];
|
||||
['assets.menu.newJavaScript']: [];
|
||||
['assets.menu.newTypeScript']: [];
|
||||
['assets.menu.newCubeMap']: [];
|
||||
['assets.menu.newScene']: [];
|
||||
['assets.menu.newMaterial']: [];
|
||||
['assets.menu.newPhysicsMaterial']: [];
|
||||
['assets.menu.newEffect']: [];
|
||||
['assets.menu.newChunk']: [];
|
||||
['assets.menu.newAnimation']: [];
|
||||
['assets.menu.renderPipeline']: [];
|
||||
['assets.menu.forwardPipeline']: [];
|
||||
['assets.menu.renderPipelineTS']: [];
|
||||
['assets.menu.RenderFlowTS']: [];
|
||||
['assets.menu.RenderStageTS']: [];
|
||||
['assets.menu.newPac']: [];
|
||||
['assets.menu.newTerrain']: [];
|
||||
['assets.menu.copy']: [];
|
||||
['assets.menu.cut']: [];
|
||||
['assets.menu.paste']: [];
|
||||
['assets.menu.delete']: [];
|
||||
['assets.menu.rename']: [];
|
||||
['assets.menu.selectall']: [];
|
||||
['assets.menu.readonly']: [];
|
||||
['assets.menu.revealInlibrary']: [];
|
||||
['assets.menu.reimport']: [];
|
||||
['assets.menu.revealInExplorer']: [];
|
||||
['assets.menu.showUuid']: [];
|
||||
['assets.menu.recommendTS']: [];
|
||||
['assets.operate.cutReady']: [];
|
||||
['assets.operate.cutDone']: [];
|
||||
['assets.operate.copyReady']: [];
|
||||
['assets.operate.copyDone']: [];
|
||||
['assets.operate.dialogError']: [];
|
||||
['assets.operate.dialogWarning']: [];
|
||||
['assets.operate.dialogQuestion']: [];
|
||||
['assets.operate.dialogInfo']: [];
|
||||
['assets.operate.refreshing']: [];
|
||||
['assets.operate.assetDataError']: [];
|
||||
['assets.operate.sureDelete']: [{
|
||||
length: any;
|
||||
filelist: any;
|
||||
}];
|
||||
['assets.operate.renameFail']: [];
|
||||
['assets.operate.pasteFail_parent_into_child']: [];
|
||||
['assets.operate.refreshFail']: [];
|
||||
['assets.operate.readDefaultFileFail']: [];
|
||||
['assets.operate.errorNewnameDuplicate']: [];
|
||||
['assets.operate.errorNewnameUnlegal']: [];
|
||||
['assets.operate.errorNewnameEmpty']: [];
|
||||
['assets.operate.errorScriptName']: [];
|
||||
['assets.operate.errorScriptClassName']: [];
|
||||
['assets.deprecate.fire']: [];
|
||||
['builder.title']: [];
|
||||
['builder.create_user_template']: [];
|
||||
['builder.build_config']: [];
|
||||
['builder.build']: [];
|
||||
['builder.compile']: [];
|
||||
['builder.select_all']: [];
|
||||
['builder.open_compile_file']: [];
|
||||
['builder.source_map']: [];
|
||||
['builder.recompile_engine']: [];
|
||||
['builder.debug_mode']: [];
|
||||
['builder.web_debugger']: [];
|
||||
['builder.require']: [];
|
||||
['builder.new_build_task']: [];
|
||||
['builder.empty_task_holder']: [];
|
||||
['builder.empty_scene']: [];
|
||||
['builder.reveal_in_explorer']: [];
|
||||
['builder.view_build_config']: [];
|
||||
['builder.recompile']: [];
|
||||
['builder.compress_texture']: [];
|
||||
['builder.pack_autoAtlas']: [];
|
||||
['builder.replace_splash_screen']: [];
|
||||
['builder.run']: [];
|
||||
['builder.open']: [];
|
||||
['builder.export']: [];
|
||||
['builder.import']: [];
|
||||
['builder.export_build_config']: [];
|
||||
['builder.import_build_config']: [];
|
||||
['builder.include_project_setting']: [];
|
||||
['builder.only_build_panel']: [];
|
||||
['builder.options.taskName']: [];
|
||||
['builder.options.name']: [];
|
||||
['builder.options.platform']: [];
|
||||
['builder.options.build_path']: [];
|
||||
['builder.options.start_scene']: [];
|
||||
['builder.options.inline_SpriteFrames']: [];
|
||||
['builder.options.merge_json_by_scene']: [];
|
||||
['builder.options.merge_start_scene']: [];
|
||||
['builder.options.orientation']: [];
|
||||
['builder.options.scenes']: [];
|
||||
['builder.options.debug']: [];
|
||||
['builder.options.resolution']: [];
|
||||
['builder.options.preview_url']: [];
|
||||
['builder.options.source_map']: [];
|
||||
['builder.options.force_combile_engine']: [];
|
||||
['builder.options.web_debugger']: [];
|
||||
['builder.options.compress_texture']: [];
|
||||
['builder.options.pack_autoAtlas']: [];
|
||||
['builder.package']: [];
|
||||
['builder.package_hint']: [];
|
||||
['builder.desktop_icon']: [];
|
||||
['builder.desktop_icon_hint']: [];
|
||||
['builder.version_name']: [];
|
||||
['builder.version_name_hint']: [];
|
||||
['builder.version_number']: [];
|
||||
['builder.version_number_hint']: [];
|
||||
['builder.support_min_platform']: [];
|
||||
['builder.support_min_platform_hint']: [];
|
||||
['builder.full_screen']: [];
|
||||
['builder.screen_orientation']: [];
|
||||
['builder.landscape']: [];
|
||||
['builder.portrait']: [];
|
||||
['builder.tiny_packet_mode']: [];
|
||||
['builder.tiny_packet_path']: [];
|
||||
['builder.tiny_packet_path_hint']: [];
|
||||
['builder.keystore']: [];
|
||||
['builder.use_debug_keystore']: [];
|
||||
['builder.private_pem_path']: [];
|
||||
['builder.private_pem_path_hint']: [];
|
||||
['builder.certificate_pem_path']: [];
|
||||
['builder.certificate_pem_path_hint']: [];
|
||||
['builder.print_finger']: [];
|
||||
['builder.pack_res_to_first_pack']: [];
|
||||
['builder.custom_npm_path']: [];
|
||||
['builder.custom_npm_path_hint']: [];
|
||||
['builder.custom_manifest_data']: [];
|
||||
['builder.custom_manifest_data_error']: [];
|
||||
['builder.remote_url']: [];
|
||||
['builder.not_install_nodejs_windows_error']: [];
|
||||
['builder.not_install_nodejs_mac_error']: [];
|
||||
['builder.rpk_installing']: [];
|
||||
['builder.rpk_install_fail']: [];
|
||||
['builder.rpk_install_success']: [];
|
||||
['builder.not_mainfest_data']: [];
|
||||
['builder.npm_installed_success']: [];
|
||||
['builder.npm_install_fail']: [];
|
||||
['builder.oppo.new']: [];
|
||||
['builder.oppo.not_empty']: [];
|
||||
['builder.oppo.icon_not_exist']: [];
|
||||
['builder.oppo.signature_not_exist']: [];
|
||||
['builder.oppo.private_pem_path_error']: [];
|
||||
['builder.oppo.certificate_pem_path_error']: [];
|
||||
['builder.certificate.country']: [];
|
||||
['builder.certificate.state']: [];
|
||||
['builder.certificate.locality']: [];
|
||||
['builder.certificate.organization']: [];
|
||||
['builder.certificate.organizationalUnit']: [];
|
||||
['builder.certificate.commonName']: [];
|
||||
['builder.certificate.email']: [];
|
||||
['builder.certificate.certificatePath']: [];
|
||||
['builder.certificate.generate']: [];
|
||||
['builder.certificate.build_certificate_complete']: [];
|
||||
['builder.certificate.build_certificate_fail']: [];
|
||||
['builder.huawei.select_certificate_path']: [];
|
||||
['builder.huawei.install_nodejs_before_view_certificate']: [];
|
||||
['builder.huawei.select_certificate_path_after_view_certificate']: [];
|
||||
['builder.huawei.certificate_fingerprint']: [];
|
||||
['builder.huawei.certificate_fingerprint_error']: [];
|
||||
['builder.huawei.use_native_renderer']: [];
|
||||
['builder.wechat_game.separate_engine']: [];
|
||||
['builder.wechat_game.separate_engine_tips']: [];
|
||||
['builder.wechat_game.client_path_error']: [{
|
||||
path: any;
|
||||
}];
|
||||
['builder.wechat_game.client_info_path_err']: [{
|
||||
path: any;
|
||||
}];
|
||||
['builder.wechat_game.client_version_low']: [];
|
||||
['builder.wechat_game.remote_server_address']: [];
|
||||
['builder.wechat_game.remote_server_address_tips']: [];
|
||||
['builder.wechat_game.sub_context']: [];
|
||||
['builder.wechat_game.sub_context_tips']: [];
|
||||
['builder.wechat_game.build_sub']: [];
|
||||
['builder.wechat_game.build_sub_tips']: [];
|
||||
['builder.wechat_game.wechatgame_app_path_empty']: [];
|
||||
['builder.error.build_error']: [];
|
||||
['builder.error.dirty_info']: [];
|
||||
['builder.error.build_dir_not_exists']: [{
|
||||
buildDir: any;
|
||||
}];
|
||||
['builder.error.build_path_contains_space']: [];
|
||||
['builder.error.build_path_contains_chinese']: [];
|
||||
['builder.error.can_not_empty']: [];
|
||||
['builder.error.project_name_not_legal']: [];
|
||||
['builder.error.package_name_not_legal']: [];
|
||||
['builder.error.package_name_start_with_number']: [];
|
||||
['builder.error.select_scenes_to_build']: [];
|
||||
['builder.error.binary_api_level']: [];
|
||||
['builder.error.path_too_long_title']: [];
|
||||
['builder.error.path_too_long_desc']: [{
|
||||
max_length: any;
|
||||
}];
|
||||
['builder.error.keep_raw_texture_of_atlas']: [{
|
||||
texturePath: any;
|
||||
pacPath: any;
|
||||
assetPath: any;
|
||||
}];
|
||||
['builder.error.arm64_not_support']: [{
|
||||
current_api: any;
|
||||
min_version: any;
|
||||
}];
|
||||
['builder.warn.same_url']: [];
|
||||
['builder.tasks.build_asset']: [];
|
||||
['builder.tasks.build_engine']: [];
|
||||
['builder.tasks.build_img']: [];
|
||||
['builder.tasks.build_json']: [];
|
||||
['builder.tasks.build_atlas']: [];
|
||||
['builder.tasks.build_script']: [];
|
||||
['builder.tasks.build_suffix']: [];
|
||||
['builder.tasks.build_template']: [];
|
||||
['builder.tasks.load_script']: [];
|
||||
['builder.tasks.sort_asset']: [];
|
||||
['builder.tasks.sort_image']: [];
|
||||
['builder.tasks.sort_script']: [];
|
||||
['builder.tasks.sort_sprite_frame']: [];
|
||||
['builder.tasks.sort_texture']: [];
|
||||
['builder.tasks.sort_json']: [];
|
||||
['builder.tasks.settings.compress']: [];
|
||||
['builder.tasks.settings.design_resolution']: [];
|
||||
['builder.tasks.settings.group']: [];
|
||||
['builder.tasks.settings.md5']: [];
|
||||
['builder.tasks.settings.scene']: [];
|
||||
['builder.tasks.settings.script']: [];
|
||||
['builder.tips.enter_name']: [];
|
||||
['builder.tips.taskName']: [];
|
||||
['builder.tips.build_path']: [];
|
||||
['builder.tips.build_scenes']: [];
|
||||
['builder.tips.inline_SpriteFrames']: [];
|
||||
['builder.tips.md5Cache']: [];
|
||||
['builder.tips.merge_start_scene']: [];
|
||||
['builder.tips.debug']: [];
|
||||
['builder.tips.resolution']: [];
|
||||
['builder.tips.web_debugger']: [];
|
||||
['builder.tips.creat_template_success']: [];
|
||||
['builder.tips.set_start_scene']: [];
|
||||
['builder.splash_setting.title']: [];
|
||||
['builder.splash_setting.drag_img_here']: [];
|
||||
['builder.splash_setting.img_loading']: [];
|
||||
['builder.splash_setting.confirm']: [];
|
||||
['builder.splash_setting.settings.total_time']: [];
|
||||
['builder.splash_setting.settings.display_ratio']: [];
|
||||
['builder.splash_setting.settings.clear_color']: [];
|
||||
['builder.splash_setting.settings.effect']: [];
|
||||
['builder.splash_setting.settings.display_watermark']: [];
|
||||
['builder.splash_setting.is_save_dialog.title']: [];
|
||||
['builder.splash_setting.is_save_dialog.save']: [];
|
||||
['builder.splash_setting.is_save_dialog.cancel']: [];
|
||||
['builder.splash_setting.is_save_dialog.abort']: [];
|
||||
['builder.is_remove_task.title']: [];
|
||||
['builder.is_remove_task.has_building_task']: [];
|
||||
['builder.is_remove_task.message']: [];
|
||||
['builder.is_remove_task.remove']: [];
|
||||
['builder.is_remove_task.deep_remove']: [];
|
||||
['builder.is_remove_task.cancel']: [];
|
||||
['builder.is_stop_build.title']: [];
|
||||
['builder.is_stop_build.message']: [];
|
||||
['builder.is_stop_build.stop']: [];
|
||||
['builder.is_stop_build.cancel']: [];
|
||||
['builder.is_close_win.title']: [];
|
||||
['builder.is_close_win.message']: [];
|
||||
['builder.is_close_win.force_close']: [];
|
||||
['builder.is_close_win.cancel']: [];
|
||||
['builder.is_save_scene.title']: [];
|
||||
['builder.is_save_scene.message']: [];
|
||||
['builder.is_save_scene.save']: [];
|
||||
['builder.is_save_scene.ignore']: [];
|
||||
['builder.is_save_scene.cancel']: [];
|
||||
['builder.merge_json_by_scene']: [];
|
||||
['builder.not_require']: [];
|
||||
['builder.options.open_compile_file']: [];
|
||||
['builder.custom_manifest_file_path']: [];
|
||||
['builder.custom_manifest_file_path_hint']: [];
|
||||
['builder.install_nodejs_before_view_certificate']: [];
|
||||
['builder.window_default_npm_path_error']: [];
|
||||
['builder.mac_default_npm_path_error']: [];
|
||||
['builder.oppo.package_name_error']: [];
|
||||
['builder.huawei.certificate_fingerprint_window_error']: [];
|
||||
['builder.huawei.certificate_fingerprint_mac_error']: [];
|
||||
['console.title']: [];
|
||||
['console.editorLog']: [];
|
||||
['console.cocosLog']: [];
|
||||
['console.tabbar.regex']: [];
|
||||
['console.preferences.display_date']: [];
|
||||
['console.preferences.font_size']: [];
|
||||
['console.preferences.line_height']: [];
|
||||
['engine.title']: [];
|
||||
['engine.compile_engine']: [];
|
||||
['engine.wait_quick_compile']: [];
|
||||
['engine.confirm']: [];
|
||||
['engine.browse']: [];
|
||||
['engine.open']: [];
|
||||
['engine.engine_directory_illegal']: [];
|
||||
['engine.engine_compile_failed']: [];
|
||||
['engine.engine_compile_crash']: [];
|
||||
['engine.javascript_engine']: [];
|
||||
['engine.use_builtin_engine']: [];
|
||||
['engine.custom_engine_path']: [];
|
||||
['engine.QUICK_COMPILER.engine_modified_info']: [];
|
||||
['engine.resources_docs_1']: [];
|
||||
['engine.resources_docs_2']: [];
|
||||
['engine.resources_docs_3']: [];
|
||||
['engine.resources_docs_4']: [];
|
||||
['hierarchy.title']: [];
|
||||
['hierarchy.menu.createMenu']: [];
|
||||
['hierarchy.menu.searchPlaceholder']: [];
|
||||
['hierarchy.menu.searchPlaceholder_name']: [];
|
||||
['hierarchy.menu.searchPlaceholder_uuid']: [];
|
||||
['hierarchy.menu.searchPlaceholder_component']: [];
|
||||
['hierarchy.menu.searchTip']: [];
|
||||
['hierarchy.menu.search']: [];
|
||||
['hierarchy.menu.searchName']: [];
|
||||
['hierarchy.menu.searchUuid']: [];
|
||||
['hierarchy.menu.searchComponent']: [];
|
||||
['hierarchy.menu.refresh']: [];
|
||||
['hierarchy.menu.allExpand']: [];
|
||||
['hierarchy.menu.allCollapse']: [];
|
||||
['hierarchy.menu.newNode']: [];
|
||||
['hierarchy.menu.newNodeEmpty']: [];
|
||||
['hierarchy.menu.new3dObject']: [];
|
||||
['hierarchy.menu.new3dCube']: [];
|
||||
['hierarchy.menu.new3dCylinder']: [];
|
||||
['hierarchy.menu.new3dSphere']: [];
|
||||
['hierarchy.menu.new3dCapsule']: [];
|
||||
['hierarchy.menu.new3dCone']: [];
|
||||
['hierarchy.menu.new3dTorus']: [];
|
||||
['hierarchy.menu.new3dPlane']: [];
|
||||
['hierarchy.menu.new3dQuad']: [];
|
||||
['hierarchy.menu.newLightObject']: [];
|
||||
['hierarchy.menu.newLightDirectional']: [];
|
||||
['hierarchy.menu.newLightSphere']: [];
|
||||
['hierarchy.menu.newLightSpot']: [];
|
||||
['hierarchy.menu.newCameraObject']: [];
|
||||
['hierarchy.menu.newTerrain']: [];
|
||||
['hierarchy.menu.newEffects']: [];
|
||||
['hierarchy.menu.newEffectsParticle']: [];
|
||||
['hierarchy.menu.newUI']: [];
|
||||
['hierarchy.menu.newUICanvas']: [];
|
||||
['hierarchy.menu.newUISprite']: [];
|
||||
['hierarchy.menu.newUILabel']: [];
|
||||
['hierarchy.menu.newUIButton']: [];
|
||||
['hierarchy.menu.newUIToggle']: [];
|
||||
['hierarchy.menu.newUIToggleGroup']: [];
|
||||
['hierarchy.menu.newUISlider']: [];
|
||||
['hierarchy.menu.newUIProgressBar']: [];
|
||||
['hierarchy.menu.newUIWidget']: [];
|
||||
['hierarchy.menu.newUIEditBox']: [];
|
||||
['hierarchy.menu.newUILayout']: [];
|
||||
['hierarchy.menu.newUIScrollView']: [];
|
||||
['hierarchy.menu.newUIMask']: [];
|
||||
['hierarchy.menu.copy']: [];
|
||||
['hierarchy.menu.cut']: [];
|
||||
['hierarchy.menu.paste']: [];
|
||||
['hierarchy.menu.delete']: [];
|
||||
['hierarchy.menu.rename']: [];
|
||||
['hierarchy.menu.duplicate']: [];
|
||||
['hierarchy.menu.showUuid']: [];
|
||||
['hierarchy.menu.link_prefab']: [];
|
||||
['hierarchy.menu.link_prefab_error_node_empty']: [];
|
||||
['hierarchy.menu.link_prefab_error_node_isScene']: [];
|
||||
['hierarchy.menu.link_prefab_error_asset_empty']: [];
|
||||
['hierarchy.menu.link_prefab_error_asset_invalid']: [];
|
||||
['hierarchy.menu.link_prefab_make_sure']: [];
|
||||
['hierarchy.menu.unlink_prefab']: [];
|
||||
['hierarchy.menu.unlink_prefab_error_prefab_empty']: [];
|
||||
['hierarchy.menu.errorNewnameEmpty']: [];
|
||||
['hierarchy.operate.cutReady']: [];
|
||||
['hierarchy.operate.cutDone']: [];
|
||||
['hierarchy.operate.copyReady']: [];
|
||||
['hierarchy.operate.copyDone']: [];
|
||||
['hierarchy.operate.duplicateDone']: [];
|
||||
['hierarchy.operate.dialogError']: [];
|
||||
['hierarchy.operate.dialogWarning']: [];
|
||||
['hierarchy.operate.dialogQuestion']: [];
|
||||
['hierarchy.operate.dialogInfo']: [];
|
||||
['hierarchy.operate.renameFail']: [];
|
||||
['inspector.title']: [];
|
||||
['inspector.add_component']: [];
|
||||
['inspector.lock_unlock']: [];
|
||||
['inspector.backward_selection']: [];
|
||||
['inspector.forward_selection']: [];
|
||||
['inspector.menu.remove_component']: [];
|
||||
['inspector.menu.move_up_component']: [];
|
||||
['inspector.menu.move_down_component']: [];
|
||||
['inspector.menu.copy_node_value']: [];
|
||||
['inspector.menu.paste_node_value']: [];
|
||||
['inspector.menu.copy_component']: [];
|
||||
['inspector.menu.paste_component']: [];
|
||||
['inspector.menu.paste_component_values']: [];
|
||||
['inspector.asset.directory.is_subpackage']: [];
|
||||
['inspector.asset.directory.subpackage_name']: [];
|
||||
['inspector.asset.javascript.plugin']: [];
|
||||
['inspector.asset.javascript.loadPluginInWeb']: [];
|
||||
['inspector.asset.javascript.loadPluginInEditor']: [];
|
||||
['inspector.asset.javascript.loadPluginInNative']: [];
|
||||
['inspector.asset.fbx.browse']: [];
|
||||
['inspector.asset.spriteFrame.edit']: [];
|
||||
['inspector.asset.texture.modeWarn']: [];
|
||||
['inspector.node.layer.confirm_message']: [];
|
||||
['inspector.node.layer.change_children']: [];
|
||||
['inspector.node.layer.change_self']: [];
|
||||
['inspector.gradient.title']: [];
|
||||
['inspector.curve_editor.title']: [];
|
||||
['inspector.sprite_editor.title']: [];
|
||||
['inspector.sprite_editor.scale']: [];
|
||||
['inspector.sprite_editor.reset']: [];
|
||||
['inspector.sprite_editor.save']: [];
|
||||
['inspector.sprite_editor.saveError']: [];
|
||||
['inspector.sprite_editor.border']: [];
|
||||
['inspector.sprite_editor.left']: [];
|
||||
['inspector.sprite_editor.right']: [];
|
||||
['inspector.sprite_editor.top']: [];
|
||||
['inspector.sprite_editor.bottom']: [];
|
||||
['inspector.check_is_saved.message']: [];
|
||||
['inspector.check_is_saved.save']: [];
|
||||
['inspector.check_is_saved.abort']: [];
|
||||
['inspector.prefab.local']: [];
|
||||
['inspector.prefab.reset']: [];
|
||||
['inspector.prefab.save']: [];
|
||||
['inspector.prefab.link']: [];
|
||||
['inspector.prefab.unlink']: [];
|
||||
['inspector.prefab.lost']: [];
|
||||
['inspector.prefab.exist']: [];
|
||||
['packager.title']: [];
|
||||
['packager.menu.internal']: [];
|
||||
['packager.menu.project']: [];
|
||||
['packager.menu.global']: [];
|
||||
['packager.menu.add']: [];
|
||||
['packager.menu.addProject']: [];
|
||||
['packager.menu.addGlobal']: [];
|
||||
['packager.menu.addLabel']: [];
|
||||
['packager.menu.addSuccess']: [];
|
||||
['packager.menu.import']: [];
|
||||
['packager.menu.importProject']: [];
|
||||
['packager.menu.importGlobal']: [];
|
||||
['packager.menu.importSuccess']: [];
|
||||
['packager.menu.install']: [];
|
||||
['packager.menu.installProject']: [];
|
||||
['packager.menu.installGlobal']: [];
|
||||
['packager.menu.installSuccess']: [];
|
||||
['packager.menu.selectDirectory']: [];
|
||||
['packager.menu.search']: [];
|
||||
['packager.menu.openFolder']: [];
|
||||
['packager.menu.author']: [];
|
||||
['packager.menu.state']: [];
|
||||
['packager.menu.remove']: [];
|
||||
['packager.menu.removeSuccess']: [];
|
||||
['packager.menu.removeConfirm']: [];
|
||||
['packager.menu.enable']: [];
|
||||
['packager.menu.disable']: [];
|
||||
['packager.menu.enabled']: [];
|
||||
['packager.menu.disabled']: [];
|
||||
['packager.menu.invalid']: [];
|
||||
['packager.menu.confirm']: [];
|
||||
['packager.menu.addError']: [];
|
||||
['packager.menu.importError']: [];
|
||||
['preferences.title']: [];
|
||||
['preferences.nav.general']: [];
|
||||
['preferences.nav.edit']: [];
|
||||
['preferences.nav.extension']: [];
|
||||
['preferences.nav.native']: [];
|
||||
['preferences.nav.laboratory']: [];
|
||||
['preferences.general.language']: [];
|
||||
['preferences.general.step']: [];
|
||||
['preferences.general.preci']: [];
|
||||
['preferences.general.theme']: [];
|
||||
['preferences.general.themeColor']: [];
|
||||
['preferences.general.preview_ip']: [];
|
||||
['preferences.edit.script_editor']: [];
|
||||
['preferences.edit.picture_editor']: [];
|
||||
['preferences.edit.browse']: [];
|
||||
['preferences.edit.remove']: [];
|
||||
['preferences.edit.internal']: [];
|
||||
['preferences.native.wechatgame_app_path']: [];
|
||||
['preferences.extension.package']: [];
|
||||
['preferences.laboratory.about']: [];
|
||||
['preferences.laboratory.new_add_component']: [];
|
||||
['preferences.browse']: [];
|
||||
['preferences.open']: [];
|
||||
['preview.title']: [];
|
||||
['preview.automatic']: [];
|
||||
['preview.automatic_tooltip']: [];
|
||||
['preview.scene_is_empty']: [];
|
||||
['preview.play']: [];
|
||||
['preview.refresh_device']: [];
|
||||
['preview.scan']: [];
|
||||
['preview.create_template']: [];
|
||||
['preview.load_current_scene_error']: [];
|
||||
['preview.creat_template_success']: [];
|
||||
['project-setting.title']: [];
|
||||
['project-setting.nav.preview']: [];
|
||||
['project-setting.nav.groupList']: [];
|
||||
['project-setting.nav.modules']: [];
|
||||
['project-setting.nav.engine']: [];
|
||||
['project-setting.nav.layer']: [];
|
||||
['project-setting.nav.graphics']: [];
|
||||
['project-setting.nav.general']: [];
|
||||
['project-setting.nav.projectPath']: [];
|
||||
['project-setting.nav.wizardPath']: [];
|
||||
['project-setting.preview.start_scene']: [];
|
||||
['project-setting.preview.auto_refresh']: [];
|
||||
['project-setting.preview.current_scene']: [];
|
||||
['project-setting.preview.simulator_setting_type']: [];
|
||||
['project-setting.preview.global']: [];
|
||||
['project-setting.preview.project']: [];
|
||||
['project-setting.preview.simulator_device_orientation']: [];
|
||||
['project-setting.preview.simulator_resolution']: [];
|
||||
['project-setting.preview.customize_resolution']: [];
|
||||
['project-setting.preview.vertical']: [];
|
||||
['project-setting.preview.horizontal']: [];
|
||||
['project-setting.modules.title']: [];
|
||||
['project-setting.modules.info']: [];
|
||||
['project-setting.modules.warn']: [];
|
||||
['project-setting.modules.module']: [];
|
||||
['project-setting.modules.inquiry']: [];
|
||||
['project-setting.modules.submodule']: [];
|
||||
['project-setting.modules.inquiry_all']: [];
|
||||
['project-setting.engine.cocos_default']: [];
|
||||
['project-setting.engine.user_customize']: [];
|
||||
['project-setting.engine.renderPipeline']: [];
|
||||
['project-setting.engine.physics']: [];
|
||||
['project-setting.engine.builtin']: [];
|
||||
['project-setting.engine.cannon']: [];
|
||||
['project-setting.engine.ammo']: [];
|
||||
['project-setting.general.browse']: [];
|
||||
['project-setting.general.ts_compiler']: [];
|
||||
['project-setting.general.tslint.title']: [];
|
||||
['project-setting.general.tslint.default']: [];
|
||||
['project-setting.general.tslint.path']: [];
|
||||
['project-setting.general.section_canvas']: [];
|
||||
['project-setting.general.design_resolution']: [];
|
||||
['project-setting.general.width']: [];
|
||||
['project-setting.general.height']: [];
|
||||
['project-setting.general.fit_width']: [];
|
||||
['project-setting.general.fit_height']: [];
|
||||
['project-setting.general.type_check_level']: [];
|
||||
['project-setting.general.type_check_tips.disable']: [];
|
||||
['project-setting.general.type_check_tips.checkOnly']: [];
|
||||
['project-setting.general.type_check_tips.fatalOnError']: [];
|
||||
['scene.title']: [];
|
||||
['scene.new']: [];
|
||||
['scene.save']: [];
|
||||
['scene.save_as']: [];
|
||||
['scene.develop']: [];
|
||||
['scene.terrain.is_create_message']: [];
|
||||
['scene.terrain.is_create']: [];
|
||||
['scene.terrain.cancel']: [];
|
||||
['scene.terrain.edit']: [];
|
||||
['scene.terrain.save']: [];
|
||||
['scene.terrain.delete']: [];
|
||||
['scene.terrain.abort']: [];
|
||||
['scene.messages.warning']: [];
|
||||
['scene.messages.scenario_modified']: [];
|
||||
['scene.messages.want_to_save']: [];
|
||||
['scene.messages.save']: [];
|
||||
['scene.messages.dont_save']: [];
|
||||
['scene.messages.cancel']: [];
|
||||
['scene.messages.save_as_fail']: [];
|
||||
['scene.save_prefab']: [];
|
||||
['scene.close_prefab']: [];
|
||||
['scene.save_clip']: [];
|
||||
['scene.close_clip']: [];
|
||||
['scene.gizmos.icon3d']: [];
|
||||
['scene.gizmos.showGrid']: [];
|
||||
['scene.ui_tools.zoom_up']: [];
|
||||
['scene.ui_tools.zoom_down']: [];
|
||||
['scene.ui_tools.zoom_reset']: [];
|
||||
['scene.ui_tools.align_top']: [];
|
||||
['scene.ui_tools.align_v_center']: [];
|
||||
['scene.ui_tools.align_bottom']: [];
|
||||
['scene.ui_tools.align_left']: [];
|
||||
['scene.ui_tools.align_h_center']: [];
|
||||
['scene.ui_tools.align_right']: [];
|
||||
['scene.ui_tools.distribute_top']: [];
|
||||
['scene.ui_tools.distribute_v_center']: [];
|
||||
['scene.ui_tools.distribute_bottom']: [];
|
||||
['scene.ui_tools.distribute_left']: [];
|
||||
['scene.ui_tools.distribute_h_center']: [];
|
||||
['scene.ui_tools.distribute_right']: [];
|
||||
['tester.auto_tooltip']: [];
|
||||
['tester.play_tooltip']: [];
|
||||
['tester.pause_tooltip']: [];
|
||||
['ui-kit.title']: [];
|
||||
}
|
160
extensions/uistate-inspector/@types/packages/engine-extends/@types/third-parts.d.ts
vendored
Normal file
160
extensions/uistate-inspector/@types/packages/engine-extends/@types/third-parts.d.ts
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
declare module 'tga-js' {
|
||||
export default class TGA {
|
||||
width: number;
|
||||
height: number;
|
||||
getImageData(imageData?: ImageData): ImageData | {width: number, height: number, data: Uint8ClampedArray};
|
||||
constructor();
|
||||
load(data: Buffer): null;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'psd.js' {
|
||||
import PNG from 'pngjs';
|
||||
export default class PSD {
|
||||
constructor (data: Buffer);
|
||||
|
||||
parse();
|
||||
|
||||
image: {
|
||||
toPng(): PNG;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'draco3dgltf' {
|
||||
export function createDecoderModule(options: DecoderModuleOptions): typeof DecoderModule;
|
||||
|
||||
// eslint-disable-next-line
|
||||
export interface DecoderModuleOptions {
|
||||
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
interface DecoderModule {
|
||||
|
||||
}
|
||||
|
||||
namespace DecoderModule {
|
||||
function destroy(decoder: Decoder): void;
|
||||
|
||||
function destroy(buffer: DecoderBuffer): void;
|
||||
|
||||
function destroy(int32Array: DracoInt32Array): void;
|
||||
|
||||
function destroy(mesh: Geometry): void;
|
||||
|
||||
export class DecoderBuffer {
|
||||
public Init(buffer: Int8Array, size: number): void;
|
||||
}
|
||||
|
||||
export class Decoder {
|
||||
public GetEncodedGeometryType(buffer: DecoderBuffer): GeometryType;
|
||||
|
||||
public DecodeBufferToMesh(buffer: DecoderBuffer, mesh: Mesh): Status;
|
||||
|
||||
public DecodeBufferToPointCloud(buffer: DecoderBuffer, pointCloud: PointCloud): Status;
|
||||
|
||||
public GetFaceFromMesh(geometry: Geometry, index: number, out: DracoInt32Array): void;
|
||||
|
||||
public GetAttributeId(geometry: Geometry, attributeType: AttributeType): number;
|
||||
|
||||
public GetAttributeByUniqueId(geometry: Geometry, uniqueId: number): Attribute;
|
||||
|
||||
public GetAttribute(geometry: Geometry, attributeId: number): Attribute;
|
||||
|
||||
public GetAttributeInt8ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt8Array): void;
|
||||
|
||||
public GetAttributeInt16ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt16Array): void;
|
||||
|
||||
public GetAttributeInt32ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoInt32Array): void;
|
||||
|
||||
public GetAttributeUInt8ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt8Array): void;
|
||||
|
||||
public GetAttributeUInt16ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt16Array): void;
|
||||
|
||||
public GetAttributeUInt32ForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoUInt32Array): void;
|
||||
|
||||
public GetAttributeFloatForAllPoints(geometry: Geometry, attribute: Attribute, attributeData: DracoFloat32Array): void;
|
||||
}
|
||||
|
||||
class Status {
|
||||
public ok(): boolean;
|
||||
public error_msg(): string;
|
||||
}
|
||||
|
||||
enum GeometryType {
|
||||
// See below
|
||||
}
|
||||
|
||||
export const TRIANGULAR_MESH: GeometryType;
|
||||
|
||||
export const POINT_CLOUD: GeometryType;
|
||||
|
||||
export class Mesh {
|
||||
public ptr: number;
|
||||
|
||||
public num_faces(): number;
|
||||
|
||||
public num_points(): number;
|
||||
}
|
||||
|
||||
export class PointCloud {
|
||||
public ptr: number;
|
||||
|
||||
public num_points(): number;
|
||||
}
|
||||
|
||||
export type Geometry = Mesh | PointCloud;
|
||||
|
||||
enum AttributeType {
|
||||
// See below
|
||||
}
|
||||
|
||||
export const POSITION: AttributeType;
|
||||
export const NORMAL: AttributeType;
|
||||
export const COLOR: AttributeType;
|
||||
export const TEX_COORD: AttributeType;
|
||||
|
||||
class Attribute {
|
||||
private constructor();
|
||||
public num_components(): number;
|
||||
}
|
||||
|
||||
export class DracoInt8Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
|
||||
export class DracoInt16Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
|
||||
export class DracoInt32Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
|
||||
export class DracoUInt8Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
|
||||
export class DracoUInt16Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
|
||||
export class DracoUInt32Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
|
||||
export class DracoFloat32Array {
|
||||
public size(): number;
|
||||
public GetValue(index: number): number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare const EditorExtends: any;
|
51
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/index.d.ts
vendored
Normal file
51
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/index.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import ScriptManager from './manager/script';
|
||||
import NodeManager from './manager/node';
|
||||
import ComponentManager from './manager/component';
|
||||
import AssetManager from './manager/asset';
|
||||
import DialogManager from './manager/dialog';
|
||||
export declare const Script: ScriptManager;
|
||||
export declare const Node: NodeManager;
|
||||
export declare const Component: ComponentManager;
|
||||
export declare const Asset: AssetManager;
|
||||
export declare const Dialog: DialogManager;
|
||||
import * as Uuid from './utils/uuid';
|
||||
export declare const UuidUtils: typeof Uuid;
|
||||
export declare let GeometryUtils: any;
|
||||
export declare let PrefabUtils: any;
|
||||
export declare let serialize: any;
|
||||
export declare let serializeCompiled: any;
|
||||
import { MissingClassReporter } from './missing-reporter/missing-class-reporter';
|
||||
import { MissingObjectReporter } from './missing-reporter/missing-object-reporter';
|
||||
export { walkProperties } from './missing-reporter/object-walker';
|
||||
export declare const MissingReporter: {
|
||||
classInstance: {
|
||||
reporter: MissingClassReporter;
|
||||
classFinder(id: any, data: any, owner: any, propName: any): any;
|
||||
hasMissingClass: boolean;
|
||||
reportMissingClass(asset: any): void;
|
||||
reset(): void;
|
||||
};
|
||||
class: typeof MissingClassReporter;
|
||||
object: typeof MissingObjectReporter;
|
||||
};
|
||||
export declare function init(): Promise<void>;
|
||||
/**
|
||||
* 启动各个管理器
|
||||
*/
|
||||
export declare function start(): void;
|
||||
/**
|
||||
* 关闭各个管理器
|
||||
*/
|
||||
export declare function stop(): void;
|
||||
export declare function emit(name: string | symbol, ...args: string[]): void;
|
||||
export declare function on(name: string | symbol, handle: (...args: any[]) => void): void;
|
||||
export declare function removeListener(name: string | symbol, handle: (...args: any[]) => void): void;
|
||||
declare global {
|
||||
export const EditorExtends: typeof import('.');
|
||||
export namespace cce {
|
||||
namespace Utils {
|
||||
const serialize: typeof import('./utils/serialize/index')['serialize'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=index.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/editor-extends/index.ts"],"names":[],"mappings":"AAIA,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AACnD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,eAAO,MAAM,MAAM,eAAoB,CAAC;AACxC,eAAO,MAAM,IAAI,aAAkB,CAAC;AACpC,eAAO,MAAM,SAAS,kBAAuB,CAAC;AAC9C,eAAO,MAAM,KAAK,cAAmB,CAAC;AACtC,eAAO,MAAM,MAAM,eAAoB,CAAC;AAGxC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,eAAO,MAAM,SAAS,aAAO,CAAC;AAG9B,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC;AAG9B,eAAO,IAAI,WAAW,EAAE,GAAG,CAAC;AAE5B,eAAO,IAAI,SAAS,EAAE,GAAG,CAAC;AAC1B,eAAO,IAAI,iBAAiB,EAAE,GAAG,CAAC;AAGlC,OAAO,EAAE,oBAAoB,EAAgB,MAAM,2CAA2C,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAElE,eAAO,MAAM,eAAe;;;;;;;;;;CAI3B,CAAC;AAEF,wBAAsB,IAAI,kBAQzB;AAED;;GAEG;AACH,wBAAgB,KAAK,SAIpB;AAED;;GAEG;AACH,wBAAgB,IAAI,SAInB;AAID,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,QAE5D;AAED,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,QAEzE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,QAErF;AAED,OAAO,CAAC,MAAM,CAAC;IACX,MAAM,CAAC,MAAM,aAAa,EAAE,cAAc,GAAG,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,CAAC;QACjB,UAAiB,KAAK,CAAC;YACZ,MAAM,SAAS,EAAE,cAAc,yBAAyB,CAAC,CAAC,WAAW,CAAC,CAAC;SACjF;KACJ;CACJ"}
|
15
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/asset.d.ts
vendored
Normal file
15
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/asset.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export default class AssetManager {
|
||||
/**
|
||||
* 查询一个资源的 info 信息
|
||||
* @param uuid
|
||||
* @param callback
|
||||
*/
|
||||
queryAssetInfo(uuid: string, callback: Function): void;
|
||||
/**
|
||||
* 查询一个路径下的资源
|
||||
* @param url
|
||||
* @param callback
|
||||
*/
|
||||
getAssetInfoFromUrl(url: string): any;
|
||||
}
|
||||
//# sourceMappingURL=asset.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"asset.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/asset.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,OAAO,YAAY;IAE7B;;;;OAIG;IACI,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IActD;;;;OAIG;IACI,mBAAmB,CAAC,GAAG,EAAE,MAAM;CAgBzC"}
|
82
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/component.d.ts
vendored
Normal file
82
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/component.d.ts
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from 'events';
|
||||
interface MenuItem {
|
||||
component: Function;
|
||||
menuPath: string;
|
||||
priority: number;
|
||||
}
|
||||
export default class ComponentManager extends EventEmitter {
|
||||
allow: boolean;
|
||||
_menus: MenuItem[];
|
||||
/**
|
||||
* 添加一个组件的菜单项
|
||||
* @param component
|
||||
* @param path
|
||||
* @param priority
|
||||
*/
|
||||
addMenu(component: Function, path: string, priority?: number): void;
|
||||
/**
|
||||
* 删除一个组件的菜单项
|
||||
* @param component
|
||||
*/
|
||||
removeMenu(component: Function): void;
|
||||
/**
|
||||
* 查询已经注册的组件菜单项
|
||||
*/
|
||||
getMenus(): MenuItem[];
|
||||
_map: {
|
||||
[index: string]: any;
|
||||
};
|
||||
_recycle: {
|
||||
[index: string]: any;
|
||||
};
|
||||
/**
|
||||
* 新增一个组件
|
||||
* 1. 调用Node的addComponent时会调用此方法
|
||||
* 2. Node添加到场景树时,会遍历身上的组件调用此方法
|
||||
* @param uuid
|
||||
* @param component
|
||||
*/
|
||||
add(uuid: string, component: any): void;
|
||||
/**
|
||||
* 删除一个组件
|
||||
* 1. 调用Node的_removeComponent时会调用此方法,removeComponent会在下一帧调用_removeComponent,
|
||||
* removeComponent会调用一些Component的生命周期函数,而_removeComponent不会。
|
||||
* 2. Node添加到场景树时,会遍历身上的组件调用此方法
|
||||
* @param uuid
|
||||
*/
|
||||
remove(uuid: string): void;
|
||||
/**
|
||||
* 清空全部数据
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* 获取一个指定的组件
|
||||
* @param uuid
|
||||
*/
|
||||
getComponent(uuid: string): any;
|
||||
/**
|
||||
* 获取所有的组件数据
|
||||
*/
|
||||
getComponents(): {
|
||||
[index: string]: any;
|
||||
};
|
||||
/**
|
||||
* 获取一个在回收站里的组件
|
||||
* @param uuid
|
||||
*/
|
||||
getRecycleComponent(uuid: string): any;
|
||||
/**
|
||||
* 获取所有回收站里的组件
|
||||
*/
|
||||
getRecycleComponents(): {
|
||||
[index: string]: any;
|
||||
};
|
||||
/**
|
||||
* 从回收站中还原一个组件
|
||||
* @param uuid
|
||||
*/
|
||||
recycle(uuid: string): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=component.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/component.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,UAAU,QAAQ;IACd,SAAS,EAAE,QAAQ,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IAEtD,KAAK,UAAS;IAKd,MAAM,EAAE,QAAQ,EAAE,CAAM;IAExB;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM;IAY5D;;;OAGG;IACH,UAAU,CAAC,SAAS,EAAE,QAAQ;IAW9B;;OAEG;IACH,QAAQ;IAOR,IAAI,EAAE;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAK;IAGjC,QAAQ,EAAE;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,CAAK;IAErC;;;;;;OAMG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG;IAYhC;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAiBnB;;OAEG;IACH,KAAK;IAQL;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM;IAIzB;;OAEG;IACH,aAAa;;;IAIb;;;OAGG;IACH,mBAAmB,CAAC,IAAI,EAAE,MAAM;IAIhC;;OAEG;IACH,oBAAoB;;;IAIpB;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM;CAUvB"}
|
32
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/dialog.d.ts
vendored
Normal file
32
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/dialog.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
interface MessageDialogOptions {
|
||||
title?: string;
|
||||
detail?: string;
|
||||
default?: number;
|
||||
cancel?: number;
|
||||
buttons?: string[];
|
||||
}
|
||||
export default class Dialog {
|
||||
/**
|
||||
* 信息弹窗
|
||||
* @param message 显示的消息
|
||||
* @param options 信息弹窗可选参数
|
||||
* @param window 依附于哪个窗口(插件主进程才可使用)
|
||||
*/
|
||||
info(message: string, options?: MessageDialogOptions): Promise<unknown>;
|
||||
/**
|
||||
* 警告弹窗
|
||||
* @param message 警告信息
|
||||
* @param options 警告弹窗可选参数
|
||||
* @param window 依附于哪个窗口(插件主进程才可使用)
|
||||
*/
|
||||
warn(message: string, options?: MessageDialogOptions): Promise<unknown>;
|
||||
/**
|
||||
* 错误弹窗
|
||||
* @param message 错误信息
|
||||
* @param options 错误弹窗可选参数
|
||||
* @param window 依附于哪个窗口(插件主进程才可使用)
|
||||
*/
|
||||
error(message: string, options?: MessageDialogOptions): Promise<unknown>;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=dialog.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/dialog.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,OAAO,MAAM;IACvB;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;IAYxD;;;;;OAKG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;IAYxD;;;;;OAKG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB;CAW5D"}
|
54
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/node.d.ts
vendored
Normal file
54
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/node.d.ts
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
/// <reference types="node" />
|
||||
import type { Node } from 'cc';
|
||||
import { EventEmitter } from 'events';
|
||||
export default class NodeManager extends EventEmitter {
|
||||
allow: boolean;
|
||||
_map: {
|
||||
[index: string]: any;
|
||||
};
|
||||
_recycle: {
|
||||
[index: string]: any;
|
||||
};
|
||||
/**
|
||||
* 新增一个节点,当引擎将一个节点添加到场景树中,同时会遍历子节点,递归的调用这个方法。
|
||||
* @param uuid
|
||||
* @param node
|
||||
*/
|
||||
add(uuid: string, node: any): void;
|
||||
/**
|
||||
* 删除一个节点,当引擎将一个节点从场景树中移除,同时会遍历子节点,递归的调用这个方法。
|
||||
* @param uuid
|
||||
*/
|
||||
remove(uuid: string): void;
|
||||
/**
|
||||
* 清空所有数据
|
||||
*/
|
||||
clear(): void;
|
||||
/**
|
||||
* 获取一个节点数据,查的范围包括被删除的节点
|
||||
* @param uuid
|
||||
*/
|
||||
getNode(uuid: string): Node | null;
|
||||
/**
|
||||
* 获取所有的节点数据
|
||||
*/
|
||||
getNodes(): {
|
||||
[index: string]: any;
|
||||
} & {
|
||||
[index: string]: any;
|
||||
};
|
||||
/**
|
||||
* 获取场景中使用了某个资源的节点
|
||||
* @param uuid asset uuid
|
||||
*/
|
||||
getNodesByAsset(uuid: string): string[];
|
||||
/**
|
||||
* 获取所有在场景树中的节点数据
|
||||
*/
|
||||
getNodesInScene(): {
|
||||
[index: string]: any;
|
||||
};
|
||||
changeNodeUUID(oldUUID: string, newUUID: string): void;
|
||||
}
|
||||
//# sourceMappingURL=node.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/node.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAOtC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IAEjD,KAAK,UAAS;IAEd,IAAI,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;IAEpC,QAAQ,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;IAExC;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG;IAY3B;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM;IAiBnB;;OAEG;IACH,KAAK;IAQL;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAIlC;;OAEG;IACH,QAAQ;;;;;IAKR;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM;IAqC5B;;OAEG;IACH,eAAe;;;IAIf,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAelD"}
|
26
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/script.d.ts
vendored
Normal file
26
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/manager/script.d.ts
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
/// <reference types="node" />
|
||||
import { EventEmitter } from 'events';
|
||||
export default class ScriptManager extends EventEmitter {
|
||||
allow: boolean;
|
||||
_map: {
|
||||
[index: string]: Function[];
|
||||
};
|
||||
/**
|
||||
* 将一个 ctor 放到一个脚本注册 class 的数组里
|
||||
* @param uuid
|
||||
* @param ctor
|
||||
*/
|
||||
add(uuid: string, ctor: Function): void;
|
||||
/**
|
||||
* 在 uuid 指向的脚本 ctor 数组里删除对应的 ctor
|
||||
* @param uuid
|
||||
* @param ctor
|
||||
*/
|
||||
remove(uuid: string, ctor: Function): void;
|
||||
/**
|
||||
* 获取指定模块内注册的 class 列表
|
||||
* @param uuid
|
||||
*/
|
||||
getCtors(uuid: string): Function[];
|
||||
}
|
||||
//# sourceMappingURL=script.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/manager/script.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IAEnD,KAAK,UAAS;IAEd,IAAI,EAAE;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,EAAE,CAAA;KAAC,CAAK;IAExC;;;;OAIG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;IAYhC;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ;IAenC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM;CAGxB"}
|
@ -0,0 +1,13 @@
|
||||
import { MissingReporter } from './missing-reporter';
|
||||
export declare class MissingClassReporter extends MissingReporter {
|
||||
report(): void;
|
||||
reportByOwner(): void;
|
||||
}
|
||||
export declare const MissingClass: {
|
||||
reporter: MissingClassReporter;
|
||||
classFinder(id: any, data: any, owner: any, propName: any): any;
|
||||
hasMissingClass: boolean;
|
||||
reportMissingClass(asset: any): void;
|
||||
reset(): void;
|
||||
};
|
||||
//# sourceMappingURL=missing-class-reporter.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"missing-class-reporter.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/missing-class-reporter.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA6ErD,qBAAa,oBAAqB,SAAQ,eAAe;IAErD,MAAM;IAQN,aAAa;CA6BhB;AAGD,eAAO,MAAM,YAAY;;oBAEL,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG;;8BAY/B,GAAG;;CAahC,CAAC"}
|
@ -0,0 +1,8 @@
|
||||
import { MissingReporter } from './missing-reporter';
|
||||
export declare class MissingObjectReporter extends MissingReporter {
|
||||
root: any;
|
||||
doReport(obj: any, value: any, parsedObjects: any, rootUrl: any, inRootBriefLocation: any): void;
|
||||
report(): void;
|
||||
reportByOwner(): void;
|
||||
}
|
||||
//# sourceMappingURL=missing-object-reporter.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"missing-object-reporter.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/missing-object-reporter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA8BrD,qBAAa,qBAAsB,SAAQ,eAAe;IAEtD,IAAI,EAAE,GAAG,CAAC;IAEV,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG;IAsEzF,MAAM;IA4BN,aAAa;CA+BhB"}
|
@ -0,0 +1,20 @@
|
||||
export declare class MissingReporter {
|
||||
outputLevel: 'debug' | 'warn' | 'error';
|
||||
static INFO_DETAILED: string;
|
||||
static getObjectType(obj: any): "component" | "prefab" | "scene" | "asset";
|
||||
missingObjects: Set<unknown>;
|
||||
missingOwners: Map<any, any>;
|
||||
root: any;
|
||||
report(): void;
|
||||
reportByOwner(): void;
|
||||
constructor(root?: any);
|
||||
reset(): void;
|
||||
stash(obj: any): void;
|
||||
/**
|
||||
* stashByOwner 和 stash 的区别在于,stash 要求对象中有值,stashByOwner 允许对象的值为空
|
||||
* @param {any} [value] - 如果 value 未设置,不会影响提示信息,只不过提示信息可能会不够详细
|
||||
*/
|
||||
stashByOwner(owner: any, propName: any, value: any): void;
|
||||
removeStashedByOwner(owner: any, propName: any): any;
|
||||
}
|
||||
//# sourceMappingURL=missing-reporter.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"missing-reporter.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/missing-reporter.ts"],"names":[],"mappings":"AAEA,qBAAa,eAAe;IAExB,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAW;IAElD,MAAM,CAAC,aAAa,SAA8B;IAElD,MAAM,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG;IAgB7B,cAAc,eAAa;IAG3B,aAAa,gBAAa;IAE1B,IAAI,EAAE,GAAG,CAAC;IAEV,MAAM;IACN,aAAa;gBAED,IAAI,CAAC,EAAE,GAAG;IAItB,KAAK;IAML,KAAK,CAAC,GAAG,EAAE,GAAG;IAId;;;OAGG;IACH,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IASlD,oBAAoB,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;CAoBjD"}
|
@ -0,0 +1,43 @@
|
||||
export declare class ObjectWalkerBehavior {
|
||||
walk(obj: any, key: any, val: any): void;
|
||||
root: any;
|
||||
constructor(root: any);
|
||||
parseObject(val: any): void;
|
||||
parseCCClass(val: any, klass: any, props: any): void;
|
||||
forIn(val: any): void;
|
||||
forEach(val: any): void;
|
||||
}
|
||||
export declare class ObjectWalker extends ObjectWalkerBehavior {
|
||||
iteratee: any;
|
||||
parsedObjects: any;
|
||||
parsedKeys: any;
|
||||
ignoreParent: any;
|
||||
ignoreSubPrefabHelper: any;
|
||||
walked: Set<unknown>;
|
||||
constructor(root: any, iteratee: any, options?: any);
|
||||
walk(obj: any, key: any, val: any): void;
|
||||
}
|
||||
/**
|
||||
* Traverse all objects recursively
|
||||
* @param {Object} root
|
||||
* @param {Function} iteratee
|
||||
* @param {Object} iteratee.object
|
||||
* @param {String} iteratee.property
|
||||
* @param {Object} iteratee.value - per object will be navigated ONLY once in this parameter
|
||||
* @param {Object[]} iteratee.parsedObjects - parsed object path, NOT contains the "object" parameter
|
||||
*/
|
||||
export declare function walk(root: any, iteratee: any): void;
|
||||
/**
|
||||
* Traverse all object's properties recursively
|
||||
* @param {Object} root
|
||||
* @param {Function} iteratee
|
||||
* @param {Object} iteratee.object
|
||||
* @param {String} iteratee.property - per object property will be navigated ONLY once in this parameter
|
||||
* @param {Object} iteratee.value - per object may be navigated MORE than once in this parameter
|
||||
* @param {Object[]} iteratee.parsedObjects - parsed object path, NOT contains the "object" parameter
|
||||
* @param {Object} [options]
|
||||
* @param {Boolean} [options.dontSkipNull = false]
|
||||
*/
|
||||
export declare function walkProperties(root: any, iteratee: any, options: any): void;
|
||||
export declare function getNextProperty(parsedObjects: any, parsingObject: any, object: any): string;
|
||||
//# sourceMappingURL=object-walker.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"object-walker.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/missing-reporter/object-walker.ts"],"names":[],"mappings":"AAIA,qBAAa,oBAAoB;IAC7B,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAEjC,IAAI,EAAE,GAAG,CAAC;gBAEE,IAAI,EAAE,GAAG;IAIrB,WAAW,CAAC,GAAG,EAAE,GAAG;IAwBpB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAU7C,KAAK,CAAC,GAAG,EAAE,GAAG;IAWd,OAAO,CAAC,GAAG,EAAE,GAAG;CAKnB;AAMD,qBAAa,YAAa,SAAQ,oBAAoB;IAClD,QAAQ,EAAE,GAAG,CAAC;IACd,aAAa,EAAE,GAAG,CAAC;IACnB,UAAU,EAAE,GAAG,CAAC;IAChB,YAAY,EAAE,GAAG,CAAC;IAClB,qBAAqB,EAAE,GAAG,CAAC;IAE3B,MAAM,eAAa;gBAEP,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,GAAG;IAuBnD,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;CAmCpC;AAGD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,QAE5C;AAYD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,QAwBpE;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,UAiBlF"}
|
19
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/utils/geometry.d.ts
vendored
Normal file
19
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/utils/geometry.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { gfx } from 'cc';
|
||||
interface IWritableArrayLike<T> {
|
||||
length: number;
|
||||
[index: number]: T;
|
||||
}
|
||||
export declare const calculateNormals: (positions: ArrayLike<number>, indices: ArrayLike<number>, out?: IWritableArrayLike<number>) => IWritableArrayLike<number>;
|
||||
export declare const calculateTangents: (positions: ArrayLike<number>, indices: ArrayLike<number>, normals: ArrayLike<number>, uvs: ArrayLike<number>, out?: IWritableArrayLike<number>) => IWritableArrayLike<number>;
|
||||
export declare function forEachFace(indices: ArrayLike<number>, primitiveMode: gfx.PrimitiveMode, callback: (faceIndices: number[]) => any): void;
|
||||
export declare class MeshSplitInfo {
|
||||
indices: number[];
|
||||
jointSet: Set<number>;
|
||||
primitiveMode: gfx.PrimitiveMode;
|
||||
constructor(primitiveMode?: any);
|
||||
}
|
||||
export declare const splitBasedOnJoints: (joints: ArrayLike<number>, indices: ArrayLike<number>, primitiveMode: gfx.PrimitiveMode, capacity: number) => MeshSplitInfo[];
|
||||
export declare function getUintArrayCtor(maxElement: number): Uint8ArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor;
|
||||
export {};
|
||||
//# sourceMappingURL=geometry.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/geometry.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,IAAI,CAAC;AAGzB,UAAU,kBAAkB,CAAC,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;CACtB;AAED,eAAO,MAAM,gBAAgB,cAQN,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,QAAO,mBAAmB,MAAM,CAAC,+BAyBjG,CAAC;AAEL,eAAO,MAAM,iBAAiB,cAcP,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,OACnF,UAAU,MAAM,CAAC,QAAO,mBAAmB,MAAM,CAAC,+BAgD3D,CAAC;AAEL,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,aAAa,EAAE,GAAG,CAAC,aAAa,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,GAAG,QAoEjI;AAED,qBAAa,aAAa;IACf,OAAO,EAAE,MAAM,EAAE,CAAM;IACvB,QAAQ,cAAqB;IAE7B,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC;gBAC5B,aAAa,MAAsC;CAGlE;AAED,eAAO,MAAM,kBAAkB,WAsBX,UAAU,MAAM,CAAC,WAAW,UAAU,MAAM,CAAC,iBAAiB,IAAI,aAAa,YAAY,MAAM,oBAyBjH,CAAC;AAEL,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,2EAIlD"}
|
18
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/utils/prefab.d.ts
vendored
Normal file
18
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/utils/prefab.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { Component, Node, Prefab } from 'cc';
|
||||
interface IAddPrefabInfoOption {
|
||||
nodeFileIdGenerator?: (node: Node) => string;
|
||||
compFileIdGenerator?: (comp: Component, index: number) => string;
|
||||
}
|
||||
/**
|
||||
* 递归循环所有的子节点,执行 handle 方法
|
||||
* @param {*} node
|
||||
* @param {*} handle
|
||||
*/
|
||||
export declare function walkNode(node: Node, handle: (node: Node, isChild: boolean) => boolean | void, isChild?: boolean): void;
|
||||
export declare function visitObjTypeReferences(node: Node, visitor: any): void;
|
||||
export declare function addPrefabInfo(targetNode: Node, rootNode: Node, asset: Prefab, opts?: IAddPrefabInfoOption): void;
|
||||
export declare function checkAndStripNode(node: Node, quiet?: boolean | undefined): void;
|
||||
export declare function addPrefabInstance(node: Node): void;
|
||||
export {};
|
||||
//# sourceMappingURL=prefab.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"prefab.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/prefab.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAuB,IAAI,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAKlE,UAAU,oBAAoB;IAC1B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;IAC7C,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACpE;AAID;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,GAAC,IAAI,EAAE,OAAO,UAAQ,QAU3G;AAID,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,QAyB9D;AAyBD,wBAAgB,aAAa,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,oBAAyB,QAoE7G;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,GAAE,OAAO,GAAG,SAAqB,QAkEnF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,QAQ3C"}
|
@ -0,0 +1,55 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { ValueType, deserialize } from 'cc';
|
||||
import { Node, IRefsBuilder, TraceableDict } from './types';
|
||||
import { IBuilder, IBuilderOptions, PropertyOptions, IArrayOptions, IClassOptions, ICustomClassOptions, IObjParsingInfo } from '../parser';
|
||||
import D = deserialize.Internal;
|
||||
declare type Empty = D.Empty_;
|
||||
import File = D.File_;
|
||||
declare type IFileData = D.IFileData_;
|
||||
declare type IRefs = D.IRefs_;
|
||||
export declare const FORMAT_VERSION = 1;
|
||||
declare namespace RefsBuilder {
|
||||
class Impl implements IRefsBuilder {
|
||||
private beforeOffsetRefs;
|
||||
private afterOffsetRefs;
|
||||
private ctx;
|
||||
constructor(ctx: Builder);
|
||||
addRef(owner: Node, key: string | number, target: Node): number;
|
||||
build(): IRefs | null;
|
||||
}
|
||||
}
|
||||
export declare function reduceEmptyArray<T extends any[]>(array: T): T | Empty;
|
||||
export default class Builder implements IBuilder {
|
||||
stringify: boolean;
|
||||
minify: boolean;
|
||||
noNativeDep: boolean;
|
||||
sharedUuids: TraceableDict<string>;
|
||||
sharedStrings: TraceableDict<string>;
|
||||
refsBuilder: RefsBuilder.Impl;
|
||||
dependAssets: (string | number | Node)[];
|
||||
private rootNode;
|
||||
private normalNodes;
|
||||
private advancedNodes;
|
||||
private classNodes;
|
||||
private data;
|
||||
constructor(options: IBuilderOptions);
|
||||
setProperty_Array(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IArrayOptions): IObjParsingInfo;
|
||||
setProperty_Dict(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: PropertyOptions): IObjParsingInfo;
|
||||
setProperty_Class(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IClassOptions): IObjParsingInfo;
|
||||
setProperty_CustomizedClass(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: ICustomClassOptions): IObjParsingInfo;
|
||||
setProperty_ParsedObject(ownerInfo: IObjParsingInfo, key: string | number, valueInfo: IObjParsingInfo, formerlySerializedAs: string | null): void;
|
||||
setProperty_Raw(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||
setProperty_ValueType(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, value: ValueType, options: PropertyOptions): IObjParsingInfo | null;
|
||||
setProperty_TypedArray(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||
setProperty_AssetUuid(owner: object, ownerInfo: IObjParsingInfo, key: string | number, uuid: string, options: PropertyOptions): void;
|
||||
setRoot(objInfo: IObjParsingInfo): void;
|
||||
private setDynamicProperty;
|
||||
private collectInstances;
|
||||
private dumpInstances;
|
||||
private dumpInstanceTypes;
|
||||
private dumpDependUuids;
|
||||
dump(): object | string;
|
||||
}
|
||||
export declare function getRootData(data: IFileData): IFileData[File.Instances];
|
||||
export {};
|
||||
//# sourceMappingURL=builder.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/builder.ts"],"names":[],"mappings":"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"}
|
@ -0,0 +1,12 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { deserialize } from 'cc';
|
||||
import D = deserialize.Internal;
|
||||
declare type IClass = D.IClass_;
|
||||
declare type IMask = D.IMask_;
|
||||
import { ClassNode, CustomClassNode } from './types';
|
||||
export default function (classNodes: (ClassNode | CustomClassNode)[]): {
|
||||
sharedClasses: (IClass | string)[];
|
||||
sharedMasks: IMask[];
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=create-class-mask.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"create-class-mask.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/create-class-mask.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,WAAW,EACd,MAAM,IAAI,CAAC;AAGZ,OAAO,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;AAEhC,aAAK,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC;AAExB,aAAK,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AA4JnF,MAAM,CAAC,OAAO,WAAU,UAAU,EAAE,CAAC,SAAS,GAAC,eAAe,CAAC,EAAE,GAAG;IAChE,aAAa,EAAE,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAAC;IACjC,WAAW,EAAE,KAAK,EAAE,CAAC;CACxB,CAkCA"}
|
@ -0,0 +1,8 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { deserialize } from 'cc';
|
||||
import D = deserialize.Internal;
|
||||
declare type IFileData = D.IFileData_;
|
||||
declare type IPackedFileData = D.IPackedFileData_;
|
||||
export default function packJSONs(datas: IFileData[]): IPackedFileData;
|
||||
export {};
|
||||
//# sourceMappingURL=pack-jsons.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"pack-jsons.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/pack-jsons.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,WAAW,EACd,MAAM,IAAI,CAAC;AAGZ,OAAO,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;AAShC,aAAK,SAAS,GAAG,CAAC,CAAC,UAAU,CAAC;AAE9B,aAAK,eAAe,GAAG,CAAC,CAAC,gBAAgB,CAAC;AAgL1C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,eAAe,CAwCrE"}
|
@ -0,0 +1,101 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { deserialize } from 'cc';
|
||||
import D = deserialize.Internal;
|
||||
declare type OtherObjectData = D.OtherObjectData_;
|
||||
declare type AnyData = D.AnyData_;
|
||||
import DataTypeID = D.DataTypeID_;
|
||||
declare type DataTypes = D.DataTypes_;
|
||||
declare type IClassObjectData = D.IClassObjectData_;
|
||||
declare type ICustomObjectData = D.ICustomObjectData_;
|
||||
declare type ICustomObjectDataContent = D.ICustomObjectDataContent_;
|
||||
declare type IDictData = D.IDictData_;
|
||||
declare type IMask = D.IMask_;
|
||||
declare type IClass = D.IClass_;
|
||||
export declare class TraceableItem {
|
||||
result: any;
|
||||
private tracers;
|
||||
private keys;
|
||||
static compareByRefCount(lhs: TraceableItem, rhs: TraceableItem): number;
|
||||
private static readonly NO_RESULT;
|
||||
constructor();
|
||||
traceBy(tracer: object, key: (string | number)): void;
|
||||
movedTo(index: number): void;
|
||||
}
|
||||
export declare class TraceableDict<T> {
|
||||
static readonly PLACEHOLDER = 0;
|
||||
private values;
|
||||
trace(source: any, tracer: object, key: (string | number)): TraceableItem;
|
||||
traceString(source: string, tracer: object, key: (string | number)): void;
|
||||
get(source: any): TraceableItem | undefined;
|
||||
getSortedItems(): TraceableItem[];
|
||||
dump(offset?: number): T[];
|
||||
}
|
||||
export interface IRefsBuilder {
|
||||
addRef(owner: Node, key: string | number, target: Node): number;
|
||||
}
|
||||
declare type DynamicType = DataTypeID.Array | DataTypeID.Dict | DataTypeID.Class | DataTypeID.CustomizedClass;
|
||||
declare type DerivedType = DataTypeID.InstanceRef | // 被多个对象复用时
|
||||
DataTypeID.SimpleType | // 可以完美被 json 序列化时
|
||||
DataTypeID.Array_AssetRefByInnerObj | DataTypeID.Array_Class | DataTypeID.Array_InstanceRef;
|
||||
declare type StaticType = DataTypeID.SimpleType | DataTypeID.ValueType | DataTypeID.ValueTypeCreated | DataTypeID.TRS | DataTypeID.AssetRefByInnerObj;
|
||||
export declare class Node {
|
||||
selfType: DynamicType | DerivedType;
|
||||
refCount: number;
|
||||
indexed: boolean;
|
||||
shouldBeIndexed: boolean;
|
||||
private _index;
|
||||
get instanceIndex(): number;
|
||||
set instanceIndex(val: number);
|
||||
get refType(): DynamicType | DerivedType;
|
||||
static compareByRefCount(lhs: Node, rhs: Node): number;
|
||||
constructor(dataTypeID: DynamicType);
|
||||
setStatic<T extends StaticType>(key: string | number, dataTypeID: T, data: DataTypes[T]): void;
|
||||
setDynamic(target: Node, key?: string | number): void;
|
||||
static readonly AssetPlaceholderType = DataTypeID.SimpleType;
|
||||
static readonly AssetPlaceholderValue: null;
|
||||
setAssetRefPlaceholderOnIndexed(key: string | number): void;
|
||||
dumpRecursively(refsBuilder: IRefsBuilder): (IClassObjectData | OtherObjectData);
|
||||
}
|
||||
export declare class ArrayNode extends Node {
|
||||
types: (DataTypeID | undefined)[];
|
||||
datas: (AnyData | Node)[];
|
||||
static DeriveTypes: D.DataTypeID_[][];
|
||||
constructor(length: number);
|
||||
setStatic(key: number, dataTypeID: StaticType, data: AnyData): void;
|
||||
setDynamic(target: Node, key: number): void;
|
||||
setAssetRefPlaceholderOnIndexed(key: number): void;
|
||||
dumpRecursively(refsBuilder: IRefsBuilder): (import("cc").__private._cocos_serialization_deserialize__AnyData | Node)[];
|
||||
}
|
||||
export declare class DictNode extends Node {
|
||||
data: IDictData;
|
||||
json: Record<string, DataTypes[DataTypeID.SimpleType]>;
|
||||
dynamics: Record<string, Node>;
|
||||
constructor();
|
||||
setStatic(key: string, dataTypeID: StaticType, value: AnyData): void;
|
||||
setDynamic(target: Node, key: string): void;
|
||||
dumpRecursively(refsBuilder: IRefsBuilder): IDictData | object;
|
||||
}
|
||||
export declare class ClassNode extends Node {
|
||||
ctor: string;
|
||||
simpleKeys: string[];
|
||||
private simpleValues;
|
||||
advanceds: (string | number | boolean | object | number[] | import("cc").__private._cocos_serialization_deserialize__IClassObjectData | import("cc").__private._cocos_serialization_deserialize__IClassObjectData[] | import("cc").__private._cocos_serialization_deserialize__IDictData | import("cc").__private._cocos_serialization_deserialize__IArrayData | import("cc").__private._cocos_serialization_deserialize__IValueTypeData | import("cc").__private._cocos_serialization_deserialize__ITRSData | import("cc").__private._cocos_serialization_deserialize__ICustomObjectData | Node | null | undefined)[];
|
||||
dumped: IClassObjectData | undefined;
|
||||
static fromData(clazz: IClass, mask: IMask, data: IClassObjectData): ClassNode;
|
||||
constructor(ctor: string);
|
||||
setStatic(key: string, dataTypeID: StaticType, value: AnyData): void;
|
||||
setDynamic(target: Node, key: string): void;
|
||||
dumpRecursively(refsBuilder: IRefsBuilder): IClassObjectData;
|
||||
}
|
||||
export declare class CustomClassNode extends Node {
|
||||
ctor: string;
|
||||
content: ICustomObjectDataContent;
|
||||
dumped: ICustomObjectData | undefined;
|
||||
static fromData(ctor: string, data: ICustomObjectData): CustomClassNode;
|
||||
constructor(ctor: string, content: ICustomObjectDataContent);
|
||||
setStatic(key: string, dataTypeID: StaticType, value: AnyData): void;
|
||||
setDynamic(target: Node, key: string): void;
|
||||
dumpRecursively(refsBuilder: IRefsBuilder): ICustomObjectData;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=types.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../source/editor-extends/utils/serialize/compiled/types.ts"],"names":[],"mappings":"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"}
|
@ -0,0 +1,74 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { Asset, ValueType, Constructor } from 'cc';
|
||||
import { IBuilder, IBuilderOptions, PropertyOptions, IArrayOptions, IClassOptions, ICustomClassOptions, IObjParsingInfo } from './parser';
|
||||
import { CCON } from 'cc/editor/serialization';
|
||||
declare namespace Format {
|
||||
export interface Class {
|
||||
__type__: string;
|
||||
[prop: string]: AnyItem;
|
||||
}
|
||||
export interface CustomizedClass extends Class {
|
||||
content: any;
|
||||
}
|
||||
export interface TypedArray extends Class {
|
||||
__type__: 'TypedArray';
|
||||
ctor: string;
|
||||
array: any[];
|
||||
}
|
||||
export interface InstanceReference {
|
||||
__id__: number;
|
||||
}
|
||||
export interface AssetReference {
|
||||
__uuid__: string;
|
||||
}
|
||||
type RawItem = number | string | boolean | null;
|
||||
type Item = Class | InstanceReference | RawItem;
|
||||
type Dict = {
|
||||
[key in string]: AnyItem;
|
||||
};
|
||||
type Array = AnyItem[];
|
||||
export type Object = Class | Dict | Array;
|
||||
export type AnyItem = Item | Dict | Array;
|
||||
export {};
|
||||
}
|
||||
interface IObjAndId extends IObjParsingInfo {
|
||||
data: Format.AnyItem;
|
||||
id: number;
|
||||
}
|
||||
export default class DynamicBuilder implements IBuilder {
|
||||
stringify: boolean;
|
||||
minify: boolean;
|
||||
forceInline: boolean;
|
||||
private serializedList;
|
||||
constructor(options: IBuilderOptions);
|
||||
setProperty_Array(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: IArrayOptions): IObjAndId;
|
||||
setProperty_Dict(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: PropertyOptions): IObjAndId;
|
||||
private addObject;
|
||||
setProperty_Class(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: IClassOptions): IObjAndId;
|
||||
setProperty_CustomizedClass(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, options: ICustomClassOptions): IObjAndId;
|
||||
setProperty_ParsedObject(ownerInfo: IObjAndId, key: string | number, valueInfo: IObjAndId, formerlySerializedAs: string | null): void;
|
||||
setProperty_Raw(owner: object, ownerInfo: IObjAndId, key: string | number, value: any, options: PropertyOptions): void;
|
||||
setProperty_ValueType(owner: object | null, ownerInfo: IObjAndId | null, key: string | number, value: ValueType, options: PropertyOptions): IObjAndId;
|
||||
setProperty_TypedArray(owner: object, ownerInfo: IObjAndId, key: string | number, value: any, options: PropertyOptions): void;
|
||||
setProperty_AssetUuid(owner: object, ownerInfo: IObjAndId, key: string | number, uuid: string, options: PropertyOptions): void;
|
||||
setRoot(objInfo: IObjAndId): void;
|
||||
dump(): object | string | CCON;
|
||||
private _useCCON;
|
||||
private _mainBufferBuilder;
|
||||
private _dumpAsJson;
|
||||
private _dumpAsCCON;
|
||||
private _getMainJsonData;
|
||||
}
|
||||
/**
|
||||
* Create a pseudo object which will be force serialized as a reference to any asset by specified uuid.
|
||||
*/
|
||||
export declare function asAsset(uuid: string, type?: Constructor<Asset>): Asset | null;
|
||||
/**
|
||||
* Set the asset's name directly in JSON object
|
||||
*/
|
||||
export declare function setName(data: Format.AnyItem, name: string): void;
|
||||
export declare function findRootObject(data: Format.AnyItem, type: string): string | number | boolean | Format.InstanceReference | {
|
||||
[x: string]: Format.AnyItem;
|
||||
} | null;
|
||||
export {};
|
||||
//# sourceMappingURL=dynamic-builder.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"dynamic-builder.d.ts","sourceRoot":"","sources":["../../../../source/editor-extends/utils/serialize/dynamic-builder.ts"],"names":[],"mappings":"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"}
|
@ -0,0 +1,13 @@
|
||||
import { IOptions } from './parser';
|
||||
export declare function serialize(obj: Exclude<any, null | undefined>, options?: IOptions): string | object;
|
||||
export declare namespace serialize {
|
||||
var asAsset: typeof import("./dynamic-builder").asAsset;
|
||||
var setName: typeof import("./dynamic-builder").setName;
|
||||
var findRootObject: typeof import("./dynamic-builder").findRootObject;
|
||||
}
|
||||
export declare function serializeCompiled(obj: Exclude<any, null | undefined>, options: IOptions): string | object;
|
||||
export declare namespace serializeCompiled {
|
||||
var getRootData: typeof import("./compiled/builder").getRootData;
|
||||
var packJSONs: typeof import("./compiled/pack-jsons").default;
|
||||
}
|
||||
//# sourceMappingURL=index.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/editor-extends/utils/serialize/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,QAAQ,EAAE,MAAM,UAAU,CAAC;AAI5D,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,GAAG,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAwBlG;yBAxBe,SAAS;;;;;AA8BzB,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,GAAC,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAMvG;yBANe,iBAAiB"}
|
@ -0,0 +1,112 @@
|
||||
/// <reference types="../../../../node_modules/cc/cc" />
|
||||
import { ValueType } from 'cc';
|
||||
interface IPropertyOptions {
|
||||
formerlySerializedAs?: string;
|
||||
defaultValue?: any;
|
||||
expectedType?: string;
|
||||
}
|
||||
export declare type PropertyOptions = IPropertyOptions | null;
|
||||
export interface IArrayOptions extends IPropertyOptions {
|
||||
writeOnlyArray: any[];
|
||||
}
|
||||
export interface IClassOptions extends IPropertyOptions {
|
||||
type: string;
|
||||
/**
|
||||
* 此类的实例永远只会被一个地方引用到。
|
||||
*/
|
||||
uniquelyReferenced?: boolean;
|
||||
}
|
||||
export interface ICustomClassOptions extends IClassOptions {
|
||||
content: any;
|
||||
}
|
||||
export interface IObjParsingInfo {
|
||||
}
|
||||
export interface IBuilder {
|
||||
setProperty_Raw(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||
setProperty_Class(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IClassOptions): IObjParsingInfo;
|
||||
setProperty_CustomizedClass(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: ICustomClassOptions): IObjParsingInfo;
|
||||
setProperty_ValueType(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, value: ValueType, options: PropertyOptions): IObjParsingInfo | null;
|
||||
setProperty_TypedArray(owner: object, ownerInfo: IObjParsingInfo, key: string | number, value: any, options: PropertyOptions): void;
|
||||
setProperty_AssetUuid(owner: object, ownerInfo: IObjParsingInfo, key: string | number, uuid: string, options: PropertyOptions): void;
|
||||
setProperty_Array(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: IArrayOptions): IObjParsingInfo;
|
||||
setProperty_Dict(owner: object | null, ownerInfo: IObjParsingInfo | null, key: string | number, options: PropertyOptions): IObjParsingInfo;
|
||||
setProperty_ParsedObject(ownerInfo: IObjParsingInfo, key: string | number, valueInfo: IObjParsingInfo, formerlySerializedAs: string | null): void;
|
||||
setRoot(objInfo: IObjParsingInfo): void;
|
||||
dump(): any;
|
||||
}
|
||||
export interface IBuilderOptions {
|
||||
builder?: 'dynamic' | 'compiled';
|
||||
stringify?: boolean;
|
||||
minify?: boolean;
|
||||
noNativeDep?: boolean;
|
||||
forceInline?: boolean;
|
||||
/**
|
||||
* Outputs as CCON.
|
||||
*
|
||||
* CCON denotes `Cocos Creator Object Notation`(let's imagine JSON as JavaScript Object Notation).
|
||||
* It allows binary representation of some value but loses the readability.
|
||||
*
|
||||
* CCON can be represented as two formal:
|
||||
* - JSON + Binary file(s)
|
||||
* - Single Binary file
|
||||
* However `serialize()` produces whole `CCON` and you could select a suitable formal.
|
||||
* As Cocos Creator 3.3, the `useCCON` only be turned on
|
||||
* when it's going to serialize `AnimationClip` into library or into production.
|
||||
*/
|
||||
useCCON?: boolean;
|
||||
}
|
||||
export interface IParserOptions {
|
||||
compressUuid?: boolean;
|
||||
discardInvalid?: boolean;
|
||||
dontStripDefault?: boolean;
|
||||
missingClassReporter?: any;
|
||||
missingObjectReporter?: any;
|
||||
reserveContentsForSyncablePrefab?: boolean;
|
||||
_exporting?: boolean;
|
||||
useCCON?: boolean;
|
||||
keepNodeUuid?: boolean;
|
||||
recordAssetDepends?: string[];
|
||||
}
|
||||
export declare class Parser {
|
||||
exporting: boolean;
|
||||
mustCompresseUuid: boolean;
|
||||
discardInvalid: boolean;
|
||||
dontStripDefault: boolean;
|
||||
missingClassReporter: any;
|
||||
missingObjectReporter: any;
|
||||
reserveContentsForAllSyncablePrefab: boolean;
|
||||
keepNodeUuid: boolean;
|
||||
recordAssetDepends: IParserOptions['recordAssetDepends'];
|
||||
private builder;
|
||||
private root;
|
||||
private prefabRoot;
|
||||
private assetExists;
|
||||
private parsingInfos;
|
||||
private customExportingCtxCache;
|
||||
private _serializationContext;
|
||||
private assetDepends?;
|
||||
constructor(builder: IBuilder, options: IParserOptions);
|
||||
parse(obj: object): void;
|
||||
private checkMissingAsset;
|
||||
private isObjRemoved;
|
||||
private setParsedObj;
|
||||
private verifyNotParsedValue;
|
||||
private canDiscardByPrefabRoot;
|
||||
private enumerateClass;
|
||||
static isDefaultTrs(trs: any): boolean;
|
||||
private parseField;
|
||||
/**
|
||||
* 解析对象
|
||||
* 1. 调用 builder 的 API 声明一个新的【空对象】
|
||||
* 2. 对可引用对象,标记解析状态,防止循环解析
|
||||
* 3. 【最后】枚举对象包含的其它属性
|
||||
*/
|
||||
private parseObjField;
|
||||
private enumerateDict;
|
||||
private enumerateBindedDict;
|
||||
}
|
||||
export interface IOptions extends IParserOptions, IBuilderOptions {
|
||||
}
|
||||
export default function serialize(obj: Exclude<any, null | undefined>, options: IOptions): string | object;
|
||||
export {};
|
||||
//# sourceMappingURL=parser.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../source/editor-extends/utils/serialize/parser.ts"],"names":[],"mappings":"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"}
|
16
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/utils/uuid.d.ts
vendored
Normal file
16
extensions/uistate-inspector/@types/packages/engine/@types/editor-extends/utils/uuid.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
export declare const NonUuidMark = ".";
|
||||
export declare function compressUuid(uuid: string, min: boolean): string;
|
||||
export declare function compressHex(hexString: string, reservedHeadLength: number): string;
|
||||
export declare function decompressUuid(uuid: string): string;
|
||||
export declare function isUuid(str: string): boolean;
|
||||
export declare function getUuidFromLibPath(path: string): string;
|
||||
export declare function uuid(compress?: boolean): string;
|
||||
/**
|
||||
* 从一个名字转换成一个 id
|
||||
* 这是个有损压缩,并不能够还原成原来的名字
|
||||
* 注意:此方法需要和 asset-db 保持一致
|
||||
* @param id
|
||||
* @param extend
|
||||
*/
|
||||
export declare function nameToSubId(name: string, extend?: number): string;
|
||||
//# sourceMappingURL=uuid.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"uuid.d.ts","sourceRoot":"","sources":["../../../source/editor-extends/utils/uuid.ts"],"names":[],"mappings":"AA6CA,eAAO,MAAM,WAAW,MAAM,CAAC;AAU/B,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,UAOtD;AAYD,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,UAmBxE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,UAQ1C;AAiCD,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,WAEjC;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAM9C;AAED,wBAAgB,IAAI,CAAC,QAAQ,UAAO,UAGnC;AASD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAI,UAOnD"}
|
23
extensions/uistate-inspector/@types/packages/engine/@types/engine-compiler/index.d.ts
vendored
Normal file
23
extensions/uistate-inspector/@types/packages/engine/@types/engine-compiler/index.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
interface IRebuildOptions {
|
||||
debugNative?: boolean;
|
||||
isNativeScene?: boolean;
|
||||
}
|
||||
export declare function compileEngine(directory: string, force?: boolean): Promise<void>;
|
||||
export declare function rebuild(options?: IRebuildOptions): Promise<void>;
|
||||
export declare function rebuildImportMaps(): Promise<void>;
|
||||
interface IEngineGlobalConfig {
|
||||
'builtin': boolean;
|
||||
'custom': string;
|
||||
}
|
||||
/**
|
||||
* 根据全局配置与项目配置、默认值等计算出真正的引擎使用路径
|
||||
* @param globalConfig
|
||||
* @param projectConfig
|
||||
* @param builtinPath
|
||||
*/
|
||||
export declare function getRightEngine(config: IEngineGlobalConfig, builtinPath: string): {
|
||||
version: string;
|
||||
path: string;
|
||||
};
|
||||
export * as default from './index';
|
||||
//# sourceMappingURL=index.d.ts.map
|
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../static/engine-compiler/source/index.ts"],"names":[],"mappings":"AAqBA,UAAU,eAAe;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B;AACD,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,iBA8CrE;AAuED,wBAAsB,OAAO,CAAC,OAAO,CAAC,EAAE,eAAe,iBA6CtD;AAED,wBAAsB,iBAAiB,kBAkBtC;AAuOD,UAAU,mBAAmB;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM;;;EAY9E;AAiHD,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA"}
|
15
extensions/uistate-inspector/@types/packages/engine/@types/index.d.ts
vendored
Normal file
15
extensions/uistate-inspector/@types/packages/engine/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export * from './module';
|
||||
export interface EngineInfo {
|
||||
typescript: {
|
||||
type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义)
|
||||
custom: string; // 自定义引擎地址
|
||||
builtin: string, // 内置引擎地址
|
||||
path: string; // 当前使用的引擎路径,为空也表示编译失败
|
||||
},
|
||||
native: {
|
||||
type: 'builtin' | 'custom'; // 当前使用的引擎类型(内置或自定义)
|
||||
custom: string; // 自定义引擎地址
|
||||
builtin: string; // 内置引擎地址
|
||||
path: string; // 当前使用的引擎路径,为空也表示编译失败
|
||||
},
|
||||
}
|
22
extensions/uistate-inspector/@types/packages/engine/@types/message.d.ts
vendored
Normal file
22
extensions/uistate-inspector/@types/packages/engine/@types/message.d.ts
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
import { EngineInfo } from './index';
|
||||
export interface message extends EditorMessageMap {
|
||||
'query-info': {
|
||||
params: [] | [
|
||||
string,
|
||||
],
|
||||
result: {
|
||||
version: string;
|
||||
path: string;
|
||||
nativeVersion: string; // 原生引擎类型 'custom' 'builtin'
|
||||
nativePath: string;
|
||||
editor: string;
|
||||
},
|
||||
},
|
||||
'query-engine-info': {
|
||||
params: [] | [
|
||||
string,
|
||||
],
|
||||
result: EngineInfo,
|
||||
},
|
||||
}
|
||||
|
78
extensions/uistate-inspector/@types/packages/engine/@types/module.d.ts
vendored
Normal file
78
extensions/uistate-inspector/@types/packages/engine/@types/module.d.ts
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
|
||||
export type IModules = Record<string, IModuleItem>;
|
||||
|
||||
export interface IFlagBaseItem {
|
||||
/**
|
||||
* Display text.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
native?: string;
|
||||
|
||||
wechatPlugin?: boolean;
|
||||
|
||||
default?: string[];
|
||||
}
|
||||
|
||||
export interface IBaseItem {
|
||||
/**
|
||||
* Display text.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
required?: boolean;
|
||||
|
||||
native?: string;
|
||||
|
||||
wechatPlugin?: boolean;
|
||||
}
|
||||
|
||||
export interface IModuleItem extends IBaseItem {
|
||||
/**
|
||||
* Display text.
|
||||
*/
|
||||
label: string;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Whether if the feature of options allow multiple selection.
|
||||
*/
|
||||
multi?: boolean;
|
||||
|
||||
/**
|
||||
* If have default it will checked
|
||||
*/
|
||||
default?: string[];
|
||||
|
||||
options?: Record<string, IBaseItem>;
|
||||
|
||||
category?: string;
|
||||
|
||||
flags?: Record<string, IFlagBaseItem>;
|
||||
}
|
||||
|
||||
export interface IDisplayModuleItem extends IModuleItem {
|
||||
_value: boolean;
|
||||
_option?: string;
|
||||
options?: Record<string, IDisplayModuleItem>;
|
||||
}
|
||||
|
||||
export interface IDisplayModuleCache {
|
||||
_value: boolean;
|
||||
_option?: string;
|
||||
flags?: Record<string, boolean>;
|
||||
}
|
15
extensions/uistate-inspector/@types/packages/fb-instant-games/@types/index.d.ts
vendored
Normal file
15
extensions/uistate-inspector/@types/packages/fb-instant-games/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/// <reference path='../../../@types/index'/>
|
||||
export * from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
import { IInternalBuildOptions, IPolyFills, ISettings } from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
export type IOrientation = 'auto' | 'landscape' | 'portrait';
|
||||
export interface IOptions {
|
||||
orientation: IOrientation;
|
||||
embedWebDebugger: boolean;
|
||||
}
|
||||
export interface ITaskOption extends IInternalBuildOptions {
|
||||
packages: {
|
||||
'fb-instant-games': IOptions;
|
||||
}
|
||||
}
|
50
extensions/uistate-inspector/@types/packages/huawei-agc/@types/index.d.ts
vendored
Normal file
50
extensions/uistate-inspector/@types/packages/huawei-agc/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
/// <reference path='../../../@types/index'/>
|
||||
export * from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
import { IInternalBuildOptions, InternalBuildResult } from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
export type IOrientation = 'landscape' | 'portrait';
|
||||
|
||||
export interface ITaskOption extends IInternalBuildOptions {
|
||||
packages: {
|
||||
'android': IOptions;
|
||||
}
|
||||
}
|
||||
|
||||
export type IAppABI = 'armeabi-v7a' | 'arm64-v8a' | 'x86' | 'x86_64';
|
||||
|
||||
export interface IOptions {
|
||||
packageName: string;
|
||||
orientation: {
|
||||
landscapeRight: boolean;
|
||||
landscapeLeft: boolean;
|
||||
portrait: boolean;
|
||||
upsideDown: boolean;
|
||||
},
|
||||
|
||||
apiLevel: number;
|
||||
appABIs: IAppABI[];
|
||||
|
||||
useDebugKeystore: boolean;
|
||||
keystorePath: string;
|
||||
keystorePassword: string;
|
||||
keystoreAlias: string;
|
||||
keystoreAliasPassword: string;
|
||||
|
||||
appBundle: boolean;
|
||||
androidInstant: boolean;
|
||||
remoteUrl: string;
|
||||
sdkPath: string;
|
||||
ndkPath: string;
|
||||
|
||||
renderBackEnd: {
|
||||
vulkan: boolean;
|
||||
gles3: boolean;
|
||||
gles2: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IBuildResult extends InternalBuildResult {
|
||||
userFrameWorks: boolean; // 是否使用用户的配置数据
|
||||
}
|
32
extensions/uistate-inspector/@types/packages/huawei-quick-game/@types/index.d.ts
vendored
Normal file
32
extensions/uistate-inspector/@types/packages/huawei-quick-game/@types/index.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/// <reference path='../../../@types/index'/>
|
||||
export * from '@editor/library-type/packages/builder/@types/protect';
|
||||
import { IInternalBuildOptions } from '@editor/library-type/packages/builder/@types/protect';
|
||||
|
||||
export type IOrientation = 'landscape' | 'portrait';
|
||||
|
||||
export interface ITaskOption extends IInternalBuildOptions {
|
||||
packages: {
|
||||
'huawei-quick-game': IOptions;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IOptions {
|
||||
package: string;
|
||||
icon: string;
|
||||
versionName: string;
|
||||
versionCode: string;
|
||||
minPlatformVersion: string;
|
||||
deviceOrientation: IOrientation;
|
||||
useDebugKey: boolean;
|
||||
privatePemPath: string;
|
||||
certificatePemPath: string;
|
||||
|
||||
fullScreen: boolean;
|
||||
logLevel: string;
|
||||
manifestPath?: string;
|
||||
separateEngine: boolean;
|
||||
}
|
||||
|
||||
export interface ICompileOptions {
|
||||
name: string;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user