amethyst / amethyst/bracket-lib

WebGL: No resize, scaling, screenshot, or HiDPI support, and linear filtering is used

未关闭
#254 1 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
1.7k
派生
126
PR 合并指标
30 天内没有已合并 PR

描述

I've been on a deep dive in WebGL and there is a fair amount of missing functionality.

I've managed to implement the aforementioned missing features on a separate branch.

It'd be great to integrate the features into the main repo.

This is the branch: https://github.com/jasonjmcghee/bracket-lib/tree/issue_254_webgl_missing-features

([Here's an link for the comparison](https://github.com/amethyst/bracket-lib/compare/master...jasonjmcghee:issue_254_webgl_missing-features?expand=1))

If there is support here / buy-in I'm happy to add comments / documentation to ensure everything is abundantly clear, or test coverage anywhere that makes sense. I've just been following existing patterns for this code.

## So - what changed?
- Added automatic resize support
- Added scaling support
- Added HiDPI monitor support
- Added ability to take a screenshot
- Use NEAREST filtering + CSS `pixelated` and equivalent to make super sharp visuals

Note: On the branch I have a number of CSS changes on the `index.html` itself - no reason it couldn't be all rust.

# Before
(only using my fix in #251, to fix the black screen):

Generally how it looks (locked at 640x480, with no HiDPI):
Screen Shot 2022-01-04 at 6 30 44 PM

Zoomed way in (blurry):
Screen Shot 2022-01-04 at 6 30 14 PM

# After
This is taken with the new screenshot method :)
(make sure to click the image - 0 blurriness)
![screenshot(1)](https://user-images.githubusercontent.com/1522149/148150708-3644def1-6d77-4543-a58c-606f8e2bfa62.png)

This is zoomed way in:
Screen Shot 2022-01-04 at 6 23 27 PM

Scaling / Auto-resize:

Screen Shot 2022-01-04 at 6 27 53 PM

Screen Shot 2022-01-04 at 6 34 18 PM

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。