mage-engine 3.24.6 → 3.24.7
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/mage.js +14 -1
- package/package.json +1 -1
package/dist/mage.js
CHANGED
|
@@ -58179,7 +58179,7 @@ function applyMiddleware() {
|
|
|
58179
58179
|
|
|
58180
58180
|
var thunk = createThunkMiddleware();
|
|
58181
58181
|
thunk.withExtraArgument = createThunkMiddleware;var name = "mage-engine";
|
|
58182
|
-
var version$1 = "3.24.
|
|
58182
|
+
var version$1 = "3.24.7";
|
|
58183
58183
|
var description = "A WebGL Javascript Game Engine, built on top of THREE.js and many other libraries.";
|
|
58184
58184
|
var main = "dist/mage.js";
|
|
58185
58185
|
var author$1 = {
|
|
@@ -63384,6 +63384,19 @@ let Sprite = /*#__PURE__*/function (_Element) {
|
|
|
63384
63384
|
key: "toJSON",
|
|
63385
63385
|
value: function toJSON(parseJSON = false) {
|
|
63386
63386
|
if (this.isSerializable()) {
|
|
63387
|
+
// Sync position from holder before serializing to ensure the
|
|
63388
|
+
// serialized position matches the holder (which the user drags).
|
|
63389
|
+
// Without this, the camera body can lag the holder by one frame.
|
|
63390
|
+
if (this.hasHolder()) {
|
|
63391
|
+
const holderBody = this.holder.getBody();
|
|
63392
|
+
this.setPosition({
|
|
63393
|
+
x: holderBody.position.x,
|
|
63394
|
+
y: holderBody.position.y,
|
|
63395
|
+
z: holderBody.position.z
|
|
63396
|
+
}, {
|
|
63397
|
+
updateHolder: false
|
|
63398
|
+
});
|
|
63399
|
+
}
|
|
63387
63400
|
return {
|
|
63388
63401
|
..._superPropGet(Camera, "toJSON", this, 3)([parseJSON]),
|
|
63389
63402
|
fov: this.getFov(),
|