Skip to content

Commit

Permalink
update engine
Browse files Browse the repository at this point in the history
  • Loading branch information
luizbills committed Oct 12, 2024
1 parent 545ac28 commit 30bc231
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 23 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 8 additions & 16 deletions public/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,16 +422,10 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
// see: https://developer.mozilla.org/en-US/docs/Web/API/Path2D/Path2D
path(arg?: Path2D | string): Path2D

// create a "circular" clipping region
// create a clipping region
// see: https://github.com/litecanvas/game-engine/blob/main/samples/clip/clip.js
clipcirc(x, y, width, height): void

// same as above, but create a "rectangular" clipping region
cliprect(x, y, width, height): void

// note: before call `cliprect()` or `clipcirc()` you must
// save the context using `push()` and later,
// you must restore the context using `pop()`</code></pre>
// note: before call `clip()` you must save the context using `push()` and `pop()`
clipcirc(path: Path2D)</code></pre>

<h2><a id="sound">Functions for Sound</a></h2>

Expand All @@ -448,12 +442,10 @@ <h2><a id="sound">Functions for Sound</a></h2>

<h2><a id="keyboard">Functions for Keyboard</a></h2>

<pre><code class="language-typescript">
// Checks if which key is currently pressed in your keyboard.
// note: you can check if any key is pressed using `iskeydown("any")`.
// note: to check the space key use `iskeydown(" ")`.
iskeydown(key: string): boolean
</code></pre>
<pre><code class="language-typescript">// Checks if which key is currently pressed in your keyboard.
// note: you can check if any key is pressed using `iskeydown("any")`.
// note: to check the space key use `iskeydown(" ")`.
iskeydown(key: string): boolean</code></pre>

<h2><a id="math">Math</a></h2>

Expand Down Expand Up @@ -635,7 +627,7 @@ <h2><a id="plugin-api">Plugin API</a></h2>
setvar(name: string, value: any): void

// Gets the color value.
// example: getcolor(0) returns "#000"
// example: getcolor(0) returns "#111"
getcolor(index: number): string

// Resizes the game canvas.
Expand Down
Binary file modified public/images/colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/litecanvas.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/sw.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const cacheName = "luizbills.litecanvas-editor-v1";
const version = "2.16.4";
const version = "2.17.0";

const precacheResources = [
"/",
Expand Down
4 changes: 2 additions & 2 deletions public/tools/pixel-art-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@

@media (prefers-color-scheme: dark) {
body {
background: #111;
background: #000;
color: #fff;
}

Expand Down Expand Up @@ -236,7 +236,7 @@ <h1>litepixel</h1>
const $ = (selector) => document.querySelector(selector);
// color palette
const colors = [
"#000",
"#111",
"#6a7799",
"#aec2c2",
"#FFF1E8",
Expand Down

0 comments on commit 30bc231

Please sign in to comment.