Skip to content

Commit ea0471c

Browse files
committed
Fix web version and update readme
1 parent f7f3686 commit ea0471c

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed

Cargo.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ crate-type = ["cdylib", "rlib"]
1616
[dependencies]
1717
eframe = { version = "0.28", default-features = false, features = [ "wgpu", "accesskit", "default_fonts", "wayland", "web_screen_reader" ] }
1818
egui-wgpu = "0.28"
19+
wgpu = { version = "*", features = ["webgpu", "webgl"] }
1920
log = "0.4"
2021
env_logger = "0.11"
2122
bytemuck = { version = "1.16", features = [ "derive" ] }

README.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Custom functions should be valid WGSL expressions, with the following extra func
1212
* `cdiv(vec2<f32>, vec2<f32>) -> vec2<f32>`: divide two complex numbers
1313
* `cmul(vec2<f32>, vec2<f32>) -> vec2<f32>`: multiply two complex numbers
1414

15+
* `rgb(u32) -> vec3<f32>` - Convert a hex RGB colour (in the form `0xRRGGBBu`) to the format WebGPU expects
16+
* `hsv_rgb(vec3<f32>) -> vec3<f32>` - Convert an HSV colour to RGB
17+
1518
All builtin WGSL functions are also available.
1619

1720
## Note on Git history

web/style.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ canvas {
1515
margin-left: auto;
1616
display: block;
1717
position: absolute;
18-
top: 0%;
19-
left: 50%;
20-
transform: translate(-50%, 0%);
18+
top: 0;
19+
left: 0;
20+
width: 100%;
21+
height: 100%;
2122
}

0 commit comments

Comments
 (0)