Open jasonjmcghee opened 2 years ago
Here is the screenshot example (Press S
to take a screenshot):
fontswitch
: Try it with WASMHere are the WebGL (from main repo) examples hosted statically:
hello_minimal
puts "Hello Minimal Bracket World" on the screen. Try it with WASMhello_terminal
puts a bouncing "Hello World" on the screen in color, with frames-per-second [FPS] counting, and frame-rate limiting. Try it with WASMsparse
is the same demo, but with a second layer in a VGA 8x16 font on a second layer, no frame-rate limiting, and utilizing batched command submission. Try it with WASMwalking
lets you use your keyboard to walk an @
symbol around a random map. Try it with WASMastar-mouse
lets you use your mouse to move around a random map, using A-Star pathing (from the bracket-pathfinding
crate) to avoid obstacles. Try it with WASMtiles
is similar to the walking
demo, but uses two layers of graphical tiles (graphical back-ends only). Try it with WASMrex
demonstrates loading a sprite from REX Paint and rendering it to the terminal. Try it with WASMpostprocess
demonstrates the library's post-processing effects - scan lines and screen burn. Try it with WASMtextblock
demonstrates the TextBlock
system, giving you a "builder" approach to constructing larger blocks of text with word-wrapping and formatting. Try it with WASMdwarfmap
demonstrates using the terminal with Algorithm3D
to provide a Dwarf Fortress style 3D map (2D "slices" of a 3D world). It uses the bracket-noise
library for terrain generation. Try it with WASMkeyboard
demonstrates keyboard scan-code input. It's mostly useful for debugging. Try it with WASMtextsprites
demonstrates multi-tile sprites. Try it with WASMnative_gl
shows you how to access OpenGL directly. Only works with opengl
back-ends, WASM or native. Try it with WASM
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)
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?
pixelated
and equivalent to make super sharp visualsNote: 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):
Zoomed way in (blurry):
After
This is taken with the new screenshot method :) (make sure to click the image - 0 blurriness)
This is zoomed way in:
Scaling / Auto-resize: