Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions modules/core/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors

import log from '../utils/log';
import {Pan, InputDirection, Pinch, Tap} from 'mjolnir.js';
import type {PanRecognizerOptions, PinchRecognizerOptions, TapRecognizerOptions} from 'mjolnir.js';

Expand Down Expand Up @@ -52,16 +51,6 @@ export const COORDINATE_SYSTEM = {
CARTESIAN: 'cartesian'
} as const;

// Deprecated
/* eslint-disable accessor-pairs */
Object.defineProperty(COORDINATE_SYSTEM, 'IDENTITY', {
get: () => {
log.deprecated('COORDINATE_SYSTEM.IDENTITY', 'COORDINATE_SYSTEM.CARTESIAN')();
return COORDINATE_SYSTEM.CARTESIAN;
}
});
/* eslint-enable accessor-pairs */

/**
* How coordinates are transformed from the world space into the common space.
*/
Expand Down
2 changes: 1 addition & 1 deletion showcases/ascii/ascii-layer/ascii-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class AsciiLayer extends CompositeLayer {

return new IconLayer({
id: 'text',
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
data: grid,
opacity: 1,
iconAtlas,
Expand Down
2 changes: 1 addition & 1 deletion showcases/graph/graph-layer/graph-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {CompositeLayer, IconLayer, LineLayer, ScatterplotLayer, COORDINATE_SYSTE

const defaultProps = {
offset: {x: 0, y: 0},
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,

getLinkPosition: link => ({
sourcePosition: [link.source.x, link.source.y],
Expand Down
2 changes: 1 addition & 1 deletion showcases/graph/graph-layer/graph-layout-layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const defaultProps = {
data: null,
opacity: 1.0,
layout: LayoutD3,
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
nodeIconAccessors: {}
};

Expand Down
2 changes: 1 addition & 1 deletion test/apps/standalone/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const nonGeoExample = new deck.DeckGL({
layers: [
new deck.PointCloudLayer({
id: 'pointCloud',
coordinateSystem: deck.COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: deck.COORDINATE_SYSTEM.CARTESIAN,
opacity: 1,
data: points,
getPosition: d => d.position,
Expand Down
4 changes: 2 additions & 2 deletions test/apps/svg-interoperability/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Root extends PureComponent {
],
getRadius: p => 2,
getColor: p => [255, 0, 128, 196],
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
// there's a bug that the radius calculated with project_scale
radiusMinPixels: 2
});
Expand Down Expand Up @@ -172,7 +172,7 @@ class Root extends PureComponent {
p.radius * Math.cos(p.theta * DEGREE_TO_RADIAN) * size,
p.radius * Math.sin(p.theta * DEGREE_TO_RADIAN) * size
],
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
cellSize: 20,
contours: this._getContours(bandsOn),
gpuAggregation: true
Expand Down
2 changes: 1 addition & 1 deletion test/apps/video/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class App extends Component {

_renderLayers() {
return new BitmapLayer({
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
image: this._videoRef.current,
bounds: [-300, -400, 400, 300]
});
Expand Down
11 changes: 0 additions & 11 deletions test/modules/core/shaderlib/project/project-functions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,6 @@ test('project#projectPosition rejects legacy numeric coordinate systems', () =>
}),
'Legacy numeric coordinate systems are rejected'
).toThrow(/Invalid coordinateSystem/);

const identityResult = projectPosition([0, 0, 0], {
viewport: TEST_VIEWPORT,
coordinateSystem: COORDINATE_SYSTEM.IDENTITY,
coordinateOrigin: [256, 256, 0]
});

expect(
equals(identityResult, [174.15110778808594, -58.11044311523443, 0]),
'IDENTITY aliases cartesian behavior'
).toBeTruthy();
});

webglTest('project#projectPosition vs project_position', async () => {
Expand Down
13 changes: 0 additions & 13 deletions test/modules/core/shaderlib/project/viewport-uniforms.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,19 +171,6 @@ test('project#getUniforms rejects legacy numeric coordinate systems', () => {
).toThrow(/Invalid coordinateSystem/);
});

test('project#getUniforms normalizes IDENTITY to CARTESIAN', () => {
const cartesian = project.getUniforms({
viewport: TEST_VIEWPORTS.infoVis,
coordinateSystem: COORDINATE_SYSTEM.CARTESIAN
});
const identity = project.getUniforms({
viewport: TEST_VIEWPORTS.infoVis,
coordinateSystem: COORDINATE_SYSTEM.IDENTITY
});

expect(identity, 'IDENTITY matches CARTESIAN').toEqual(cartesian);
});

test('project64#getUniforms', () => {
const viewport = TEST_VIEWPORTS.map;
const uniforms = project.getUniforms({viewport});
Expand Down
4 changes: 2 additions & 2 deletions test/modules/mesh-layers/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ test('shouldComposeModelMatrix', () => {
'Should not composeModelMatrix for lnglat.'
).toBeFalsy();
expect(
shouldComposeModelMatrix({}, COORDINATE_SYSTEM.IDENTITY),
'Should composeModelMatrix for identity.'
shouldComposeModelMatrix({}, COORDINATE_SYSTEM.CARTESIAN),
'Should composeModelMatrix for cartesian.'
).toBeTruthy();
expect(
shouldComposeModelMatrix({}, COORDINATE_SYSTEM.METER_OFFSETS),
Expand Down
Loading