-
Notifications
You must be signed in to change notification settings - Fork 33
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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](https://cloud.githubusercontent.com/assets/23264/7135375/b2fe27a8-e2d8-11e4-82cc-4c6ec14fcc06.png)
![image](https://cloud.githubusercontent.com/assets/23264/7135392/ccf2699e-e2d8-11e4-8020-ac102b94b10c.png)
And now:
![image](https://cloud.githubusercontent.com/assets/23264/7135423/20f4f066-e2d9-11e4-9f9e-b1f46b00ccb8.png)
![image](https://cloud.githubusercontent.com/assets/23264/7135426/252187b2-e2d9-11e4-97ab-000678c52a6c.png)
Feeling good about this!