@@ -359,10 +359,6 @@ <h2><a id="settings">Game Configuration</a></h2>
359359// can pass a number to determine a maximum scale.
360360settings.autoscale = true
361361
362- // If `true`, the pixel art images won't look blurry.
363- // Also, disables canvas built-in antialias.
364- settings.pixelart = true
365-
366362// exposes all methods and properties (see below)
367363// in the global scope
368364settings.global = true
@@ -466,12 +462,13 @@ <h2><a id="drawing">Functions for Drawing</a></h2>
466462 */
467463
468464// draw a image
469- image(x, y, image: Image|HTMLCanvasElement): void
465+ image(x, y, image: Image|ImageBitmap): void
466+
467+ // draw a sprite pixel by pixel from a string (the 5th argument)
468+ // see: https://github.com/litecanvas/game-engine/blob/main/samples/pixelart/pixelart.js#L50
469+ spr(x, y, width, heigth, pixels): void
470470
471471// create an OffscreenCanvas and draw on it to make an image
472- // data can be a array of strings (to draw pixel art)
473- // see: https://github.com/litecanvas/game-engine/blob/main/samples/pixelart/pixelart.js
474- // or data can be a function with drawing operations
475472// see: https://github.com/litecanvas/game-engine/blob/main/samples/paint/paint.js
476473// the options are:
477474// * scale?: default is 1.
@@ -687,6 +684,10 @@ <h2><a id="engine-api">Engine API</a></h2>
687684// example: pal() resets the default color palette
688685pal(colors: string[]): void
689686
687+ // Swaps two colors of the current palette
688+ // example: pal(0, 3) // now the color #0 is white and the color #3 is black
689+ palc(a: number, b: number): void
690+
690691// Loads a plugin.
691692// see: https://github.com/litecanvas/game-engine/blob/main/samples/plugin-basics/plugin-basics.js
692693use(callback): void
@@ -859,9 +860,9 @@ <h2><a id="tools">Useful tools</a></h2>
859860 </ ul >
860861 </ main >
861862
862- < footer >
863+ <!-- < footer>
863864 <a class="visitors-counter" href="https://hits.seeyoufarm.com"><img src="https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Flitecanvas.js.org%2Fabout.html&count_bg=%2363C64D&title_bg=%236A7799&icon=&icon_color=%23E7E7E7&title=Visitors&edge_flat=false"/></a>
864- </ footer >
865+ </footer> -->
865866
866867 < script src ="prism/prism.js "> </ script >
867868 < script src ="prism/prism-typescript.js "> </ script >
0 commit comments