mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-11-25 16:43:53 +01:00
fix(render): iso/3d face movement dir; 3d crash-proof; brighter ASCII walls
- Iso & 3D character faced the wrong way: the SP game never sends player.facing (only the tavern does) so it defaulted to down/SW. Both renderers now INFER facing from the movement delta they already track (explicit e.facing still wins for the tavern). - 3D could break the game: wrap ThreeRenderer construction (createRenderer) and the _animate RAF body in try/catch — a 3D failure now falls back to Tiled / stops the loop instead of throwing. - ASCII walls/floors were near-invisible (legend colours are near-black, tuned for tile fog): use brighter glyph colours for wall/floor in ASCII (features keep their own colours).
This commit is contained in:
@@ -51,7 +51,13 @@
|
||||
if (!RK.canUseMode(mode)) return new RK.TileRenderer(host, opts);
|
||||
if (mode === 'ascii' && RK.AsciiRenderer) return new RK.AsciiRenderer(host, opts);
|
||||
if (mode === 'iso' && RK.IsoRenderer) return new RK.IsoRenderer(host, opts);
|
||||
if (mode === '3d' && RK.ThreeRenderer && RK.THREE) return new RK.ThreeRenderer(host, opts);
|
||||
if (mode === '3d' && RK.ThreeRenderer && RK.THREE) {
|
||||
try { return new RK.ThreeRenderer(host, opts); }
|
||||
catch (e) {
|
||||
if (root.console) console.warn('3D renderer failed; using tiled:', e && e.message);
|
||||
return new RK.TileRenderer(host, opts);
|
||||
}
|
||||
}
|
||||
if (mode === 'fancy') {
|
||||
try {
|
||||
if (!RK.FancyRenderer) throw new Error('fancy renderer not loaded');
|
||||
|
||||
Reference in New Issue
Block a user