react-simple-game-engine 0.0.65 → 0.1.0
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.
@@ -6,15 +6,15 @@ export function Sketch(_a) {
|
|
6
6
|
var refContainer = useRef(null);
|
7
7
|
useEffect(function () {
|
8
8
|
var sketch = function (s) {
|
9
|
-
var camera = s.simpleCamera;
|
10
9
|
s.preload = function () {
|
11
10
|
return onPreload === null || onPreload === void 0 ? void 0 : onPreload();
|
12
11
|
};
|
13
12
|
s.setup = function () {
|
14
13
|
s.createCanvas(width, height).parent(refContainer.current);
|
15
|
-
onSetup(
|
14
|
+
onSetup(s.simpleCamera);
|
16
15
|
};
|
17
16
|
s.draw = function () {
|
17
|
+
var camera = s.simpleCamera;
|
18
18
|
s.scale(camera.scaleX, camera.scaleY);
|
19
19
|
s.background(0);
|
20
20
|
s.imageMode(s.CENTER);
|