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

Better layout #7

Merged
merged 15 commits into from
Apr 14, 2015
Merged

Better layout #7

merged 15 commits into from
Apr 14, 2015

Conversation

geelen
Copy link
Owner

@geelen geelen commented Apr 14, 2015

Rewrote the layout engine today, actually rendering each line off-screen and reading the pixels to get a depth map of the rendered type. It seems to be performing ok, I do some reasonable caching but it is on the main thread so maybe it'll chug. Will try on some real phones later ¯_(ツ)_/¯

Here's what it used to look like:
image
image

And now:
image
image

Feeling good about this!

@geelen
Copy link
Owner Author

geelen commented Apr 14, 2015

This is where the offscreen-rendering & depth-mapping gets calculated if anyone's interested: https://github.com/geelen/typeslab/blob/1635bee48aab3f9c000341db72408bc6c75b21d9/src/lib/models/line-metrics.js

geelen added a commit that referenced this pull request Apr 14, 2015
@geelen geelen merged commit 63363d1 into master Apr 14, 2015
@geelen geelen deleted the better-layout branch April 14, 2015 11:07
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.

None yet

1 participant