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

Add support for line property functions #3033

Merged
merged 10 commits into from
Nov 21, 2016
Merged

Add support for line property functions #3033

merged 10 commits into from
Nov 21, 2016

Conversation

lucaswoj
Copy link
Contributor

@lucaswoj lucaswoj commented Aug 18, 2016

This PR adds support for line property functions

fixes #2729

Checklist

Related PRs

@wandergis
Copy link
Contributor

great job!!!

@lucaswoj lucaswoj changed the title Add support for line-blur property functions Add support for line property functions Aug 22, 2016
@lucaswoj
Copy link
Contributor Author

lucaswoj commented Aug 22, 2016

I'm seeing a statistically significant frame-duration slowdown on this branch.

line2 Benchmarks

buffer: 1,158 ms
fps: 59 fps
frame-duration: 9.5 ms, 11% > 16ms
query-point: 0.79 ms
query-box: 57.17 ms
geojson-setdata-small: 16 ms
geojson-setdata-large: 127 ms

buffer: 940 ms
fps: 60 fps
frame-duration: 9.4 ms, 10% > 16ms
query-point: 0.82 ms
query-box: 54.48 ms
geojson-setdata-small: 13 ms
geojson-setdata-large: 111 ms

master Benchmarks

buffer: 1,034 ms
fps: 60 fps
frame-duration: 8.2 ms, 4% > 16ms
query-point: 0.80 ms
query-box: 56.17 ms
geojson-setdata-small: 11 ms
geojson-setdata-large: 102 ms

@stirringhalo
Copy link

Fantastic!
Keen on getting this released so I can start using this!

@mollymerp
Copy link
Contributor

Per slack chat I will take a stab at the gl-native PR in the next couple days

@mollymerp
Copy link
Contributor

Omg can it be?? This is finally ready for review! cc @lucaswoj for 👀

benchmark master 8c58bdb line2 48e8931
map-load 132 ms 101 ms
style-load 109 ms 119 ms
buffer 871 ms 844 ms
fps 60 fps 60 fps
frame-duration 4.1 ms, 0% > 16ms 4.4 ms, 0% > 16ms
query-point 0.62 ms 0.62 ms
query-box 64.13 ms 66.54 ms
geojson-setdata-small 5 ms 5 ms
geojson-setdata-large 208 ms 207 ms

@mollymerp
Copy link
Contributor

mollymerp commented Nov 17, 2016

@@ -45,7 +44,12 @@ const lineInterface = {
{name: 'a_data', components: 4, type: 'Uint8'}
]),
paintAttributes: [
{property: 'line-color', type: 'Uint8'}
{property: 'line-color', type: 'Uint8'},
{property: 'line-blur', multiplier:10, type: 'Uint8', },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nits: Mixed spaces and tabs, and missing space after :.

{property: 'line-blur', multiplier:10, type: 'Uint8', },
{property: 'line-opacity', multiplier:10, type: 'Uint8', },
{property: 'line-width', multiplier:10, type: 'Uint8', },
{property: 'line-gap-width', multiplier:10, type: 'Uint8', name: 'a_gapwidth', },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a_gap_width, and then an override isn't necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require a change to the shaders and native though 💭

@@ -5,7 +5,6 @@ const createVertexArrayType = require('../vertex_array_type');
const createElementArrayType = require('../element_array_type');
const loadGeometry = require('../load_geometry');
const EXTENT = require('../extent');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the whitespace here.

@mollymerp
Copy link
Contributor

@jfirebaugh made your requested changes -- I'm hesitant to rename a_gapwidth in this PR (and add additional PRs to native and shaders) but lmk if you want me to do it.

Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, we can handle it at a later time.

@mollymerp mollymerp merged commit 91395c8 into master Nov 21, 2016
@mollymerp mollymerp deleted the line2 branch November 21, 2016 16:51
@lucaswoj
Copy link
Contributor Author

😂 😂 😂 😂 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable property functions for line paint properties
5 participants