deck.gl 9 upgrade #790
Replies: 2 comments 4 replies
-
Would be very interested in this! I am hoping to have more time to work on Viv starting in May! If you want to get started, great, but there are also others interested! |
Beta Was this translation helpful? Give feedback.
-
Hi, So I made a start on this... shock-horror: not as totally straight-forward as the upgrade guide made out. I'm not sure if I'll finish or not, but I'll share some notes on my progress & if you want to review the code, it's here
const DECK_VERSION = '~9.0.17';
const LUMAGL_VERSION = '~9.0.14';
const MATHGL_VERSION = '^4.0.1'; Also manual change to Avivator's buildA few more changes needed than anticipated;
testsQuite a lot of tests pass, but it hangs in certain places... I tried bypassing in some cases, but anyway - given that it is clearly broken at runtime it would've been a major red flag if tests passed :) avivator devAvivator building ok & running in dev then I got an error in luma.gl when calling
The type annotations indicate that attributes: {
texCoords: {
value: new Float32Array([0, 1, 0, 0, 1, 0, 1, 1]),
size: 4
}
} Seems like it should have been allowed to have Now the first errors that I'm seeing appear to be to do with GL constants, but I'm sure there'll be more changes required after that. other notesIt'd be good to update MaterialUI / React / Zustand etc, but I suppose it's probably sensible to keep that separate. It might help to catch things like incompatible uses of GL constants if more of the code was in TS, but given the Cheers, |
Beta Was this translation helpful? Give feedback.
-
I notice that
deck.gl
(and underlyingluma.gl
) have a major new version, with some interesting changes - in particular, moving towards WebGPU support. Better typescript support also sounds promising, and there are other features I’d definitely make fairly immediate use of that aren’t directly relevant to Viv. I’m really keen to start using this soon, but it will mean a few changes being needed to Viv.I have a few other things I should be focussing on first, but if you want I’d be willing to do some work on a PR to upgrade. Some initial notes:
They have an upgrade guide here. It looks as though most of this should be relatively painless, although it’s hard to say without actually trying - as ever, the devil is in the details.
It means that anything directly referring to
WebGL
APIs needs to change toluma.gl
abstractions. Any use ofGL
constants become strings (sounds nicer for debugging…). Create models withcontext.device
instead ofcontext.gl
.WebGL1
is no longer supported at all - you/we could probably get rid of the bits of code with warnings for this - to my knowledge, this isn’t a concern now.Shaders should require only fairly minimal changes
No problems anticipated there, may need one or two very minor revisions.
Would need a bit of a change, hopefully for the better and not too difficult. Not needed immediately, anyway (but I do want to run on WebGPU ASAP).
Not applicable to Viv AFAIK, shouldn't be a problem otherwise.
loaders.gl
There’s a major upgrade to v4 of this and I haven’t fully assessed the implications of that - hopefully not a big deal, but wouldn’t like to say.
In general, moderately likely that changing several major versions of dependencies may not be entirely without friction, but definitely worth looking at I think.
Beta Was this translation helpful? Give feedback.
All reactions