use new aspect handling
This commit is contained in:
@@ -268,7 +268,7 @@ bit-length. For example, the 8-bit tileset for `150` is:
|
|||||||
theta: 90,
|
theta: 90,
|
||||||
phi: 90,
|
phi: 90,
|
||||||
speed: 0.33,
|
speed: 0.33,
|
||||||
radius: 5,
|
radius: 8,
|
||||||
orbit: false,
|
orbit: false,
|
||||||
it.text,
|
it.text,
|
||||||
)
|
)
|
||||||
|
|||||||
2
lib.typ
2
lib.typ
@@ -51,6 +51,7 @@
|
|||||||
autoplay: auto,
|
autoplay: auto,
|
||||||
loop: auto,
|
loop: auto,
|
||||||
subticks: auto,
|
subticks: auto,
|
||||||
|
aspect: auto,
|
||||||
) = {
|
) = {
|
||||||
let attrs = (:)
|
let attrs = (:)
|
||||||
if theta != auto { attrs.insert("theta", str(theta)) }
|
if theta != auto { attrs.insert("theta", str(theta)) }
|
||||||
@@ -64,5 +65,6 @@
|
|||||||
if autoplay != auto { attrs.insert("autoplay", if (autoplay) { "" } else { "false" }) }
|
if autoplay != auto { attrs.insert("autoplay", if (autoplay) { "" } else { "false" }) }
|
||||||
if loop != auto { attrs.insert("loop", if (loop) { "" } else { "false" }) }
|
if loop != auto { attrs.insert("loop", if (loop) { "" } else { "false" }) }
|
||||||
if subticks != auto { attrs.insert("subticks", if (subticks) { "" } else { "false" }) }
|
if subticks != auto { attrs.insert("subticks", if (subticks) { "" } else { "false" }) }
|
||||||
|
if aspect != auto { attrs.insert("style", "aspect-ratio: " + str(aspect)); }
|
||||||
html.elem("mc-diorama", html.script(body, type: "text/mc-world"), attrs: attrs)
|
html.elem("mc-diorama", html.script(body, type: "text/mc-world"), attrs: attrs)
|
||||||
}
|
}
|
||||||
|
|||||||
4
main.typ
4
main.typ
@@ -16,7 +16,11 @@
|
|||||||
html.body(context {
|
html.body(context {
|
||||||
let prev = query(selector(heading.where(level: 1)).before(here())).at(-1, default: none)
|
let prev = query(selector(heading.where(level: 1)).before(here())).at(-1, default: none)
|
||||||
let next = query(selector(heading.where(level: 1)).after(here())).at(1, default: none)
|
let next = query(selector(heading.where(level: 1)).after(here())).at(1, default: none)
|
||||||
|
|
||||||
|
html.header({})
|
||||||
|
|
||||||
html.main(it)
|
html.main(it)
|
||||||
|
|
||||||
html.footer({
|
html.footer({
|
||||||
html.nav({
|
html.nav({
|
||||||
html.ul({
|
html.ul({
|
||||||
|
|||||||
Reference in New Issue
Block a user