谁能解释与 d3js 相比,Deck.gl 的数据更新和转换如何工作?例如在这段代码中:
var updateLayers = function(dataset) {
var scatterplot = new deck.ScatterplotLayer({
/* unique id of this layer */
id: 'checkins',
/* data: an array of objects */
data: dataset,
/* data accessors */
getPosition: d => d.geometry.coordinates, // returns longitude, latitude, [altitude]
getRadius: d => circleSize(d.properties.reviews), // returns radius in meters
getColor: d => [255, 0, 0],
outline: true, // returns R, G, B, [A] in 0-255 range
transitions: {
getRadius: {
duration: 1000,
easing: d3.easeCubicInOut,
enter: value => [value[0], value[1], value[2], 1] // fade in
}
}
})
// Add the layer to deckgl:
deckgl.setProps({ layers: [scatterplot] });
}
我不清楚在enter: value => [value[0], value[1], value[2], 1]
做什么。谁能解释一下?我通常希望(根据 d3js)这enter:
是在转换中设置断点,但我不清楚value
指的是什么?