@esengine/ecs-framework 2.3.1 → 2.3.2
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/{dist/index.cjs → index.cjs} +1 -1
- package/{dist/index.cjs.map → index.cjs.map} +1 -1
- package/{dist/index.d.ts → index.d.ts} +17 -2
- package/{dist/index.es5.js → index.es5.js} +1 -1
- package/{dist/index.umd.js.map → index.es5.js.map} +1 -1
- package/{dist/index.mjs → index.mjs} +1 -1
- package/{dist/index.mjs.map → index.mjs.map} +1 -1
- package/{dist/index.umd.js → index.umd.js} +1 -1
- package/{dist/index.es5.js.map → index.umd.js.map} +1 -1
- package/package.json +24 -64
- package/dist/package.json +0 -47
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @esengine/ecs-framework v2.3.
|
|
2
|
+
* @esengine/ecs-framework v2.3.2
|
|
3
3
|
* TypeScript definitions
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -7576,6 +7576,20 @@ interface WorkerSystemConfig {
|
|
|
7576
7576
|
entityDataSize?: number;
|
|
7577
7577
|
/** 最大实体数量(用于预分配SharedArrayBuffer) */
|
|
7578
7578
|
maxEntities?: number;
|
|
7579
|
+
/**
|
|
7580
|
+
* 预编译 Worker 脚本路径(微信小游戏等不支持动态脚本的平台必需)
|
|
7581
|
+
* Pre-compiled Worker script path (required for platforms like WeChat Mini Game that don't support dynamic scripts)
|
|
7582
|
+
*
|
|
7583
|
+
* @example
|
|
7584
|
+
* ```typescript
|
|
7585
|
+
* // 微信小游戏使用方式:
|
|
7586
|
+
* // 1. 创建 Worker 文件: workers/physics-worker.js
|
|
7587
|
+
* // 2. 在 game.json 配置 "workers": "workers"
|
|
7588
|
+
* // 3. 指定路径:
|
|
7589
|
+
* workerScriptPath: 'workers/physics-worker.js'
|
|
7590
|
+
* ```
|
|
7591
|
+
*/
|
|
7592
|
+
workerScriptPath?: string;
|
|
7579
7593
|
}
|
|
7580
7594
|
/**
|
|
7581
7595
|
* SharedArrayBuffer处理函数类型
|
|
@@ -7721,9 +7735,10 @@ type SharedArrayBufferProcessFunction = (sharedFloatArray: Float32Array, startIn
|
|
|
7721
7735
|
* ```
|
|
7722
7736
|
*/
|
|
7723
7737
|
declare abstract class WorkerEntitySystem<TEntityData = any> extends EntitySystem {
|
|
7724
|
-
protected config: Required<Omit<WorkerSystemConfig, 'systemConfig' | 'entitiesPerWorker'>> & {
|
|
7738
|
+
protected config: Required<Omit<WorkerSystemConfig, 'systemConfig' | 'entitiesPerWorker' | 'workerScriptPath'>> & {
|
|
7725
7739
|
systemConfig?: any;
|
|
7726
7740
|
entitiesPerWorker?: number;
|
|
7741
|
+
workerScriptPath?: string;
|
|
7727
7742
|
};
|
|
7728
7743
|
private workerPool;
|
|
7729
7744
|
private isProcessing;
|