knight-web 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/frame/base/AbstractObject.d.ts +36 -36
- package/frame/base/AbstractPanel.d.ts +4 -4
- package/frame/base/index.d.ts +2 -2
- package/frame/core/Knight.d.ts +42 -42
- package/frame/core/Navgation.d.ts +26 -26
- package/frame/core/index.d.ts +2 -2
- package/frame/index.d.ts +3 -4
- package/frame/utility/BrowserUtility.d.ts +320 -320
- package/frame/utility/ConfigUtility.d.ts +33 -33
- package/frame/utility/CryptoUtility.d.ts +215 -215
- package/frame/utility/EnumUtility.d.ts +886 -886
- package/frame/utility/FileUtility.d.ts +31 -31
- package/frame/utility/InputUtility.d.ts +20 -20
- package/frame/utility/InterfaceUtility.d.ts +13 -13
- package/frame/utility/LogUtility.d.ts +44 -44
- package/frame/utility/MathUtility.d.ts +559 -559
- package/frame/utility/NetworkUtility.d.ts +155 -155
- package/frame/utility/ObjectUtility.d.ts +308 -308
- package/frame/utility/ProfilerUtility.d.ts +37 -37
- package/frame/utility/PromiseUtility.d.ts +89 -89
- package/frame/utility/ReflectionUtility.d.ts +316 -316
- package/frame/utility/StringUtility.d.ts +55 -55
- package/frame/utility/index.d.ts +15 -15
- package/index.d.ts +1 -1
- package/knight-web.js +84 -0
- package/knight-web.js.map +1 -0
- package/package.json +2 -2
- package/readme.md +36 -0
- package/knight.js +0 -63
- package/knight.js.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/** 文件工具 */
|
|
2
|
-
export declare namespace FileUtility {
|
|
3
|
-
/** 路径工具 */
|
|
4
|
-
class Path {
|
|
5
|
-
/** 根据URL获取拓展名 */
|
|
6
|
-
static ExtName(_url: string): string;
|
|
7
|
-
/** 根据URL获取拓展名 */
|
|
8
|
-
static ExtNameWithoutPoint(_url: string): string;
|
|
9
|
-
/** 根据URL获取文件名(包含拓展名) */
|
|
10
|
-
static Name(_url: string): string;
|
|
11
|
-
/** 根据URL获取文件名(不包含拓展名) */
|
|
12
|
-
static OnlyName(_url: string): string;
|
|
13
|
-
/** 根据URL获取文件路径 */
|
|
14
|
-
static DirName(_url: string): string;
|
|
15
|
-
}
|
|
16
|
-
/** 文件工具 */
|
|
17
|
-
class File {
|
|
18
|
-
/** 加载Script脚本(动态加载指定的本地 JavaScript 文件) */
|
|
19
|
-
static LoadScript(_src: string, _callback: (_error: Error, _script?: HTMLScriptElement) => void): void;
|
|
20
|
-
/** 加载进制文件 */
|
|
21
|
-
static LoadBinaryFile(_url: string): Promise<Uint8Array>;
|
|
22
|
-
/** 将字节数组转为Hex16进制数组 */
|
|
23
|
-
static ByteArrayToHex(_binaryArray: Uint8Array, _bit: number): Array<string>;
|
|
24
|
-
/** 读取文件 */
|
|
25
|
-
static ReadFile<T extends {}>(_blob: Blob): Promise<Uint8Array>;
|
|
26
|
-
/** 读取文件执行函数 */
|
|
27
|
-
private static OnExecutorReadFile;
|
|
28
|
-
/** 解析Excel的XLSX数据 */
|
|
29
|
-
static ParseXLSXData<T extends {}>(_arrayData: Uint8Array): Array<T[]>;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
/** 文件工具 */
|
|
2
|
+
export declare namespace FileUtility {
|
|
3
|
+
/** 路径工具 */
|
|
4
|
+
class Path {
|
|
5
|
+
/** 根据URL获取拓展名 */
|
|
6
|
+
static ExtName(_url: string): string;
|
|
7
|
+
/** 根据URL获取拓展名 */
|
|
8
|
+
static ExtNameWithoutPoint(_url: string): string;
|
|
9
|
+
/** 根据URL获取文件名(包含拓展名) */
|
|
10
|
+
static Name(_url: string): string;
|
|
11
|
+
/** 根据URL获取文件名(不包含拓展名) */
|
|
12
|
+
static OnlyName(_url: string): string;
|
|
13
|
+
/** 根据URL获取文件路径 */
|
|
14
|
+
static DirName(_url: string): string;
|
|
15
|
+
}
|
|
16
|
+
/** 文件工具 */
|
|
17
|
+
class File {
|
|
18
|
+
/** 加载Script脚本(动态加载指定的本地 JavaScript 文件) */
|
|
19
|
+
static LoadScript(_src: string, _callback: (_error: Error, _script?: HTMLScriptElement) => void): void;
|
|
20
|
+
/** 加载进制文件 */
|
|
21
|
+
static LoadBinaryFile(_url: string): Promise<Uint8Array>;
|
|
22
|
+
/** 将字节数组转为Hex16进制数组 */
|
|
23
|
+
static ByteArrayToHex(_binaryArray: Uint8Array, _bit: number): Array<string>;
|
|
24
|
+
/** 读取文件 */
|
|
25
|
+
static ReadFile<T extends {}>(_blob: Blob): Promise<Uint8Array>;
|
|
26
|
+
/** 读取文件执行函数 */
|
|
27
|
+
private static OnExecutorReadFile;
|
|
28
|
+
/** 解析Excel的XLSX数据 */
|
|
29
|
+
static ParseXLSXData<T extends {}>(_arrayData: Uint8Array): Array<T[]>;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { EnumUtility } from "./EnumUtility";
|
|
2
|
-
import { InterfaceUtility } from "./InterfaceUtility";
|
|
3
|
-
/** 输入工具 */
|
|
4
|
-
export declare namespace InputUtility {
|
|
5
|
-
/** 输入类 */
|
|
6
|
-
class Input {
|
|
7
|
-
/** 构造函数 */
|
|
8
|
-
constructor();
|
|
9
|
-
/** 注册 */
|
|
10
|
-
RegistGlobalEvent(_eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
11
|
-
/** 注销 */
|
|
12
|
-
DegistGlobalEvent(_eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
13
|
-
/** 注册 */
|
|
14
|
-
RegistTargetEvent(_target: HTMLElement, _eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
15
|
-
/** 注销 */
|
|
16
|
-
DegistTargetEvent(_target: HTMLElement, _eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
17
|
-
/** 事件回调函数 */
|
|
18
|
-
private OnEventCallBack;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
import { EnumUtility } from "./EnumUtility";
|
|
2
|
+
import { InterfaceUtility } from "./InterfaceUtility";
|
|
3
|
+
/** 输入工具 */
|
|
4
|
+
export declare namespace InputUtility {
|
|
5
|
+
/** 输入类 */
|
|
6
|
+
class Input {
|
|
7
|
+
/** 构造函数 */
|
|
8
|
+
constructor();
|
|
9
|
+
/** 注册 */
|
|
10
|
+
RegistGlobalEvent(_eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
11
|
+
/** 注销 */
|
|
12
|
+
DegistGlobalEvent(_eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
13
|
+
/** 注册 */
|
|
14
|
+
RegistTargetEvent(_target: HTMLElement, _eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
15
|
+
/** 注销 */
|
|
16
|
+
DegistTargetEvent(_target: HTMLElement, _eType: EnumUtility.E_EventType, _eventCallBack: InterfaceUtility.IEvent<Event>, _options?: boolean | AddEventListenerOptions): void;
|
|
17
|
+
/** 事件回调函数 */
|
|
18
|
+
private OnEventCallBack;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/** 接口模块 */
|
|
2
|
-
export declare namespace InterfaceUtility {
|
|
3
|
-
/** 类型泛型接口(构造器签名接口) */
|
|
4
|
-
type IType<T> = new (...args: any[]) => T;
|
|
5
|
-
/** 行为类型泛型接口(类似于C#中的Action使用方法) */
|
|
6
|
-
interface IAction<T = any, K = any, M = any, N = any, Q = any, U = any, V = any, W = any> {
|
|
7
|
-
(t?: T, k?: K, m?: M, n?: N, q?: Q, u?: U, v?: V, w?: W): any;
|
|
8
|
-
}
|
|
9
|
-
/** 事件类型泛型接口(类似于C#中的Event使用方法) */
|
|
10
|
-
interface IEvent<T = any, K = any, M = any, N = any, Q = any, U = any, V = any, W = any> {
|
|
11
|
-
(t?: T, k?: K, m?: M, n?: N, q?: Q, u?: U, v?: V, w?: W): any;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
/** 接口模块 */
|
|
2
|
+
export declare namespace InterfaceUtility {
|
|
3
|
+
/** 类型泛型接口(构造器签名接口) */
|
|
4
|
+
type IType<T> = new (...args: any[]) => T;
|
|
5
|
+
/** 行为类型泛型接口(类似于C#中的Action使用方法) */
|
|
6
|
+
interface IAction<T = any, K = any, M = any, N = any, Q = any, U = any, V = any, W = any> {
|
|
7
|
+
(t?: T, k?: K, m?: M, n?: N, q?: Q, u?: U, v?: V, w?: W): any;
|
|
8
|
+
}
|
|
9
|
+
/** 事件类型泛型接口(类似于C#中的Event使用方法) */
|
|
10
|
+
interface IEvent<T = any, K = any, M = any, N = any, Q = any, U = any, V = any, W = any> {
|
|
11
|
+
(t?: T, k?: K, m?: M, n?: N, q?: Q, u?: U, v?: V, w?: W): any;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/*********************************************************************************
|
|
2
|
-
* FileName : LogUtility
|
|
3
|
-
* FileBasename : LogUtility.ts
|
|
4
|
-
* Description : 日志工具
|
|
5
|
-
* Version : V1.0.0
|
|
6
|
-
* Date : Wed Mar 02 2022 17:03:42 GMT+0800 (中国标准时间)
|
|
7
|
-
* Path : db://assets/Script/Utility/LogUtility.ts
|
|
8
|
-
* Author : Seven_9t
|
|
9
|
-
* Others : 修改默认TS脚本模板路径 C:\CocosDashboard_1.0.12\resources\.editors\Creator\<Version>\resources\resources\3d\engine\editor\assets\default_file_content\ts
|
|
10
|
-
* ManualUrl : <指南手册> https://docs.cocos.com/creator/3.4/manual/zh/
|
|
11
|
-
* : <脚本手册> https://docs.cocos.com/creator/3.4/manual/zh/scripting/
|
|
12
|
-
* : <CC类手册> https://docs.cocos.com/creator/3.4/manual/zh/scripting/decorator.html
|
|
13
|
-
* : <生命周期手册>https://docs.cocos.com/creator/3.4/manual/zh/scripting/life-cycle-callbacks.html
|
|
14
|
-
|
|
15
|
-
**********************************************************************************/
|
|
16
|
-
/** 日志工具 */
|
|
17
|
-
export declare namespace LogUtility {
|
|
18
|
-
/** 是否开启日志 */
|
|
19
|
-
const Switch: boolean;
|
|
20
|
-
/** 是否显示堆栈信息 */
|
|
21
|
-
const Stack: boolean;
|
|
22
|
-
/** 系统名称 */
|
|
23
|
-
const Name: string;
|
|
24
|
-
/** 日志标签 */
|
|
25
|
-
const Flag: string;
|
|
26
|
-
/** 设置日志开关 */
|
|
27
|
-
function SetSwitch(_value: boolean): void;
|
|
28
|
-
/** 提示日志 */
|
|
29
|
-
function LogTip(..._message: any[]): void;
|
|
30
|
-
/** 信息日志*/
|
|
31
|
-
function LogInfo(..._message: any[]): void;
|
|
32
|
-
/** 警告日志 */
|
|
33
|
-
function LogWarning(..._message: any[]): void;
|
|
34
|
-
/** 错误日志 */
|
|
35
|
-
function LogError(..._message: any[]): void;
|
|
36
|
-
/** 系统日志 */
|
|
37
|
-
function LogSystem(..._message: any[]): void;
|
|
38
|
-
/** 输出日志 */
|
|
39
|
-
function Print(_head: string, _color: string, ..._message: any[]): void;
|
|
40
|
-
/** 获取日期字符串 */
|
|
41
|
-
function getDateString(): string;
|
|
42
|
-
/** 调用堆栈 */
|
|
43
|
-
function OnStack(): string;
|
|
44
|
-
}
|
|
1
|
+
/*********************************************************************************
|
|
2
|
+
* FileName : LogUtility
|
|
3
|
+
* FileBasename : LogUtility.ts
|
|
4
|
+
* Description : 日志工具
|
|
5
|
+
* Version : V1.0.0
|
|
6
|
+
* Date : Wed Mar 02 2022 17:03:42 GMT+0800 (中国标准时间)
|
|
7
|
+
* Path : db://assets/Script/Utility/LogUtility.ts
|
|
8
|
+
* Author : Seven_9t
|
|
9
|
+
* Others : 修改默认TS脚本模板路径 C:\CocosDashboard_1.0.12\resources\.editors\Creator\<Version>\resources\resources\3d\engine\editor\assets\default_file_content\ts
|
|
10
|
+
* ManualUrl : <指南手册> https://docs.cocos.com/creator/3.4/manual/zh/
|
|
11
|
+
* : <脚本手册> https://docs.cocos.com/creator/3.4/manual/zh/scripting/
|
|
12
|
+
* : <CC类手册> https://docs.cocos.com/creator/3.4/manual/zh/scripting/decorator.html
|
|
13
|
+
* : <生命周期手册>https://docs.cocos.com/creator/3.4/manual/zh/scripting/life-cycle-callbacks.html
|
|
14
|
+
|
|
15
|
+
**********************************************************************************/
|
|
16
|
+
/** 日志工具 */
|
|
17
|
+
export declare namespace LogUtility {
|
|
18
|
+
/** 是否开启日志 */
|
|
19
|
+
const Switch: boolean;
|
|
20
|
+
/** 是否显示堆栈信息 */
|
|
21
|
+
const Stack: boolean;
|
|
22
|
+
/** 系统名称 */
|
|
23
|
+
const Name: string;
|
|
24
|
+
/** 日志标签 */
|
|
25
|
+
const Flag: string;
|
|
26
|
+
/** 设置日志开关 */
|
|
27
|
+
function SetSwitch(_value: boolean): void;
|
|
28
|
+
/** 提示日志 */
|
|
29
|
+
function LogTip(..._message: any[]): void;
|
|
30
|
+
/** 信息日志*/
|
|
31
|
+
function LogInfo(..._message: any[]): void;
|
|
32
|
+
/** 警告日志 */
|
|
33
|
+
function LogWarning(..._message: any[]): void;
|
|
34
|
+
/** 错误日志 */
|
|
35
|
+
function LogError(..._message: any[]): void;
|
|
36
|
+
/** 系统日志 */
|
|
37
|
+
function LogSystem(..._message: any[]): void;
|
|
38
|
+
/** 输出日志 */
|
|
39
|
+
function Print(_head: string, _color: string, ..._message: any[]): void;
|
|
40
|
+
/** 获取日期字符串 */
|
|
41
|
+
function getDateString(): string;
|
|
42
|
+
/** 调用堆栈 */
|
|
43
|
+
function OnStack(): string;
|
|
44
|
+
}
|