Skip to content

Commit 7d400db

Browse files
committed
improve llms.txt
1 parent f9113fe commit 7d400db

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

public/llms.txt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,35 @@ function draw() {
7171
}
7272
```
7373

74+
### Functions to draw shapes
75+
76+
You can use the following functions to draw shapes:
77+
78+
- `rect(x, y, width, height, color)` draw a rectangle outline
79+
- `rectfill(x, y, width, height, color)` draw a color-filled rectangle
80+
- `circ(x, y, radius, color)` draw a circle outline
81+
- `circfill(x, y, radius, color)` draw a color-filled circle
82+
- `oval(x, y, rx, ry, color)` draw a ellipse outline
83+
- `ovalfill(x, y, rx, ry, color)` draw a color-filled ellipse
84+
85+
```js
86+
litecanvas()
87+
88+
function draw() {
89+
cls(0)
90+
91+
// draw a color filled rectangle at x=0 and y=0
92+
// with width=32 and height=32
93+
// with white color
94+
rectfill(0, 0, 32, 32, 3)
95+
96+
// draw a rectangle outline at x=64 and y=32
97+
// with width=40 and height=30
98+
// with red color
99+
rect(64, 32, 40, 30, 4)
100+
}
101+
```
102+
74103
### Click and Touch
75104

76105
```js
@@ -144,6 +173,9 @@ rotate(radians)
144173
// Sets the alpha (opacity) value to apply when drawing new shapes and images
145174
// Use a value between 0 and 1
146175
alpha(value)
176+
177+
// Returns the canvas rendering context 2d
178+
ctx()
147179
```
148180

149181
### Variables declared by Litecanvas
@@ -159,5 +191,5 @@ Like `MX` and `MY`, Litecanvas also declares these other variables:
159191

160192
## Useful links
161193

162-
- [Cheatsheet](https://litecanvas.js.org)
194+
- [Cheatsheet](https://litecanvas.js.org/about.html)
163195
- [Github](https://github.com/litecanvas/game-engine)

public/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const cacheName = "luizbills.litecanvas-editor-v1";
2-
const version = "2025.8.4.1";
2+
const version = "2025.8.4.2";
33

44
const precacheResources = [
55
"/",

0 commit comments

Comments
 (0)