Application prototype #14

Merged
glen merged 101 commits from app-proto into main 2024-10-21 23:38:28 +00:00
2 changed files with 93 additions and 51 deletions
Showing only changes of commit b9370ceb41 - Show all commits

View File

@ -18,6 +18,16 @@ canvas {
margin-top: 5px; margin-top: 5px;
} }
input { .control {
margin-top: 5px; display: flex;
flex-direction: row;
width: 600px;
}
label {
width: 150px;
}
input {
flex-grow: 1;
} }

View File

@ -239,57 +239,89 @@ fn main() {
view! { view! {
div(id="app") { div(id="app") {
canvas(ref=display, width="600", height="600") canvas(ref=display, width="600", height="600")
div(class="control") {
label(for="ctrl-x") { "Sphere 0 depth" }
input( input(
type="range", type="range",
id="ctrl-x",
min=-1.0, min=-1.0,
max=1.0, max=1.0,
step=0.001, step=0.001,
bind:valueAsNumber=ctrl_x bind:valueAsNumber=ctrl_x
) )
}
div(class="control") {
label(for="ctrl-y") { "Sphere 1 depth" }
input( input(
type="range", type="range",
id="ctrl-y",
min=-1.0, min=-1.0,
max=1.0, max=1.0,
step=0.001, step=0.001,
bind:valueAsNumber=ctrl_y bind:valueAsNumber=ctrl_y
) )
}
div(class="control") {
label(for="radius-x") { "Sphere 0 radius" }
input( input(
type="range", type="range",
id="radius-x",
min=0.5, min=0.5,
max=1.5, max=1.5,
step=0.001, step=0.001,
bind:valueAsNumber=radius_x bind:valueAsNumber=radius_x
) )
}
div(class="control") {
label(for="radius-y") { "Sphere 1 radius" }
input( input(
type="range", type="range",
id="radius-y",
min=0.5, min=0.5,
max=1.5, max=1.5,
step=0.001, step=0.001,
bind:valueAsNumber=radius_y bind:valueAsNumber=radius_y
) )
}
div(class="control") {
label(for="opacity") { "Opacity" }
input( input(
type="range", type="range",
id="opacity",
max=1.0, max=1.0,
step=0.001, step=0.001,
bind:valueAsNumber=opacity bind:valueAsNumber=opacity
) )
}
div(class="control") {
label(for="highlight") { "Highlight" }
input( input(
type="range", type="range",
id="highlight",
max=1.0, max=1.0,
step=0.001, step=0.001,
bind:valueAsNumber=highlight bind:valueAsNumber=highlight
) )
}
div(class="control") {
label(for="layer-threshold") { "Layer threshold" }
input( input(
type="range", type="range",
id="layer-threshold",
max=5.0, max=5.0,
step=1.0, step=1.0,
bind:valueAsNumber=layer_threshold bind:valueAsNumber=layer_threshold
) )
}
div(class="control") {
label(for="use-test-construction") { "Use test values" }
input( input(
type="checkbox", type="checkbox",
id="use-test-construction",
bind:checked=use_test_construction bind:checked=use_test_construction
) )
} }
} }
}
}); });
} }