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

chore: luma.gl@9-alpha.13. Imports of /core, /constants => /webgl-legacy (v9) #7539

Merged
merged 1 commit into from Dec 30, 2022
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
7 changes: 7 additions & 0 deletions examples/experimental/bezier/index.html
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<title>deck.gl example</title>
<script src='src/app.tsx' type="module"></script>
</head>
</html>
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
19 changes: 19 additions & 0 deletions examples/experimental/bezier/vite.config.ts
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import fs from 'fs';

const ROOTDIR = `${__dirname}/../../..`;

/** Run against local source */
const getAliases = async (frameworkName) => {
const modules = await fs.promises.readdir(`${ROOTDIR}/modules`)
return modules.reduce<Record<string, string>>((aliases, module) => {
aliases[`${frameworkName}/${module}`] = `${ROOTDIR}/modules/${module}/src`;
return aliases;
}, {});
}

// https://vitejs.dev/config/
export default defineConfig(async () => ({
resolve: {alias: await getAliases('@deck.gl')},
server: {open: true}
}));
41 changes: 0 additions & 41 deletions examples/experimental/bezier/webpack.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions examples/experimental/h3-grid/index.html
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<title>deck.gl example</title>
<script src='src/app.tsx' type="module"></script>
</head>
</html>
19 changes: 19 additions & 0 deletions examples/experimental/h3-grid/vite.config.ts
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import fs from 'fs';

const ROOTDIR = `${__dirname}/../../..`;

/** Run against local source */
const getAliases = async (frameworkName) => {
const modules = await fs.promises.readdir(`${ROOTDIR}/modules`)
return modules.reduce<Record<string, string>>((aliases, module) => {
aliases[`${frameworkName}/${module}`] = `${ROOTDIR}/modules/${module}/src`;
return aliases;
}, {});
}

// https://vitejs.dev/config/
export default defineConfig(async () => ({
resolve: {alias: await getAliases('@deck.gl')},
server: {open: true}
}));
7 changes: 7 additions & 0 deletions examples/experimental/interleaved-buffer/index.html
@@ -0,0 +1,7 @@
<!doctype html>
<html>
<head>
<title>deck.gl example</title>
<script src='src/app.tsx' type="module"></script>
</head>
</html>
19 changes: 19 additions & 0 deletions examples/experimental/interleaved-buffer/vite.config.ts
@@ -0,0 +1,19 @@
import { defineConfig } from 'vite';
import fs from 'fs';

const ROOTDIR = `${__dirname}/../../..`;

/** Run against local source */
const getAliases = async (frameworkName) => {
const modules = await fs.promises.readdir(`${ROOTDIR}/modules`)
return modules.reduce<Record<string, string>>((aliases, module) => {
aliases[`${frameworkName}/${module}`] = `${ROOTDIR}/modules/${module}/src`;
return aliases;
}, {});
}

// https://vitejs.dev/config/
export default defineConfig(async () => ({
resolve: {alias: await getAliases('@deck.gl')},
server: {open: true}
}));
4 changes: 2 additions & 2 deletions examples/layer-browser/package.json
Expand Up @@ -11,8 +11,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
11 changes: 5 additions & 6 deletions modules/aggregation-layers/package.json
Expand Up @@ -30,18 +30,17 @@
"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/shadertools": "9.0.0-alpha.13",
"@luma.gl/webgl-legacy": "9.0.0-alpha.13",
"@math.gl/web-mercator": "^3.6.2",
"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.12",
"@luma.gl/core": "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/engine": "9.0.0-alpha.13",
"@luma.gl/webgl-legacy": "9.0.0-alpha.13"
},
"gitHead": "13ace64fc2cee08c133afc882fc307253489a4e4"
}
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
4 changes: 1 addition & 3 deletions modules/arcgis/package.json
Expand Up @@ -32,9 +32,7 @@
"peerDependencies": {
"@arcgis/core": "^4.0.0",
"@deck.gl/core": "^8.0.0",
"@luma.gl/core": "9.0.0-alpha.12",
"@luma.gl/webgl-legacy": "9.0.0-alpha.12",
"@luma.gl/constants": "9.0.0-alpha.12"
"@luma.gl/webgl-legacy": "9.0.0-alpha.13"
},
"dependencies": {
"esri-loader": "^3.3.0"
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": "^3.6.2",
"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