@0xobelisk/ecs 1.2.0-pre.80 → 1.2.0-pre.83
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.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -0
- package/dist/index.mjs.map +1 -1
- package/dist/world.d.ts +5 -0
- package/package.json +2 -2
- package/src/world.ts +45 -0
package/dist/index.js
CHANGED
|
@@ -2188,6 +2188,36 @@ var DubheECSWorld = class {
|
|
|
2188
2188
|
getConfig() {
|
|
2189
2189
|
return { ...this.config };
|
|
2190
2190
|
}
|
|
2191
|
+
/**
|
|
2192
|
+
* Update ECS World configuration dynamically
|
|
2193
|
+
* @param config - Partial configuration to update (same type as constructor)
|
|
2194
|
+
*/
|
|
2195
|
+
updateConfig(config) {
|
|
2196
|
+
if (config.dubheMetadata !== void 0) {
|
|
2197
|
+
this.dubheMetadata = config.dubheMetadata;
|
|
2198
|
+
this.config.dubheMetadata = config.dubheMetadata;
|
|
2199
|
+
this.componentDiscoverer = new ComponentDiscoverer(this.graphqlClient, this.dubheMetadata);
|
|
2200
|
+
this.resourceDiscoverer = new ResourceDiscoverer(this.graphqlClient, this.dubheMetadata);
|
|
2201
|
+
this.querySystem.setComponentDiscoverer(this.componentDiscoverer);
|
|
2202
|
+
this.subscriptionSystem.setComponentDiscoverer(this.componentDiscoverer);
|
|
2203
|
+
this.initializeWithConfig();
|
|
2204
|
+
}
|
|
2205
|
+
if (config.queryConfig) {
|
|
2206
|
+
this.config.queryConfig = {
|
|
2207
|
+
...this.config.queryConfig,
|
|
2208
|
+
...config.queryConfig
|
|
2209
|
+
};
|
|
2210
|
+
if (config.queryConfig.defaultCacheTimeout !== void 0) {
|
|
2211
|
+
this.querySystem.cacheTimeout = config.queryConfig.defaultCacheTimeout;
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
if (config.subscriptionConfig) {
|
|
2215
|
+
this.config.subscriptionConfig = {
|
|
2216
|
+
...this.config.subscriptionConfig,
|
|
2217
|
+
...config.subscriptionConfig
|
|
2218
|
+
};
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2191
2221
|
/**
|
|
2192
2222
|
* Get dubhe metadata info (JSON format)
|
|
2193
2223
|
*/
|