moonrider icon indicating copy to clipboard operation
moonrider copied to clipboard

Opening keyboard freezes page. It doesn't work

Open dmarcos opened this issue 1 year ago • 8 comments

I merged this https://github.com/supermedium/moonrider/pull/175 to bump to A-Frame 1.3.0 and I've got reports that keyboard no longer works (Quest 2 and 3). @redsolver anything quick comes to mind? Thanks so much

dmarcos avatar Feb 16 '24 19:02 dmarcos

More info from users:

-The crash occurs when you simply hover over the keyboard, most times you do not need to interact with the actual keys, it is the keyboard field. -Menu Resolution appears to be lower, within maps might be similar as well -The end of the first map you play after loading/reloading the website loops the intro for about 1.5-2 seconds, then goes to stats screen -Stats screen does not show "Rank" you receive on stats screen (S, A, B, C)

dmarcos avatar Feb 16 '24 21:02 dmarcos

Yea I had based my PR on that one and found out the super-keyboard expects different UV mapping API in Three.js

unsupervisednn avatar Feb 17 '24 19:02 unsupervisednn

@unsupervisednn thanks .if you have some code to quickly fix the keyboard I'll deploy it. Otherwise will have to revert the A-Frame 1.3.0

dmarcos avatar Feb 17 '24 20:02 dmarcos

It was crashing a bit more while playing on a-frame 1.3.0. I dont personally use this with Windows Chrome so didn't feel it was worth lots of QA and debugging to update a-frame when the older version worked fine on quest browser, sorry

unsupervisednn avatar Feb 18 '24 16:02 unsupervisednn

I tried it a few hours ago and the bug was gone....

frabul avatar Feb 22 '24 10:02 frabul

The issue with the rank ('S', 'A', 'B', ...) text not showing up still exists, and the console shows issues with FontLoader and TextGeometry having moved out of three.js (they are only stubs now, so naturally it would not render). I tried fixing it by using

import { FontLoader } from "super-three/examples/jsm/loaders/FontLoader";
import { TextGeometry } from "super-three/examples/jsm/geometries/TextGeometry";

and adding "super-three": "^0.137.0" to the packages.json, but this seems to yeet the camera to NaN on first render, so I'll see if someone who knows the system better can propose a better fix.

digama0 avatar Feb 28 '24 05:02 digama0

Why the three version that is included in AFRAME does not include FontLoader and TextGeometry examples?

frabul avatar Feb 28 '24 21:02 frabul

The way i did is

  • Take TextGeometry.js and FontLoader.js from the super-three v0.137 and copy to src/lib
  • Modify TextGeometry.js by replacing
import {
	THREE.ExtrudeGeometry
} from 'three';

with var ExtrudeGeometry = THREE.ExtrudeGeometry;

  • Modify text-geometry.js by adding
import { TextGeometry } from '../lib/TextGeometry.js';
THREE.TextGeometry = TextGeometry;
import { FontLoader } from '../lib/FontLoader.js';
THREE.FontLoader = FontLoader;

It seems to work without any side effect

frabul avatar Feb 29 '24 14:02 frabul