From 90b404217c61d13b49a70f37101ae1793a547268 Mon Sep 17 00:00:00 2001 From: Jan Zak Date: Wed, 5 May 2021 08:43:38 +0200 Subject: [PATCH] Move ClipExtension to @deck.gl/extensions --- .../mvt-layer/clip-extension.js => extensions/src/clip/clip.js} | 0 modules/extensions/src/index.js | 1 + modules/geo-layers/package.json | 1 + modules/geo-layers/src/mvt-layer/mvt-layer.js | 2 +- test/modules/geo-layers/mvt-layer.spec.js | 2 +- 5 files changed, 4 insertions(+), 2 deletions(-) rename modules/{geo-layers/src/mvt-layer/clip-extension.js => extensions/src/clip/clip.js} (100%) diff --git a/modules/geo-layers/src/mvt-layer/clip-extension.js b/modules/extensions/src/clip/clip.js similarity index 100% rename from modules/geo-layers/src/mvt-layer/clip-extension.js rename to modules/extensions/src/clip/clip.js diff --git a/modules/extensions/src/index.js b/modules/extensions/src/index.js index a8268612887..1ffdd64fca5 100644 --- a/modules/extensions/src/index.js +++ b/modules/extensions/src/index.js @@ -3,6 +3,7 @@ export {default as DataFilterExtension} from './data-filter/data-filter'; export {default as Fp64Extension} from './fp64/fp64'; export {default as PathStyleExtension} from './path-style/path-style'; export {default as FillStyleExtension} from './fill-style/fill-style'; +export {default as ClipExtension} from './clip/clip'; // Shader module export {default as project64} from './fp64/project64'; diff --git a/modules/geo-layers/package.json b/modules/geo-layers/package.json index 0741de7fd59..0c61ff507f1 100644 --- a/modules/geo-layers/package.json +++ b/modules/geo-layers/package.json @@ -43,6 +43,7 @@ }, "peerDependencies": { "@deck.gl/core": "^8.0.0", + "@deck.gl/extensions": "^8.0.0", "@deck.gl/layers": "^8.0.0", "@deck.gl/mesh-layers": "^8.0.0", "@loaders.gl/core": "^3.0.0-alpha" diff --git a/modules/geo-layers/src/mvt-layer/mvt-layer.js b/modules/geo-layers/src/mvt-layer/mvt-layer.js index d32766864a8..96f99092823 100644 --- a/modules/geo-layers/src/mvt-layer/mvt-layer.js +++ b/modules/geo-layers/src/mvt-layer/mvt-layer.js @@ -4,10 +4,10 @@ import {binaryToGeoJson} from '@loaders.gl/gis'; import {load} from '@loaders.gl/core'; import {COORDINATE_SYSTEM} from '@deck.gl/core'; import {_binaryToFeature, _findIndexBinary} from '@deck.gl/layers'; +import {ClipExtension} from '@deck.gl/extensions'; import TileLayer from '../tile-layer/tile-layer'; import {getURLFromTemplate, isURLTemplate} from '../tile-layer/utils'; -import ClipExtension from './clip-extension'; import {transform} from './coordinate-transform'; const WORLD_SIZE = 512; diff --git a/test/modules/geo-layers/mvt-layer.spec.js b/test/modules/geo-layers/mvt-layer.spec.js index 649f89dce2d..9fe380560d5 100644 --- a/test/modules/geo-layers/mvt-layer.spec.js +++ b/test/modules/geo-layers/mvt-layer.spec.js @@ -1,7 +1,7 @@ import test from 'tape-catch'; import {testLayer} from '@deck.gl/test-utils'; import {MVTLayer} from '@deck.gl/geo-layers'; -import ClipExtension from '@deck.gl/geo-layers/mvt-layer/clip-extension'; +import {ClipExtension} from '@deck.gl/extensions'; import {transform} from '@deck.gl/geo-layers/mvt-layer/coordinate-transform'; import {GeoJsonLayer} from '@deck.gl/layers'; import {geojsonToBinary} from '@loaders.gl/gis';