Skip to content

Commit

Permalink
Export luma functions (#8822)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gervang <chris@gervang.com>
  • Loading branch information
chrisgervang committed Apr 26, 2024
1 parent ab3b018 commit 1e53513
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/core/src/scripting/lumagl.ts
@@ -1,6 +1,18 @@
/**
* Re-exported luma.gl API in the pre-built bundle
*/
import {luma} from '@luma.gl/core';
/* eslint-disable @typescript-eslint/unbound-method */
export const {
stats,
registerDevices,
getAvailableDevices,
getSupportedDevices,
setDefaultDeviceProps,
attachDevice,
createDevice,
enforceWebGL2
} = luma;
export {Device, Buffer, Texture, Framebuffer} from '@luma.gl/core';
export {
Model,
Expand Down
5 changes: 5 additions & 0 deletions test/modules/main/bundle/deckgl.spec.ts
Expand Up @@ -28,6 +28,11 @@ test('standalone#imports', t => {
t.ok(deckgl.Layer, 'Layer class is exported');
t.ok(deckgl.ScatterplotLayer, 'ScatterplotLayer class is exported');

t.ok(globalThis.deck, 'deck namespace is exported');
t.ok(globalThis.luma, 'luma namespace is exported');
t.ok(globalThis.luma.enforceWebGL2, 'enforceWebGL2 is exported');
t.ok(globalThis.loaders, 'loaders namespace is exported');

t.end();
});

Expand Down

0 comments on commit 1e53513

Please sign in to comment.