Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ed82f71
wip bump
junkdog Jun 26, 2025
2d85066
prepare WebGl2Backend for beamterm-0.5.0
junkdog Jun 28, 2025
8d8be95
WebGl2BackendOptions:canvas_padding_color
junkdog Jun 28, 2025
699f98c
WebGl2BackendOptions::enable_mouse_selection
junkdog Jun 28, 2025
8b0bdc3
s/context/beamterm/
junkdog Jun 28, 2025
4b8ea39
update backend feature matrix
junkdog Jun 28, 2025
5d069d8
render during WebGl2Backend::flush
junkdog Jun 28, 2025
1b71a5b
convert into error
junkdog Jun 28, 2025
42fe0a2
retain and expose options
junkdog Jun 29, 2025
7ec2915
track hyperlinked cells
junkdog Jun 29, 2025
6f2bb6f
hyperlinks!
junkdog Jun 29, 2025
4252bf9
support HyperLink widgets
junkdog Jun 29, 2025
6c352bb
hover over hyperlinks
junkdog Jun 29, 2025
0b46d25
update to beamterm-0.5.0
junkdog Jun 29, 2025
b4313c6
update Cargo.lock
junkdog Jun 29, 2025
875e804
update docs
junkdog Jun 29, 2025
39c5454
update backend comparison matrix
junkdog Jul 4, 2025
f6a4dd7
add HyperlinkCallback
junkdog Jul 4, 2025
a1ca986
add webgl2 options to examples
junkdog Jul 24, 2025
6992865
clean-up
junkdog Jul 25, 2025
a2c5a2b
use unreleased beamterm-renderer for the time being
junkdog Jul 25, 2025
00370d8
re-export FontAtlasData
junkdog Jul 25, 2025
7e4d6e5
re-export from webgl2 module
junkdog Jul 25, 2025
cd1ac1c
always re-draw when self.options.default_mouse_handler
junkdog Jul 26, 2025
3bcb7c7
update examples with webgl2 configuration
junkdog Jul 26, 2025
03c920b
beamterm-0.6.0
junkdog Aug 14, 2025
e232a1a
add spacer to pong so url isn't obscured
junkdog Aug 14, 2025
58010da
32 glyphs per layer
junkdog Aug 18, 2025
58dac52
use beamterm 0.7.0
junkdog Sep 7, 2025
93d68d5
remove cargo lock files
junkdog Sep 7, 2025
de1daee
fix bit-shift operations for 32 glyphs per layer
junkdog Sep 7, 2025
7dec538
fix doc
junkdog Sep 8, 2025
9dd380c
Update src/backend/webgl2.rs
junkdog Sep 24, 2025
be1de98
Update src/backend/webgl2.rs
junkdog Sep 24, 2025
f276f12
update docs
junkdog Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ ratatui = { version = "0.29", default-features = false, features = ["all-widgets
console_error_panic_hook = "0.1.7"
thiserror = "2.0.12"
bitvec = { version = "1.0.1", default-features = false, features = ["alloc", "std"] }
beamterm-renderer = "0.1.1"
beamterm-renderer = "0.7.0"
2 changes: 1 addition & 1 deletion examples/animations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ publish = false

[dependencies]
ratzilla = { path = "../../" }
tachyonfx = { version = "0.13.0", default-features = false, features = ["web-time"] }
tachyonfx = { version = "0.16.0", default-features = false, features = ["web-time"] }
console_error_panic_hook = "0.1.7"
examples-shared = { path = "../shared" }
2 changes: 1 addition & 1 deletion examples/canvas_waves/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ publish = false
[dependencies]
ratzilla = { path = "../../" }
console_error_panic_hook = "0.1.7"
tachyonfx = { version = "0.15.0", default-features = false, features = ["web-time"] }
tachyonfx = { version = "0.16.0", default-features = false, features = ["web-time"] }
web-time = "1.1.0"
examples-shared = { path = "../shared" }
6 changes: 5 additions & 1 deletion examples/canvas_waves/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ use wave_effect::WaveInterference;
fn main() -> std::io::Result<()> {
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
let terminal = MultiBackendBuilder::with_fallback(BackendType::WebGl2)
.webgl2_options(WebGl2BackendOptions::new().measure_performance(true).grid_id("container"))
.webgl2_options(WebGl2BackendOptions::new()
.measure_performance(true)
.grid_id("container")
.enable_console_debug_api()
)
.build_terminal()?;

let mut effect = WaveInterference::new().into_effect();
Expand Down
7 changes: 1 addition & 6 deletions examples/clipboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,5 @@
}
</style>
</head>
<body>
<script type="module">
import init from "./pkg/ratzilla.js";
init();
</script>
</body>
<body></body>
</html>
1 change: 0 additions & 1 deletion examples/colors_rgb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use ratzilla::{
layout::{Position, Rect},
style::Color,
widgets::Widget,
Terminal,
},
WebRenderer,
};
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
clap = { version = "4.5.23", features = ["derive"] }
rand = { version = "0.8.5", features = ["small_rng"], default-features = false }
ratzilla = { path = "../../" }
tachyonfx = { version = "0.15.0", default-features = false, features = ["web-time"] }
tachyonfx = { version = "0.16.0", default-features = false, features = ["web-time"] }
web-time = "1.1.0"
examples-shared = { path = "../shared" }
# tui-big-text = "0.6.1"
2 changes: 2 additions & 0 deletions examples/demo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ fn main() -> Result<()> {

let webgl2_options = WebGl2BackendOptions::new()
.measure_performance(true)
.enable_console_debug_api()
.enable_mouse_selection()
.size((1600, 900));

let terminal = MultiBackendBuilder::with_fallback(BackendType::WebGl2)
Expand Down
6 changes: 5 additions & 1 deletion examples/demo2/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ fn main() -> std::io::Result<()> {
let viewport = Viewport::Fixed(Rect::new(0, 0, 81, 18));

let terminal = MultiBackendBuilder::with_fallback(BackendType::Canvas)
.webgl2_options(WebGl2BackendOptions::new().measure_performance(true))
.webgl2_options(WebGl2BackendOptions::new()
.measure_performance(true)
.enable_mouse_selection()
.enable_console_debug_api()
)
.terminal_options(TerminalOptions { viewport })
.build_terminal()?;

Expand Down
5 changes: 5 additions & 0 deletions examples/minimal/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use ratzilla::{
};

use examples_shared::backend::{BackendType, MultiBackendBuilder};
use ratzilla::backend::webgl2::WebGl2BackendOptions;

fn main() -> io::Result<()> {
let counter = Rc::new(RefCell::new(0));
Expand All @@ -19,6 +20,10 @@ fn main() -> io::Result<()> {
let mouse_event_kind = Rc::new(RefCell::new(None::<MouseEventKind>));

let terminal = MultiBackendBuilder::with_fallback(BackendType::Dom)
.webgl2_options(WebGl2BackendOptions::new()
.enable_console_debug_api()
.enable_mouse_selection()
)
.build_terminal()?;

terminal.on_key_event({
Expand Down
12 changes: 11 additions & 1 deletion examples/pong/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@
font-size: 16px;
margin: 0px;
}

#container {
flex: 1; /* Take all remaining space */
width: 100%;
position: relative; /* For absolute positioning of canvas if needed */
overflow: hidden; /* Prevent any overflow */
}
</style>
</head>
<body></body>
<body>
<div id="container"></div>
<div style="height: 50px;"></div>
</body>
</html>
19 changes: 15 additions & 4 deletions examples/pong/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::{cell::RefCell, rc::Rc};

use ratzilla::{
event::KeyCode, utils::set_document_title, widgets::Hyperlink, WebRenderer,
};
use ratzilla::{event::KeyCode, utils::set_document_title, widgets::Hyperlink, CursorShape, WebRenderer};

use ratzilla::ratatui::{
layout::{Alignment, Constraint, Layout, Rect},
Expand All @@ -12,9 +10,11 @@ use ratzilla::ratatui::{
canvas::{Canvas, Circle},
Block, Paragraph, Widget,
},
Terminal,
};
use examples_shared::backend::{BackendType, MultiBackendBuilder};
use ratzilla::backend::canvas::CanvasBackendOptions;
use ratzilla::backend::dom::DomBackendOptions;
use ratzilla::backend::webgl2::WebGl2BackendOptions;

struct App {
count: u64,
Expand Down Expand Up @@ -64,8 +64,19 @@ impl App {
fn main() -> std::io::Result<()> {
std::panic::set_hook(Box::new(console_error_panic_hook::hook));
let app_state = Rc::new(RefCell::new(App::new()));

let terminal = MultiBackendBuilder::with_fallback(BackendType::Dom)
.webgl2_options(WebGl2BackendOptions::new()
.grid_id("container")
.enable_hyperlinks()
.enable_mouse_selection()
)
.canvas_options(CanvasBackendOptions::new()
.grid_id("container")
)
.dom_options(DomBackendOptions::new(Some("container".into()), CursorShape::SteadyBlock))
.build_terminal()?;

terminal.on_key_event({
let app_state_cloned = app_state.clone();
move |event| {
Expand Down
2 changes: 1 addition & 1 deletion examples/tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ publish = false

[dependencies]
ratzilla = { path = "../../" }
tachyonfx = { version = "0.13.0", default-features = false, features = ["web-time"] }
tachyonfx = { version = "0.16.0", default-features = false, features = ["web-time"] }
console_error_panic_hook = "0.1.7"
examples-shared = { path = "../shared" }
Loading
Loading