Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick luma global exports in core bundle #8574

Merged
merged 1 commit into from Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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