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

Adjust 'point_color_mode' changing to upperCase #413

Merged
merged 1 commit into from Dec 10, 2019
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
2 changes: 1 addition & 1 deletion examples/get-started/src/constants.js
Expand Up @@ -50,5 +50,5 @@ export const APP_SETTINGS = {

export const XVIZ_STYLE = {
'/tracklets/objects': [{name: 'selected', style: {fill_color: '#ff8000aa'}}],
'/lidar/points': [{style: {point_color_mode: 'elevation'}}]
'/lidar/points': [{style: {point_color_mode: 'ELEVATION'}}]
};
2 changes: 1 addition & 1 deletion examples/xviz-playground/src/code-samples.js
Expand Up @@ -54,7 +54,7 @@ const streamMetadata = {
.type('POINTS')
.coordinate('VEHICLE_RELATIVE')
.streamStyle({
point_color_mode: 'elevation',
point_color_mode: 'ELEVATION',
point_color_domain: [0, 3],
radius_pixels: 4
})
Expand Down
11 changes: 9 additions & 2 deletions modules/core/src/layers/point-cloud-layer/point-cloud-layer.js
Expand Up @@ -22,17 +22,24 @@ import {PointCloudLayer as CorePointCloudLayer} from '@deck.gl/layers';

import vs from './point-cloud-layer-vertex.glsl';

// Both cases are for backwards compatibility
/* eslint-disable camelcase */
const COLOR_MODE = {
default: 0,
elevation: 1,
distance_to_vehicle: 2
distance_to_vehicle: 2,
DEFAULT: 0,
ELEVATION: 1,
DISTANCE_TO_VEHICLE: 2
};

const COLOR_DOMAIN = {
default: [0, 0],
elevation: [0, 3],
distance_to_vehicle: [0, 60]
distance_to_vehicle: [0, 60],
DEFAULT: [0, 0],
ELEVATION: [0, 3],
DISTANCE_TO_VEHICLE: [0, 60]
};
/* eslint-enable camelcase */

Expand Down
2 changes: 1 addition & 1 deletion test/apps/viewer/src/constants.js
Expand Up @@ -54,7 +54,7 @@ export const APP_SETTINGS = {

export const XVIZ_STYLE = {
'/tracklets/objects': [{name: 'selected', style: {fill_color: '#ff8000aa'}}],
'/lidar/points': [{style: {point_color_mode: 'elevation'}}]
'/lidar/points': [{style: {point_color_mode: 'ELEVATION'}}]
};

export const STYLES = {
Expand Down