react-simple-game-engine 0.1.49 → 0.1.50

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.
@@ -1,3 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
13
  import { useEffect, useState } from "react";
3
14
  export function SoundOnceWatcher(_a) {
@@ -5,7 +16,7 @@ export function SoundOnceWatcher(_a) {
5
16
  var _b = useState(scene.soundOnceOptions), values = _b[0], setValues = _b[1];
6
17
  useEffect(function () {
7
18
  return scene.onSoundOnceOptionsChange(function (options) {
8
- setValues(options);
19
+ setValues(__assign({}, options));
9
20
  });
10
21
  }, [scene]);
11
22
  return _jsx(_Fragment, { children: children(values) });
@@ -15,7 +26,7 @@ export function SoundBackgroundWatcher(_a) {
15
26
  var _b = useState(scene.soundBackgroundOptions), values = _b[0], setValues = _b[1];
16
27
  useEffect(function () {
17
28
  return scene.onSoundBackgroundOptionsChange(function (options) {
18
- setValues(options);
29
+ setValues(__assign({}, options));
19
30
  });
20
31
  }, [scene]);
21
32
  return _jsx(_Fragment, { children: children(values) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simple-game-engine",
3
- "version": "0.1.49",
3
+ "version": "0.1.50",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib",