lythreeframe 1.1.14 → 1.1.16
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/bundle.cjs.js +8 -4
- package/dist/bundle.esm.js +8 -4
- package/package.json +1 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1250,7 +1250,8 @@ const DefaultPostProcessParam = {
|
|
|
1250
1250
|
|
|
1251
1251
|
class World {
|
|
1252
1252
|
get scene() {
|
|
1253
|
-
|
|
1253
|
+
var _a;
|
|
1254
|
+
let scene = (_a = this.rootActor) === null || _a === void 0 ? void 0 : _a.scene;
|
|
1254
1255
|
if (!scene) {
|
|
1255
1256
|
throw new Error("scene is null");
|
|
1256
1257
|
}
|
|
@@ -1284,19 +1285,22 @@ class World {
|
|
|
1284
1285
|
});
|
|
1285
1286
|
}
|
|
1286
1287
|
destroy() {
|
|
1288
|
+
var _a;
|
|
1287
1289
|
this.tickableActors.clear();
|
|
1288
1290
|
this.actors.forEach((elem) => {
|
|
1289
1291
|
elem.destroy();
|
|
1290
1292
|
});
|
|
1291
1293
|
this.actors.clear();
|
|
1292
|
-
this.rootActor.destroy();
|
|
1294
|
+
(_a = this.rootActor) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
1295
|
+
this.rootActor = null;
|
|
1293
1296
|
}
|
|
1294
1297
|
addActor(actor) {
|
|
1298
|
+
var _a;
|
|
1295
1299
|
if (!actor.rootComponent.threeObject) {
|
|
1296
1300
|
throw new Error("actor.threeObject is null");
|
|
1297
1301
|
}
|
|
1298
1302
|
actor.removeFromParent();
|
|
1299
|
-
this.rootActor.addChildActor(actor);
|
|
1303
|
+
(_a = this.rootActor) === null || _a === void 0 ? void 0 : _a.addChildActor(actor, exports.AttachmentRules.KeepRelative);
|
|
1300
1304
|
this.actors.add(actor);
|
|
1301
1305
|
actor.onAddedToWorld(this);
|
|
1302
1306
|
this.viewport.markRenderStateDirty();
|
|
@@ -2703,7 +2707,7 @@ class LevelActor extends Actor {
|
|
|
2703
2707
|
}
|
|
2704
2708
|
constructor(app) {
|
|
2705
2709
|
let scene = new webgpu.Scene();
|
|
2706
|
-
super(app,
|
|
2710
|
+
super(app, scene);
|
|
2707
2711
|
this._scene = null;
|
|
2708
2712
|
this._scene = scene;
|
|
2709
2713
|
this.isTickEnabled = false;
|
package/dist/bundle.esm.js
CHANGED
|
@@ -1248,7 +1248,8 @@ const DefaultPostProcessParam = {
|
|
|
1248
1248
|
|
|
1249
1249
|
class World {
|
|
1250
1250
|
get scene() {
|
|
1251
|
-
|
|
1251
|
+
var _a;
|
|
1252
|
+
let scene = (_a = this.rootActor) === null || _a === void 0 ? void 0 : _a.scene;
|
|
1252
1253
|
if (!scene) {
|
|
1253
1254
|
throw new Error("scene is null");
|
|
1254
1255
|
}
|
|
@@ -1282,19 +1283,22 @@ class World {
|
|
|
1282
1283
|
});
|
|
1283
1284
|
}
|
|
1284
1285
|
destroy() {
|
|
1286
|
+
var _a;
|
|
1285
1287
|
this.tickableActors.clear();
|
|
1286
1288
|
this.actors.forEach((elem) => {
|
|
1287
1289
|
elem.destroy();
|
|
1288
1290
|
});
|
|
1289
1291
|
this.actors.clear();
|
|
1290
|
-
this.rootActor.destroy();
|
|
1292
|
+
(_a = this.rootActor) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
1293
|
+
this.rootActor = null;
|
|
1291
1294
|
}
|
|
1292
1295
|
addActor(actor) {
|
|
1296
|
+
var _a;
|
|
1293
1297
|
if (!actor.rootComponent.threeObject) {
|
|
1294
1298
|
throw new Error("actor.threeObject is null");
|
|
1295
1299
|
}
|
|
1296
1300
|
actor.removeFromParent();
|
|
1297
|
-
this.rootActor.addChildActor(actor);
|
|
1301
|
+
(_a = this.rootActor) === null || _a === void 0 ? void 0 : _a.addChildActor(actor, AttachmentRules.KeepRelative);
|
|
1298
1302
|
this.actors.add(actor);
|
|
1299
1303
|
actor.onAddedToWorld(this);
|
|
1300
1304
|
this.viewport.markRenderStateDirty();
|
|
@@ -2701,7 +2705,7 @@ class LevelActor extends Actor {
|
|
|
2701
2705
|
}
|
|
2702
2706
|
constructor(app) {
|
|
2703
2707
|
let scene = new Scene();
|
|
2704
|
-
super(app,
|
|
2708
|
+
super(app, scene);
|
|
2705
2709
|
this._scene = null;
|
|
2706
2710
|
this._scene = scene;
|
|
2707
2711
|
this.isTickEnabled = false;
|