react-simple-game-engine 0.1.82 → 0.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"scene-runner.d.ts","sourceRoot":"","sources":["../../src/ui-components/scene-runner.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAKzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,aAAK,gBAAgB,GAAG,sBAAsB,GAAG;IAC/C,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,OAAO,EACP,KAAK,EACL,MAAM,EACN,YAAY,EAAE,YAAY,EAC1B,UAAiC,GAClC,EAAE,gBAAgB,eAgHlB"}
1
+ {"version":3,"file":"scene-runner.d.ts","sourceRoot":"","sources":["../../src/ui-components/scene-runner.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAEb,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAKzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,oBAAY,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,aAAK,gBAAgB,GAAG,sBAAsB,GAAG;IAC/C,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAC1B,WAAW,EACX,OAAO,EACP,KAAK,EACL,MAAM,EACN,YAAY,EAAE,YAAY,EAC1B,UAAiC,GAClC,EAAE,gBAAgB,eAiHlB"}
@@ -20,7 +20,7 @@ export function SceneRunner(_a) {
20
20
  var windowSize = useWindowSize();
21
21
  var refScaler = useRef(new Scaler(windowSize, { width: width, height: height }, layoutMode));
22
22
  var _c = useState(false), isBootDone = _c[0], setBootDone = _c[1];
23
- useEffect(function () {
23
+ useMemo(function () {
24
24
  if (window.Renderer) {
25
25
  window.Renderer.resizeCanvas(windowSize.width, windowSize.height);
26
26
  }
@@ -29,13 +29,13 @@ export function SceneRunner(_a) {
29
29
  height: windowSize.height,
30
30
  };
31
31
  }, [windowSize]);
32
- useEffect(function () {
32
+ useMemo(function () {
33
33
  refScaler.current.gameSize = {
34
34
  width: width,
35
35
  height: height,
36
36
  };
37
37
  }, [width, height]);
38
- useEffect(function () {
38
+ useMemo(function () {
39
39
  refScaler.current.layoutMode = layoutMode;
40
40
  }, [layoutMode]);
41
41
  useEffect(function () {
@@ -59,6 +59,7 @@ export function SceneRunner(_a) {
59
59
  height: windowSize.height,
60
60
  overflow: "hidden",
61
61
  position: "relative",
62
+ boxSizing: "border-box",
62
63
  } }, { children: current.loadedAssets ? (_jsxs(_Fragment, { children: [_jsx(Sketch, { onSetup: setup, onDraw: draw, scaler: refScaler.current }), _jsx("div", __assign({ style: {
63
64
  position: "absolute",
64
65
  top: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-simple-game-engine",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib",