Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion examples/minwebgl/hexagonal_grid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ version = "0.1.0"
edition = "2024"

[dependencies]
rustc-hash = "2.1.1"
minwebgl = { workspace = true, features = [ "math" ] }
mingl = { workspace = true }
web-sys = { workspace = true, features = [ "DomRect", "MouseEvent" ] }
Expand Down
4 changes: 2 additions & 2 deletions examples/minwebgl/hexagonal_grid/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ fn draw_hexes() -> Result< (), minwebgl::WebglError >
hex_shader.uniform_matrix_upload( "u_mvp", mvp.raw_slice(), true );
hex_shader.uniform_upload( "u_color", &[ 0.1, 0.9, 0.1, 1.0 ] );
outline_geometry.activate();
context.draw_arrays( GL::LINE_LOOP, 0, outline_geometry.nvertices ); // qqq : don't use loop geometry, it has limmited suport among backends

context.draw_arrays( GL::LINE_LOOP, 0, outline_geometry.nvertices ); // aaa : don't use loop geometry, it has limmited suport among backends
// i added default lines mesh generation support, but for this webgl rendering i think line loop is okay
}
};

Expand Down
10 changes: 10 additions & 0 deletions examples/minwebgl/hexagonal_pathfind/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "hexagonal_pathfind"
version = "0.1.0"
edition = "2024"

[dependencies]
minwebgl = { workspace = true, features = [ "math" ] }
web-sys = { workspace = true, features = [ "DomRect", "MouseEvent" ] }
derive_tools = { workspace = true }
tiles_tools = { workspace = true }
5 changes: 5 additions & 0 deletions examples/minwebgl/hexagonal_pathfind/Trunk.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trunk-version = "*"

[build]
# Allow disabling sub-resource integrity (SRI)
no_sri = true
17 changes: 17 additions & 0 deletions examples/minwebgl/hexagonal_pathfind/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Hexagonal grid</title>
<link data-trunk rel="copy-dir" href="resources" data-target-path="static" />
<style>
</style>
</head>

<body>
<canvas id="canvas" width="1000" height="800"></canvas>
</body>

</html>
1 change: 1 addition & 0 deletions examples/minwebgl/hexagonal_pathfind/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hexagonal pathfind
Empty file.
Loading