Spaces:
Running
Running
Update viewer.js
Browse files
viewer.js
CHANGED
|
@@ -115,8 +115,9 @@ export async function initializeViewer(config, instanceId) {
|
|
| 115 |
|
| 116 |
const opts = new pc.AppOptions();
|
| 117 |
opts.graphicsDevice = device;
|
| 118 |
-
|
| 119 |
-
opts.
|
|
|
|
| 120 |
opts.componentSystems = [
|
| 121 |
pc.RenderComponentSystem,
|
| 122 |
pc.CameraComponentSystem,
|
|
|
|
| 115 |
|
| 116 |
const opts = new pc.AppOptions();
|
| 117 |
opts.graphicsDevice = device;
|
| 118 |
+
// Attach input to document.body (not canvas) for iOS, to match PlayCanvas example and fix iOS event issues
|
| 119 |
+
opts.mouse = new pc.Mouse(document.body);
|
| 120 |
+
opts.touch = new pc.TouchDevice(document.body);
|
| 121 |
opts.componentSystems = [
|
| 122 |
pc.RenderComponentSystem,
|
| 123 |
pc.CameraComponentSystem,
|