spoint 0.1.64 → 0.1.66
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.
|
@@ -36,6 +36,9 @@ export default {
|
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
update(ctx, dt) {
|
|
39
|
+
if (!ctx.state.smartObjects || typeof ctx.state.smartObjects[Symbol.iterator] !== 'function') {
|
|
40
|
+
return
|
|
41
|
+
}
|
|
39
42
|
for (const [id, obj] of ctx.state.smartObjects) {
|
|
40
43
|
if (obj.template === 'platform') updatePlatform(ctx, id, obj, dt)
|
|
41
44
|
if (obj.template === 'hazard') updateHazard(ctx, id, obj, dt)
|
|
@@ -62,10 +65,12 @@ export default {
|
|
|
62
65
|
},
|
|
63
66
|
|
|
64
67
|
teardown(ctx) {
|
|
65
|
-
|
|
66
|
-
ctx.
|
|
68
|
+
if (ctx.state.smartObjects && typeof ctx.state.smartObjects.keys === 'function') {
|
|
69
|
+
for (const id of ctx.state.smartObjects.keys()) {
|
|
70
|
+
ctx.world.destroy(id)
|
|
71
|
+
}
|
|
72
|
+
ctx.state.smartObjects.clear()
|
|
67
73
|
}
|
|
68
|
-
ctx.state.smartObjects.clear()
|
|
69
74
|
}
|
|
70
75
|
},
|
|
71
76
|
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/client/anim-lib.glb
DELETED
|
Binary file
|