Comments (7)
I ran the same example on OSX and confirm that the same issue with colours takes place on another machine too.
from deck.gl.
@ibgreen, could you please have a quick look at this when there is a free minute?
from deck.gl.
@kachkaev Thanks for investigating this. This seems related to the arc-layer being improved to support "per arc" color, rather than global colors for all arcs.
You can see the new calculateInstanceColors
method on master
https://github.com/uber/deck.gl/blob/master/src/layers/arc-layer/arc-layer.js#L125
https://github.com/uber/deck.gl/blob/master/src/layers/arc-layer/arc-layer-vertex.glsl#L67
For now, you could either make a copy of the old layer inside your app, or change your app to use per-instance colors.
@gnavvy We should create a CHANGELOG.md. Also update docs and example to correctly reflect the new API.
from deck.gl.
@ibgreen it's good to see that it's a result of a change in the API rather than something's wrong with how I run your demo. Could you please give a quick and small hint on what to change the color of a scatter plot in your example, for instance? I'm playing with deck.gl now and am just about exploring this.
UPD Or a test layer, if that's quicker to explain
from deck.gl.
Maybe this little example will make it easier to give a hint:
<DeckGLOverlay
width={width}
height={height}
{...mapViewState}
layers={[
new ScatterplotLayer({
id: 'layer1',
width,
height,
latitude: mapViewState.latitude,
longitude: mapViewState.longitude,
zoom: mapViewState.zoom,
radius: 10,
data: [
{ position: {x: -0.1, y: -0.2, z: 10}, color: [255, 0, 255] },
{ position: {x: -0.3, y: 0.3, z: 0}, color: [255, 0, 255] },
{ position: {x: 0.2, y: -0.4, z: 0}, color: [255, 0, 255] },
{ position: {x: 0.2, y: 0.3, z: 0}, color: [255, 0, 255] },
],
}),
]}
/>
@gnavvy what should be done here to see a color that is different than red in 2.2.4
? Hope it takes just a few seconds to answer ;-)
UPD Can the size be made dynamic too (e.g. with some relative size in data)?
from deck.gl.
Hi @kachkaev
The problem was due to the point colors were set to constant in the scatterplot-layer-fragment shader, sorry about that.
I just pushed 2.2.5 to fix this. Could you take a look and see if it works?
from deck.gl.
@gnavvy thanks for having a look! The library is still 2.2.4 on npm, could you please publish? I'm also a bit curious about bring the colors back in other layers such as in arcs.
It would be nice if the example was up-to-date with the library - this is likely to save a good portion of time by reducing more stupid questions like mine ;-)
from deck.gl.
Related Issues (20)
- [Bug] pydeck version inconsistency
- [Bug] Unicode characters aren't visible. HOT 2
- [Bug] Using @deck.gl/arcgis,Abnormal display of multiple DeckLayers HOT 2
- [Bug]Using @deck.gl/[email protected],Abnormal display of multiple DeckLayers HOT 1
- [Bug] deck.gl draws points that are obscured by mapBox's terrain HOT 1
- [Feat] Tileset Improvements
- [Bug] Postprocessing not working in v9
- [Bug] Right-click recognition isn't working on Safari
- [Bug] Column Layer not rendering on Samsung's latest devices with Chrome 120 (eg: S23, S22, Fold) HOT 15
- [Bug] cartocolor dependency is missing a license HOT 1
- [Bug] Google maps website example loading raster map in v9 HOT 1
- [Bug] URL in request parameters into CARTO module in v9
- [Bug] ArcGIS module broken in v9
- [Bug] Type error in @deck.gl/carto v9.0.0.alpha-7
- [Bug] The Cesium Google 3D Tiles endpoint provides an _incorrect_ url for the Tile3dLayer to use with the CesiumIonLoader HOT 4
- MVTLayer doesn't work as mask layer HOT 2
- [Bug] Error converting picking info from binary to geojson in new v9 VectorTileLayer HOT 3
- [Bug] ScenegraphLayer + getScale + updateTriggers HOT 2
- [Feat] Support dashed lines in ArcLayer HOT 4
- [Bug] Cannot dynamically alternate between terrain ON/OFF HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deck.gl.