Open anandthakker opened 7 years ago
I forgot to add: this decoupling would also largely clear the path towards updateable feature property data -- i.e., updating feature properties without wasting time reparsing geometries.
I am in the same situation with #4575, i wonder that if i set stops[ [ 'uuid', '#fff'] ] , does it mean that compare this uuid with all other features of the layer? if so, is it possible to do this just in the current viewport or some other limitation?
@anandthakker This would also be an enabler for transitions for DDS property style updates https://github.com/mapbox/mapbox-gl-js/issues/3170
cc @averas
I may have two paint properties to update such as line-color, line-width in some cases.
It seems like calling setPaintProperty for each redraws on each call which is visually slowing user performance.
_mapCanvas.setPaintProperty("nmap-boundary-layer", "line-color", _layerPaintProperties[0]); _mapCanvas.setPaintProperty("nmap-boundary-layer", "line-width", _layerPaintProperties[1]);
Is there a way to set both properties and result in only one redraw?
@keyofj style updates are batched per animation frame, so two consecutive calls shouldn't result in duplicate work. If you are, in fact, seeing this, then it's a bug--in which case, please do open a new issue (with an example if possible š )!
Thanks.
Get Outlook for Androidhttps://aka.ms/ghei36
From: Anand Thakker notifications@github.com Sent: Friday, June 2, 2017 5:08:02 PM To: mapbox/mapbox-gl-js Cc: Michael Clark; Mention Subject: Re: [mapbox/mapbox-gl-js] Decouple layout and populating paint attribute buffers (#4576)
@keyofjhttps://github.com/keyofj style updates are batched per animation frame, so two consecutive calls shouldn't result in duplicate work. If you are, in fact, seeing this, then it's a bug--in which case, please do open a new issue (with an example if possible š )!
ā You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/mapbox/mapbox-gl-js/issues/4576#issuecomment-305909548, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHoyQDTjl4Y70rYkPXno-AWrWIlGgajNks5sAHmygaJpZM4M6uMB.
Currently, the following two processes are always done together:
earcut
, etc.The principal reason for building these arrays in tandem is that it prevents us from having to keep track of which vertices belong to each vector tile feature. We could track this, though, and it would allow us to update paint buffers without redoing layout, which might significantly improve runtime styling performance in the case where a user sets a paint property to a data-driven value. (E.g. https://github.com/mapbox/mapbox-gl-js/issues/4575)