diff --git a/CHANGES.md b/CHANGES.md index 8d7e4ad50..6749799d9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ commands to construct paths - Fixed a bug with `brace` and `flip: true` (#1017) - Added a new `transform` function that multiplies a given transformation matrix with the current one (#1019) +- **BREAKING** Renamed `on-yz` to `on-zy` (#1020) # 0.4.2 - The `tree` element now has a `anchor:` argument to position the tree (#929) diff --git a/docs/api/draw-functions/projections/on-yz.mdx b/docs/api/draw-functions/projections/on-yz.mdx deleted file mode 100644 index 9e386f372..000000000 --- a/docs/api/draw-functions/projections/on-yz.mdx +++ /dev/null @@ -1,5 +0,0 @@ -import OnYZ from "@site/cetz/docs/_generated/draw/projection/on-yz.mdx"; - -# on-yz - - diff --git a/docs/api/draw-functions/projections/on-zy.mdx b/docs/api/draw-functions/projections/on-zy.mdx new file mode 100644 index 000000000..fda5981c0 --- /dev/null +++ b/docs/api/draw-functions/projections/on-zy.mdx @@ -0,0 +1,5 @@ +import OnZY from "@site/cetz/docs/_generated/draw/projection/on-zy.mdx"; + +# on-zy + + diff --git a/docs/api/sidebar.js b/docs/api/sidebar.js index 535230e47..e91638917 100644 --- a/docs/api/sidebar.js +++ b/docs/api/sidebar.js @@ -97,7 +97,7 @@ export default [ "api/draw-functions/projections/ortho", "api/draw-functions/projections/on-xy", "api/draw-functions/projections/on-xz", - "api/draw-functions/projections/on-yz", + "api/draw-functions/projections/on-zy", ], }, { diff --git a/manual.pdf b/manual.pdf index 80e7a9fb8..35e58b80d 100644 Binary files a/manual.pdf and b/manual.pdf differ diff --git a/src/draw.typ b/src/draw.typ index a5c6888f8..30c3ffb14 100644 --- a/src/draw.typ +++ b/src/draw.typ @@ -2,5 +2,5 @@ #import "draw/transformations.typ": set-transform, transform, rotate, translate, scale, set-origin, move-to, set-viewport #import "draw/styling.typ": set-style, fill, stroke, register-mark #import "draw/shapes.typ": circle, circle-through, arc, arc-through, mark, line, grid, content, rect, bezier, bezier-through, catmull, hobby, merge-path, polygon, compound-path, n-star, rect-around, svg-path -#import "draw/projection.typ": ortho, on-xy, on-xz, on-yz +#import "draw/projection.typ": ortho, on-xy, on-xz, on-zy #import "draw/util.typ": assert-version, register-coordinate-resolver diff --git a/src/draw/projection.typ b/src/draw/projection.typ index 2f7017fb4..a32d63761 100644 --- a/src/draw/projection.typ +++ b/src/draw/projection.typ @@ -185,13 +185,15 @@ }, matrix.transform-rotate-x(90deg)) }) -/// Draw elements on the yz-plane with optional x offset. +/// Draw elements on the zy-plane with optional x offset. /// -/// All vertices of all elements will be changed in the following way: $mat(x_"argument", y, x)$, where $x_"argument"$ is the x-value given as argument. +/// All vertices of all elements will be changed in the following way: +/// $mat(x_"argument", y, x)$, where $x_"argument"$ is the x-value given +/// as argument. /// /// ```example /// ortho({ -/// on-yz({ +/// on-zy({ /// rect((-1, -1), (1, 1)) /// }) /// }) @@ -199,7 +201,7 @@ /// /// - x (number): X offset for all coordinates /// - body (element): Elements to draw -#let on-yz(x: 0, body) = get-ctx(ctx => { +#let on-zy(x: 0, body) = get-ctx(ctx => { let x = util.resolve-number(ctx, x) scoped-transform(body, if x != 0 { matrix.transform-translate(x, 0, 0) diff --git a/tests/projection-ortho/test.typ b/tests/projection-ortho/test.typ index 3e52bb5cb..8fb896348 100644 --- a/tests/projection-ortho/test.typ +++ b/tests/projection-ortho/test.typ @@ -68,7 +68,7 @@ import draw: * ortho({ axes(4) - on-yz({ + on-zy({ checkerboard() }) }) @@ -78,7 +78,7 @@ import draw: * ortho(sorted: true, { axes(4) - on-yz(x: -1, { + on-zy(x: -1, { checkerboard() }) on-xy(z: -1, { @@ -153,7 +153,7 @@ import draw: * ortho({ on-xz({ circle((0, 2, 2), name: "a") }) - on-yz({ circle((2, 0, 0), name: "b") }) + on-zy({ circle((2, 0, 0), name: "b") }) }) line("a", "b")