lightning-js / renderer

Lightning 3 Renderer
Apache License 2.0
57 stars 23 forks source link

Introduce platform abstraction layer #422

Open wouterlucas opened 3 weeks ago

wouterlucas commented 3 weeks ago

This is to abstract away Web / Browser specific APIs in a Platform layer. By default Lightning 3 will load the Web platform as that's our most common usecase.

However this PR opens up the possibility for other platforms/runtimes to run Lightning 3, just like Lightning 2 has.

Lightning 3 now exposes a CorePlatform and CoreGlContext on which the platform specific APIs are abstracted. By default the project comes with a WebPlatform and a WebGlContext implementation for browsers.