Skip to content

Commit 77ccd63

Browse files
committed
projection: Rename on-yz to on-zy
Fixes #1020
1 parent 0d3b512 commit 77ccd63

File tree

8 files changed

+17
-14
lines changed

8 files changed

+17
-14
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
commands to construct paths
1919
- Fixed a bug with `brace` and `flip: true` (#1017)
2020
- Added a new `transform` function that multiplies a given transformation matrix with the current one (#1019)
21+
- **BREAKING** Renamed `on-yz` to `on-zy` (#1020)
2122

2223
# 0.4.2
2324
- The `tree` element now has a `anchor:` argument to position the tree (#929)

docs/api/draw-functions/projections/on-yz.mdx

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import OnZY from "@site/cetz/docs/_generated/draw/projection/on-zy.mdx";
2+
3+
# on-zy
4+
5+
<OnZY />

docs/api/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default [
9797
"api/draw-functions/projections/ortho",
9898
"api/draw-functions/projections/on-xy",
9999
"api/draw-functions/projections/on-xz",
100-
"api/draw-functions/projections/on-yz",
100+
"api/draw-functions/projections/on-zy",
101101
],
102102
},
103103
{

manual.pdf

0 Bytes
Binary file not shown.

src/draw.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
#import "draw/transformations.typ": set-transform, transform, rotate, translate, scale, set-origin, move-to, set-viewport
33
#import "draw/styling.typ": set-style, fill, stroke, register-mark
44
#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
5-
#import "draw/projection.typ": ortho, on-xy, on-xz, on-yz
5+
#import "draw/projection.typ": ortho, on-xy, on-xz, on-zy
66
#import "draw/util.typ": assert-version, register-coordinate-resolver

src/draw/projection.typ

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,21 +185,23 @@
185185
}, matrix.transform-rotate-x(90deg))
186186
})
187187

188-
/// Draw elements on the yz-plane with optional x offset.
188+
/// Draw elements on the zy-plane with optional x offset.
189189
///
190-
/// 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.
190+
/// All vertices of all elements will be changed in the following way:
191+
/// $mat(x_"argument", y, x)$, where $x_"argument"$ is the x-value given
192+
/// as argument.
191193
///
192194
/// ```example
193195
/// ortho({
194-
/// on-yz({
196+
/// on-zy({
195197
/// rect((-1, -1), (1, 1))
196198
/// })
197199
/// })
198200
/// ```
199201
///
200202
/// - x (number): X offset for all coordinates
201203
/// - body (element): Elements to draw
202-
#let on-yz(x: 0, body) = get-ctx(ctx => {
204+
#let on-zy(x: 0, body) = get-ctx(ctx => {
203205
let x = util.resolve-number(ctx, x)
204206
scoped-transform(body, if x != 0 {
205207
matrix.transform-translate(x, 0, 0)

tests/projection-ortho/test.typ

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
import draw: *
6969
ortho({
7070
axes(4)
71-
on-yz({
71+
on-zy({
7272
checkerboard()
7373
})
7474
})
@@ -78,7 +78,7 @@
7878
import draw: *
7979
ortho(sorted: true, {
8080
axes(4)
81-
on-yz(x: -1, {
81+
on-zy(x: -1, {
8282
checkerboard()
8383
})
8484
on-xy(z: -1, {
@@ -153,7 +153,7 @@
153153
import draw: *
154154
ortho({
155155
on-xz({ circle((0, 2, 2), name: "a") })
156-
on-yz({ circle((2, 0, 0), name: "b") })
156+
on-zy({ circle((2, 0, 0), name: "b") })
157157
})
158158

159159
line("a", "b")

0 commit comments

Comments
 (0)