Skip to content

Commit 2d4dec0

Browse files
committed
Add lovr.graphics.rotate example;
1 parent 28fe892 commit 2d4dec0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/lovr.graphics.rotate.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,16 @@ Note that order matters when scaling, translating, and rotating the coordinate s
2424
### Returns
2525

2626
Nothing
27+
28+
Example
29+
---
30+
31+
Draw a spinning cube manually using `lovr.graphics.rotate`:
32+
33+
```
34+
lovr.graphics.translate(0, 0, -1)
35+
lovr.graphics.rotate(lovr.timer.getTime())
36+
lovr.graphics.translate(0, 0, 1)
37+
38+
lovr.graphics.cube('line', 0, 0, -1, .5)
39+
```

0 commit comments

Comments
 (0)