Skip to content

Commit

Permalink
1.10.2
Browse files Browse the repository at this point in the history
  • Loading branch information
KilledByAPixel committed Nov 19, 2024
1 parent 02af89a commit 1f6e5a6
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 15 deletions.
9 changes: 5 additions & 4 deletions dist/littlejs.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function debugRender()
const pos = worldToScreen(p.pos);
overlayContext.translate(pos.x|0, pos.y|0);
overlayContext.rotate(p.angle);
overlayContext.scale(1, 1);
overlayContext.scale(1, p.text ? 1 : -1);
overlayContext.fillStyle = overlayContext.strokeStyle = p.color;

if (p.text != undefined)
Expand All @@ -358,7 +358,7 @@ function debugRender()
for (const point of p.points)
{
const p2 = point.scale(cameraScale).floor();
overlayContext.lineTo(p2.x, -p2.y);
overlayContext.lineTo(p2.x, p2.y);
}
overlayContext.closePath();
p.fill && overlayContext.fill();
Expand Down Expand Up @@ -2529,6 +2529,7 @@ function drawTile(pos, size=vec2(1), tileInfo, color=new Color,
{
// normal canvas 2D rendering method (slower)
showWatermark && ++drawCount;
size = vec2(size.x, -size.y); // fix upside down sprites
drawCanvas2D(pos, size, angle, mirror, (context)=>
{
if (textureInfo)
Expand Down Expand Up @@ -2670,7 +2671,7 @@ function drawCanvas2D(pos, size, angle, mirror, drawFunction, screenSpace, conte
context.save();
context.translate(pos.x+.5, pos.y+.5);
context.rotate(angle);
context.scale(mirror ? -size.x : size.x, size.y);
context.scale(mirror ? -size.x : size.x, -size.y);
drawFunction(context);
context.restore();
}
Expand Down Expand Up @@ -5180,7 +5181,7 @@ const engineName = 'LittleJS';
* @type {String}
* @default
* @memberof Engine */
const engineVersion = '1.10.1';
const engineVersion = '1.10.2';

/** Frames per second to update
* @type {Number}
Expand Down
2 changes: 1 addition & 1 deletion dist/littlejs.esm.min.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions dist/littlejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ function debugRender()
const pos = worldToScreen(p.pos);
overlayContext.translate(pos.x|0, pos.y|0);
overlayContext.rotate(p.angle);
overlayContext.scale(1, 1);
overlayContext.scale(1, p.text ? 1 : -1);
overlayContext.fillStyle = overlayContext.strokeStyle = p.color;

if (p.text != undefined)
Expand All @@ -358,7 +358,7 @@ function debugRender()
for (const point of p.points)
{
const p2 = point.scale(cameraScale).floor();
overlayContext.lineTo(p2.x, -p2.y);
overlayContext.lineTo(p2.x, p2.y);
}
overlayContext.closePath();
p.fill && overlayContext.fill();
Expand Down Expand Up @@ -2529,6 +2529,7 @@ function drawTile(pos, size=vec2(1), tileInfo, color=new Color,
{
// normal canvas 2D rendering method (slower)
showWatermark && ++drawCount;
size = vec2(size.x, -size.y); // fix upside down sprites
drawCanvas2D(pos, size, angle, mirror, (context)=>
{
if (textureInfo)
Expand Down Expand Up @@ -2670,7 +2671,7 @@ function drawCanvas2D(pos, size, angle, mirror, drawFunction, screenSpace, conte
context.save();
context.translate(pos.x+.5, pos.y+.5);
context.rotate(angle);
context.scale(mirror ? -size.x : size.x, size.y);
context.scale(mirror ? -size.x : size.x, -size.y);
drawFunction(context);
context.restore();
}
Expand Down Expand Up @@ -5180,7 +5181,7 @@ const engineName = 'LittleJS';
* @type {String}
* @default
* @memberof Engine */
const engineVersion = '1.10.1';
const engineVersion = '1.10.2';

/** Frames per second to update
* @type {Number}
Expand Down
2 changes: 1 addition & 1 deletion dist/littlejs.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/littlejs.release.js
Original file line number Diff line number Diff line change
Expand Up @@ -2097,6 +2097,7 @@ function drawTile(pos, size=vec2(1), tileInfo, color=new Color,
{
// normal canvas 2D rendering method (slower)
showWatermark && ++drawCount;
size = vec2(size.x, -size.y); // fix upside down sprites
drawCanvas2D(pos, size, angle, mirror, (context)=>
{
if (textureInfo)
Expand Down Expand Up @@ -2238,7 +2239,7 @@ function drawCanvas2D(pos, size, angle, mirror, drawFunction, screenSpace, conte
context.save();
context.translate(pos.x+.5, pos.y+.5);
context.rotate(angle);
context.scale(mirror ? -size.x : size.x, size.y);
context.scale(mirror ? -size.x : size.x, -size.y);
drawFunction(context);
context.restore();
}
Expand Down Expand Up @@ -4748,7 +4749,7 @@ const engineName = 'LittleJS';
* @type {String}
* @default
* @memberof Engine */
const engineVersion = '1.10.1';
const engineVersion = '1.10.2';

/** Frames per second to update
* @type {Number}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "littlejsengine",
"version": "1.10.1",
"version": "1.10.2",
"description": "LittleJS - Tiny and Fast HTML5 Game Engine",
"main": "dist/littlejs.esm.js",
"types": "dist/littlejs.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const engineName = 'LittleJS';
* @type {String}
* @default
* @memberof Engine */
const engineVersion = '1.10.1';
const engineVersion = '1.10.2';

/** Frames per second to update
* @type {Number}
Expand Down

0 comments on commit 1f6e5a6

Please sign in to comment.