Skip to content

Commit

Permalink
chore: Bump to luma.gl@9-alpha.13. Remove imports of /core and /const…
Browse files Browse the repository at this point in the history
…ants. (#7539)
  • Loading branch information
ibgreen authored and Pessimistress committed Jan 5, 2023
1 parent 861ed96 commit f7362c9
Show file tree
Hide file tree
Showing 109 changed files with 213 additions and 246 deletions.
2 changes: 1 addition & 1 deletion examples/experimental/bezier/index.html
Expand Up @@ -11,5 +11,5 @@
<body>
<div id="app"></div>
</body>
<script type="module" src="src/app.jsx"></script>
<script type="module" src="src/app.tsx"></script>
</html>
File renamed without changes.
Expand Up @@ -19,8 +19,7 @@
// THE SOFTWARE.

import {Layer, fp64LowPart, picking} from '@deck.gl/core';
import GL from '@luma.gl/constants';
import {Model, Geometry} from '@luma.gl/core';
import {GL, Model, Geometry} from '@luma.gl/webgl-legacy';

import vs from './bezier-curve-layer-vertex.glsl';
import fs from './bezier-curve-layer-fragment.glsl';
Expand Down
2 changes: 1 addition & 1 deletion examples/experimental/h3-grid/index.html
Expand Up @@ -11,5 +11,5 @@
<body>
<div id="app"></div>
</body>
<script type="module" src="src/app.jsx"></script>
<script type="module" src="src/app.tsx"></script>
</html>
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/experimental/interleaved-buffer/index.html
Expand Up @@ -11,5 +11,5 @@
<body>
<div id="app"></div>
</body>
<script type="module" src="./app.js"></script>
<script type="module" src="./app.ts"></script>
</html>
4 changes: 2 additions & 2 deletions examples/layer-browser/package.json
Expand Up @@ -9,8 +9,8 @@
"dependencies": {
"@loaders.gl/ply": "^3.2.10",
"@loaders.gl/gltf": "^3.2.10",
"@luma.gl/experimental": "9.0.0-alpha.12",
"@luma.gl/debug": "9.0.0-alpha.12",
"@luma.gl/experimental": "9.0.0-alpha.13",
"@luma.gl/debug": "9.0.0-alpha.13",
"colorbrewer": "^1.0.0",
"d3-request": "^1.0.6",
"d3-scale": "^3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/playground/package.json
Expand Up @@ -14,7 +14,7 @@
"@loaders.gl/csv": "^3.2.10",
"@loaders.gl/draco": "^3.2.10",
"@loaders.gl/gltf": "^3.2.10",
"@luma.gl/constants": "9.0.0-alpha.12",
"@luma.gl/webgl-legacy": "9.0.0-alpha.13",
"brace": "^0.11.1",
"deck.gl": "^8.8.0",
"react": "~16.9.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/website/360-video/app.tsx
Expand Up @@ -4,7 +4,7 @@ import {render} from 'react-dom';
import DeckGL from '@deck.gl/react';
import {FirstPersonView, COORDINATE_SYSTEM} from '@deck.gl/core';
import {SimpleMeshLayer} from '@deck.gl/mesh-layers';
import {SphereGeometry} from '@luma.gl/core';
import {SphereGeometry} from '@luma.gl/engine';

// Video created by the NASA Jet Propulsion Laboratory, Public domain, via Wikimedia Commons
const VIDEO_URL =
Expand Down
5 changes: 2 additions & 3 deletions modules/aggregation-layers/package.json
Expand Up @@ -30,16 +30,15 @@
"prepublishOnly": "npm run build-bundle && npm run build-bundle -- --env=dev"
},
"dependencies": {
"@luma.gl/constants": "9.0.0-alpha.12",
"@luma.gl/shadertools": "9.0.0-alpha.12",
"@luma.gl/constants": "9.0.0-alpha.13",
"@luma.gl/shadertools": "9.0.0-alpha.13",
"@math.gl/web-mercator": "^4.0.0-alpha.1",
"d3-hexbin": "^0.2.1"
},
"peerDependencies": {
"@deck.gl/core": "^8.0.0",
"@deck.gl/layers": "^8.0.0",
"@luma.gl/api": "^9.0.0-alpha",
"@luma.gl/core": "^9.0.0-alpha",
"@luma.gl/engine": "^9.0.0-alpha",
"@luma.gl/webgl-legacy": "^9.0.0-alpha"
},
Expand Down
Expand Up @@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';
import {LineLayer, SolidPolygonLayer} from '@deck.gl/layers';
import {generateContours} from './contour-utils';
import {
Expand Down
Expand Up @@ -18,7 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';
import {GridCellLayer} from '@deck.gl/layers';
import {Accessor, AccessorFunction, Color, Position, Material, DefaultProps} from '@deck.gl/core';

Expand Down
Expand Up @@ -27,10 +27,9 @@ import {
LayerProps,
DefaultProps
} from '@deck.gl/core';
import GL from '@luma.gl/constants';
import {CubeGeometry} from '@luma.gl/engine';
import {fp64arithmetic} from '@luma.gl/shadertools';
import {Model, Buffer} from '@luma.gl/webgl-legacy';
import {GL, Model, Buffer} from '@luma.gl/webgl-legacy';
import {defaultColorRange, colorRangeToFlatArray} from '../utils/color-utils';
import type {_GPUGridLayerProps} from './gpu-grid-layer';
import vs from './gpu-grid-cell-layer-vertex.glsl';
Expand Down
Expand Up @@ -18,8 +18,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import {Buffer} from '@luma.gl/webgl-legacy';
import GL from '@luma.gl/constants';
import {GL, Buffer} from '@luma.gl/webgl-legacy';
import {
Accessor,
AccessorFunction,
Expand Down
5 changes: 2 additions & 3 deletions modules/aggregation-layers/src/grid-aggregation-layer.ts
Expand Up @@ -18,11 +18,10 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.

import {GL, Buffer} from '@luma.gl/webgl-legacy';
import {LayerContext, log, UpdateParameters} from '@deck.gl/core';
import AggregationLayer, {AggregationLayerProps} from './aggregation-layer';
import GPUGridAggregator from './utils/gpu-grid-aggregation/gpu-grid-aggregator';
import {Buffer} from '@luma.gl/webgl-legacy';
import {LayerContext, log, UpdateParameters} from '@deck.gl/core';
import GL from '@luma.gl/constants';
import BinSorter from './utils/bin-sorter';
import {pointToDensityGridDataCPU} from './cpu-grid-layer/grid-aggregator';

Expand Down
@@ -1,5 +1,5 @@
import {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';

export function getBounds(points: number[][]): number[] {
// Now build bounding box in world space (aligned to world coordiante system)
Expand Down
Expand Up @@ -19,7 +19,7 @@
// THE SOFTWARE.

/* global setTimeout clearTimeout */
import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';
import {
getBounds,
boundsContain,
Expand Down
Expand Up @@ -19,8 +19,7 @@
// THE SOFTWARE.

import type {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {Model, Texture2D} from '@luma.gl/webgl-legacy';
import {GL, Model, Texture2D} from '@luma.gl/webgl-legacy';
import {Geometry} from '@luma.gl/engine';
import {Layer, LayerContext, project32} from '@deck.gl/core';
import vs from './triangle-layer-vertex.glsl';
Expand Down
Expand Up @@ -29,14 +29,14 @@ import {
DefaultProps
} from '@deck.gl/core';
import {ColumnLayer} from '@deck.gl/layers';
import {GL} from '@luma.gl/webgl-legacy';

import {defaultColorRange} from '../utils/color-utils';

import {pointToHexbin} from './hexagon-aggregator';
import CPUAggregator from '../utils/cpu-aggregator';
import AggregationLayer, {AggregationLayerProps} from '../aggregation-layer';

import GL from '@luma.gl/constants';
import {AggregateAccessor} from '../types';

// eslint-disable-next-line @typescript-eslint/no-empty-function
Expand Down
Expand Up @@ -19,9 +19,8 @@
// THE SOFTWARE.

import {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {Geometry} from '@luma.gl/engine';
import {Model, FEATURES, hasFeatures, Texture2D} from '@luma.gl/webgl-legacy';
import {GL, Model, FEATURES, hasFeatures, Texture2D} from '@luma.gl/webgl-legacy';
import {Layer, LayerProps, log, picking, UpdateParameters, DefaultProps} from '@deck.gl/core';
import {defaultColorRange, colorRangeToFlatArray} from '../utils/color-utils';
import vs from './screen-grid-layer-vertex.glsl';
Expand Down
Expand Up @@ -31,8 +31,8 @@ import {
UpdateParameters,
DefaultProps
} from '@deck.gl/core';
import GL from '@luma.gl/constants';
import type {Texture2D} from '@luma.gl/webgl-legacy';
import {GL} from '@luma.gl/webgl-legacy';
import GPUGridAggregator from '../utils/gpu-grid-aggregation/gpu-grid-aggregator';
import {AGGREGATION_OPERATION, getValueFunc} from '../utils/aggregation-operation-utils';
import ScreenGridCellLayer from './screen-grid-cell-layer';
Expand Down
@@ -1,4 +1,4 @@
import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';
import {AGGREGATION_OPERATION} from '../aggregation-operation-utils';

export const DEFAULT_RUN_PARAMS = {
Expand Down
Expand Up @@ -19,8 +19,8 @@
// THE SOFTWARE.

import type {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {
GL,
Model,
Transform,
FEATURES,
Expand Down
3 changes: 1 addition & 2 deletions modules/aggregation-layers/src/utils/resource-utils.ts
@@ -1,6 +1,5 @@
import {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {Framebuffer, Texture2D} from '@luma.gl/webgl-legacy';
import {GL, Framebuffer, Texture2D} from '@luma.gl/webgl-legacy';

const DEFAULT_PARAMETERS = {
[GL.TEXTURE_MAG_FILTER]: GL.NEAREST,
Expand Down
1 change: 0 additions & 1 deletion modules/arcgis/package.json
Expand Up @@ -32,7 +32,6 @@
"peerDependencies": {
"@arcgis/core": "^4.0.0",
"@deck.gl/core": "^8.0.0",
"@luma.gl/core": "^9.0.0-alpha",
"@luma.gl/webgl-legacy": "^9.0.0-alpha"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions modules/arcgis/src/commons.ts
@@ -1,15 +1,15 @@
/* eslint-disable no-invalid-this */

import type {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {Deck} from '@deck.gl/core';
import {
GL,
Model,
Buffer,
Framebuffer,
instrumentGLContext,
withParameters
} from '@luma.gl/webgl-legacy';
import {Deck} from '@deck.gl/core';

export function initializeResources(device: Device) {
// @ts-expect-error
Expand Down
2 changes: 1 addition & 1 deletion modules/carto/package.json
Expand Up @@ -36,7 +36,7 @@
"@loaders.gl/loader-utils": "^3.2.10",
"@loaders.gl/mvt": "^3.2.10",
"@loaders.gl/tiles": "^3.2.10",
"@luma.gl/constants": "9.0.0-alpha.12",
"@luma.gl/webgl-legacy": "9.0.0-alpha.13",
"@math.gl/web-mercator": "4.0.0-alpha.1",
"cartocolor": "^4.0.2",
"d3-array": "^3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions modules/carto/src/api/parseMap.ts
@@ -1,4 +1,5 @@
import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';
import {_flatten as flatten, log} from '@deck.gl/core';
import {
AGGREGATION,
getLayer,
Expand All @@ -13,7 +14,6 @@ import {
negateAccessor,
getMaxMarkerSize
} from './layer-map';
import {_flatten as flatten, log} from '@deck.gl/core';
import {assert} from '../utils';
import {MapDataset, MapTextSubLayerConfig, VisualChannels} from './types';

Expand Down
33 changes: 20 additions & 13 deletions modules/core/bundle/lumagl.js
@@ -1,10 +1,26 @@
// Cherry-pick luma core exports that are relevant to deck
export {
// Core classes
Timeline,

// Geometries
Geometry,
ConeGeometry,
CubeGeometry,
CylinderGeometry,
IcoSphereGeometry,
PlaneGeometry,
SphereGeometry,
TruncatedConeGeometry
} from '@luma.gl/engine';

export {
Model,
Transform,
ProgramManager,
Timeline,
ProgramManager
} from '@luma.gl/webgl-legacy';

export {
// Context utilities
instrumentGLContext,
isWebGL2,
Expand All @@ -29,14 +45,5 @@ export {
TextureCube,
// WebGL2 classes
Texture3D,
TransformFeedback,
// Geometries
Geometry,
ConeGeometry,
CubeGeometry,
CylinderGeometry,
IcoSphereGeometry,
PlaneGeometry,
SphereGeometry,
TruncatedConeGeometry
} from '@luma.gl/core';
TransformFeedback
} from '@luma.gl/webgl-legacy';
14 changes: 6 additions & 8 deletions modules/core/package.json
Expand Up @@ -37,14 +37,12 @@
"dependencies": {
"@loaders.gl/core": "^3.2.10",
"@loaders.gl/images": "^3.2.10",
"@luma.gl/api": "9.0.0-alpha.12",
"@luma.gl/constants": "9.0.0-alpha.12",
"@luma.gl/core": "9.0.0-alpha.12",
"@luma.gl/gltools": "9.0.0-alpha.12",
"@luma.gl/shadertools": "9.0.0-alpha.12",
"@luma.gl/webgl": "9.0.0-alpha.12",
"@luma.gl/engine": "9.0.0-alpha.12",
"@luma.gl/webgl-legacy": "9.0.0-alpha.12",
"@luma.gl/api": "9.0.0-alpha.13",
"@luma.gl/gltools": "9.0.0-alpha.13",
"@luma.gl/shadertools": "9.0.0-alpha.13",
"@luma.gl/webgl": "9.0.0-alpha.13",
"@luma.gl/engine": "9.0.0-alpha.13",
"@luma.gl/webgl-legacy": "9.0.0-alpha.13",
"@math.gl/core": "4.0.0-alpha.1",
"@math.gl/sun": "4.0.0-alpha.1",
"@math.gl/web-mercator": "4.0.0-alpha.1",
Expand Down
4 changes: 2 additions & 2 deletions modules/core/src/lib/attribute/data-column.ts
@@ -1,8 +1,8 @@
/* eslint-disable complexity */
import type {Device} from '@luma.gl/api';
import GL from '@luma.gl/constants';
import {hasFeature, FEATURES, Buffer} from '@luma.gl/webgl-legacy';
import type {Buffer as LumaBuffer} from '@luma.gl/webgl-legacy';
import {GL, hasFeature, FEATURES, Buffer} from '@luma.gl/webgl-legacy';

import ShaderAttribute, {IShaderAttribute} from './shader-attribute';
import {glArrayFromType} from './gl-utils';
import typedArrayManager from '../../utils/typed-array-manager';
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/lib/attribute/gl-utils.ts
@@ -1,4 +1,4 @@
import GL from '@luma.gl/constants';
import {GL} from '@luma.gl/webgl-legacy';
import type {TypedArrayConstructor} from '../../types/types';

/* eslint-disable complexity */
Expand Down
3 changes: 1 addition & 2 deletions modules/core/src/lib/deck-picker.ts
Expand Up @@ -19,8 +19,7 @@
// THE SOFTWARE.

import type {Device} from '@luma.gl/api';
import {Framebuffer, Texture2D, readPixelsToArray} from '@luma.gl/webgl-legacy';
import GL from '@luma.gl/constants';
import {GL, Framebuffer, Texture2D, readPixelsToArray} from '@luma.gl/webgl-legacy';
import PickLayersPass, {PickingColorDecoder} from '../passes/pick-layers-pass';
import {getClosestObject, getUniqueObjects, PickedPixel} from './picking/query-object';
import {
Expand Down
6 changes: 2 additions & 4 deletions modules/core/src/lib/deck.ts
Expand Up @@ -33,10 +33,8 @@ import {VERSION} from './init';
import {getBrowser} from '@probe.gl/env';
import {luma, Device, DeviceProps} from '@luma.gl/api';
import {WebGLDevice} from '@luma.gl/webgl';
import GL from '@luma.gl/constants';
import {Timeline} from '@luma.gl/engine';
import {lumaStats} from '@luma.gl/core';
import {AnimationLoop, instrumentGLContext, setParameters} from '@luma.gl/webgl-legacy';
import {GL, AnimationLoop, instrumentGLContext, setParameters} from '@luma.gl/webgl-legacy';

import {Stats} from '@probe.gl/stats';
import {EventManager} from 'mjolnir.js';
Expand Down Expand Up @@ -1167,7 +1165,7 @@ export default class Deck {
metrics.gpuTimePerFrame = stats.get('GPU Time').getAverageTime();
metrics.cpuTimePerFrame = stats.get('CPU Time').getAverageTime();

const memoryStats = lumaStats.get('Memory Usage');
const memoryStats = luma.stats.get('Memory Usage');
metrics.bufferMemory = memoryStats.get('Buffer Memory').count;
metrics.textureMemory = memoryStats.get('Texture Memory').count;
metrics.renderbufferMemory = memoryStats.get('Renderbuffer Memory').count;
Expand Down

0 comments on commit f7362c9

Please sign in to comment.