react-three-game 0.0.75 → 0.0.76

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.
@@ -28,18 +28,12 @@ extend({
28
28
  MeshStandardNodeMaterial: MeshStandardNodeMaterial,
29
29
  SpriteNodeMaterial: SpriteNodeMaterial,
30
30
  });
31
- function applyCanvasInteractionGuards(canvas) {
32
- canvas.style.touchAction = 'none';
33
- canvas.style.userSelect = 'none';
34
- canvas.style.setProperty('-webkit-touch-callout', 'none');
35
- canvas.style.setProperty('-webkit-user-drag', 'none');
36
- canvas.style.setProperty('-webkit-tap-highlight-color', 'transparent');
37
- }
38
31
  export default function GameCanvas(_a) {
39
32
  var { loader = false, children, glConfig, canvasRef, onCreated, style } = _a, props = __rest(_a, ["loader", "children", "glConfig", "canvasRef", "onCreated", "style"]);
40
33
  const [frameloop, setFrameloop] = useState("never");
41
- return _jsx(_Fragment, { children: _jsxs(Canvas, Object.assign({ style: Object.assign({ touchAction: 'none', userSelect: 'none' }, style), shadows: { type: PCFShadowMap }, dpr: [1, 1.5], frameloop: frameloop, gl: (_a) => __awaiter(this, [_a], void 0, function* ({ canvas }) {
42
- const renderer = new WebGPURenderer(Object.assign({ canvas: canvas,
34
+ return _jsx(_Fragment, { children: _jsxs(Canvas, Object.assign({ style: Object.assign({ touchAction: 'none', userSelect: 'none', WebkitUserSelect: 'none', WebkitTouchCallout: 'none', WebkitTapHighlightColor: 'transparent' }, style), shadows: { type: PCFShadowMap }, dpr: [1, 1.5], frameloop: frameloop, gl: (_a) => __awaiter(this, [_a], void 0, function* ({ canvas }) {
35
+ const canvasElement = canvas;
36
+ const renderer = new WebGPURenderer(Object.assign({ canvas: canvasElement,
43
37
  // @ts-expect-error futuristic
44
38
  shadowMap: true, antialias: true }, glConfig));
45
39
  yield renderer.init().then(() => {
@@ -47,10 +41,6 @@ export default function GameCanvas(_a) {
47
41
  });
48
42
  return renderer;
49
43
  }), onCreated: (state) => {
50
- applyCanvasInteractionGuards(state.gl.domElement);
51
- if (canvasRef) {
52
- canvasRef.current = state.gl.domElement;
53
- }
54
44
  onCreated === null || onCreated === void 0 ? void 0 : onCreated(state);
55
45
  } }, props, { children: [_jsx(Suspense, { children: children }), loader ? _jsx(Loader, {}) : null] })) });
56
46
  }