Skip to content

Commit 10f3b47

Browse files
committed
update engine
1 parent c753cec commit 10f3b47

File tree

16 files changed

+198
-192
lines changed

16 files changed

+198
-192
lines changed

public/about.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1111
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap" rel="stylesheet">
1212
<link rel="stylesheet" href="prism/prism.css" />
13-
<link rel="icon" href="icons/favicon.ico" />
13+
<link rel="icon" type="image/png" href="icons/icon-64.png" />
1414
<script defer src="https://umami.luizbills.com/script.js" data-website-id="3143e924-b3a6-42ce-b374-3f527dc894e2"></script>
1515
<style>
1616
html {
@@ -319,7 +319,7 @@ <h2><a id="colors">Default Colors</a></h2>
319319
Every time a function asks for a color, choose must choose one of these numbers.
320320
</p>
321321

322-
<img src="images/colors.png" alt="Default Color Palette" />
322+
<img src="images/colors.png" alt="Default Color Palette" style="border: 2px solid white;"/>
323323

324324
<p>Download: <a href="/misc/litecanvas-palette.gpl">palette.gpl</a> or <a href="/misc/litecanvas-palette.json" download>palette.json</a></p>
325325

@@ -429,6 +429,10 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
429429
// draw a outline ellipse
430430
oval(x, y, rx, ry, color = 0): void
431431

432+
// make a shape in the canvas context. To draw the shape you must call `fill()` or `stroke()` right after.
433+
// example: shape([4,0,8,8,0,8]); fill(3); // draw a triangle
434+
shape(points: number[]): void
435+
432436
// draw a line from one point (x1, y1) to another (x2, y2)
433437
line(x1, y1, x2, y2, color = 0): void
434438

@@ -469,9 +473,9 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
469473
// draw a image
470474
image(x, y, image: Image|ImageBitmap): void
471475

472-
// draw a sprite pixel by pixel from a string (the 5th argument)
476+
// draw a sprite pixel by pixel from a string (the 3rd argument)
473477
// see: https://github.com/litecanvas/game-engine/blob/main/samples/pixelart/pixelart.js#L50
474-
spr(x, y, width, heigth, pixels): void
478+
spr(x, y, pixels): void
475479

476480
// create an OffscreenCanvas and draw on it to make an image
477481
// see: https://github.com/litecanvas/game-engine/blob/main/samples/paint/paint.js
@@ -687,7 +691,7 @@ <h2><a id="engine-api">Engine API</a></h2>
687691
// Update or reset the palette color
688692
// example: pal(['#000', '#FFF']) is a 1-bit color palette
689693
// example: pal() resets the default color palette
690-
pal(colors: string[]): void
694+
pal(colors: string[], textColor: number = 3): void
691695

692696
// Replace the color "a" with the color "b"
693697
// example: pal(0, 3) // now the color black (#0) is white (#3)

public/icons/favicon.ico

-2.62 KB
Binary file not shown.

public/icons/icon-128.png

-686 Bytes
Loading

public/icons/icon-256.png

-2.74 KB
Loading

public/icons/icon-512.png

-8.29 KB
Loading

public/icons/icon-64.png

454 Bytes
Loading

public/images/colors.png

-4.4 KB
Loading

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/>
99
<title>Litecanvas Playground</title>
1010
<link rel="manifest" href="manifest.json" />
11-
<link rel="icon" href="icons/favicon.ico" />
11+
<link rel="icon" type="image/png" href="icons/icon-64.png" />
1212
<meta
1313
name="description"
1414
content="Litecanvas is a lightweight HTML5 canvas engine suitable for small web games, prototypes, game jams, animations, creative programming, learning game programming and game design, etc."

public/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)