Skip to content

Commit

Permalink
Cherry pick luma global exports in core bundle (#8574)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Mar 4, 2024
1 parent 0306cac commit d9902fb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
1 change: 0 additions & 1 deletion .ocularrc.js
Expand Up @@ -35,7 +35,6 @@ const config = {
'@deck.gl/*': 'globalThis.deck',
'@luma.gl/core': 'globalThis.luma',
'@luma.gl/engine': 'globalThis.luma',
'@luma.gl/webgl': 'globalThis.luma',
'@loaders.gl/core': 'globalThis.loaders',
'h3-js': 'globalThis.h3 || {}'
}
Expand Down
20 changes: 15 additions & 5 deletions modules/core/src/scripting/lumagl.ts
@@ -1,8 +1,18 @@
/**
* Re-exported luma.gl API in the pre-built bundle
* TODO: Cherry-pick luma core exports that are relevant to deck
*/
export * from '@luma.gl/core';
export * from '@luma.gl/engine';
// @ts-ignore Module '@luma.gl/core' has already exported a member named 'AccessorObject'
export * from '@luma.gl/webgl';
export {Device, Buffer, Texture, Framebuffer} from '@luma.gl/core';
export {
Model,
TextureTransform,

// Geometry
Geometry,
CubeGeometry,
SphereGeometry,

// Scenegraph
ScenegraphNode,
GroupNode,
ModelNode
} from '@luma.gl/engine';
3 changes: 0 additions & 3 deletions modules/layers/src/column-layer/column-geometry.ts
@@ -1,5 +1,4 @@
import {log, BinaryAttribute} from '@deck.gl/core';
import {uid} from '@luma.gl/core';
import {Geometry} from '@luma.gl/engine';

import {modifyPolygonWindingDirection, WINDING} from '@math.gl/polygon';
Expand All @@ -14,11 +13,9 @@ type ColumnGeometryProps = {

export default class ColumnGeometry extends Geometry {
constructor(props: ColumnGeometryProps) {
const {id = uid('column-geometry')} = props;
const {indices, attributes} = tesselateColumn(props);
super({
...props,
id,
indices,
// @ts-expect-error
attributes
Expand Down

0 comments on commit d9902fb

Please sign in to comment.