Skip to content

Commit

Permalink
1.4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
KilledByAPixel committed Jun 27, 2023
1 parent c28f906 commit ae96585
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 43 deletions.
8 changes: 4 additions & 4 deletions engine/engine.all.js
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ class EngineObject
const isBlockedX = abs(oldPos.y - o.pos.y)*2 < sizeBoth.y;
const isBlockedY = abs(oldPos.x - o.pos.x)*2 < sizeBoth.x;

if (smallStepUp || isBlockedY || !isBlockedX) // resolve y collision
if (smallStepUp | isBlockedY | !isBlockedX) // resolve y collision
{
// push outside object collision
this.pos.y = o.pos.y + (sizeBoth.y/2 + epsilon) * sign(oldPos.y - o.pos.y);
Expand Down Expand Up @@ -1386,7 +1386,7 @@ class EngineObject
o.velocity.y = lerp(elasticity, inelastic, elastic1);
}
}
if (!smallStepUp && (isBlockedX || !isBlockedY)) // resolve x collision
if (!smallStepUp & isBlockedX) // resolve x collision
{
// push outside collision
this.pos.x = o.pos.x + (sizeBoth.x/2 + epsilon) * sign(oldPos.x - o.pos.x);
Expand Down Expand Up @@ -1424,7 +1424,7 @@ class EngineObject
// test which side we bounced off (or both if a corner)
const isBlockedY = tileCollisionTest(new Vector2(oldPos.x, this.pos.y), this.size, this);
const isBlockedX = tileCollisionTest(new Vector2(this.pos.x, oldPos.y), this.size, this);
if (isBlockedY || !isBlockedX)
if (isBlockedY | !isBlockedX)
{
// set if landed on ground
this.groundObject = wasMovingDown;
Expand Down Expand Up @@ -4190,7 +4190,7 @@ gl_VERTEX_BUFFER_SIZE = gl_MAX_BATCH * gl_VERTICES_PER_QUAD * gl_VERTEX_BYTE_STR
const engineName = 'LittleJS';

/** Version of engine */
const engineVersion = '1.4.8';
const engineVersion = '1.4.9';

/** Frames per second to update objects
* @default */
Expand Down
2 changes: 1 addition & 1 deletion engine/engine.all.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions engine/engine.all.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ class EngineObject
const isBlockedX = abs(oldPos.y - o.pos.y)*2 < sizeBoth.y;
const isBlockedY = abs(oldPos.x - o.pos.x)*2 < sizeBoth.x;

if (smallStepUp || isBlockedY || !isBlockedX) // resolve y collision
if (smallStepUp | isBlockedY | !isBlockedX) // resolve y collision
{
// push outside object collision
this.pos.y = o.pos.y + (sizeBoth.y/2 + epsilon) * sign(oldPos.y - o.pos.y);
Expand Down Expand Up @@ -1386,7 +1386,7 @@ class EngineObject
o.velocity.y = lerp(elasticity, inelastic, elastic1);
}
}
if (!smallStepUp && (isBlockedX || !isBlockedY)) // resolve x collision
if (!smallStepUp & isBlockedX) // resolve x collision
{
// push outside collision
this.pos.x = o.pos.x + (sizeBoth.x/2 + epsilon) * sign(oldPos.x - o.pos.x);
Expand Down Expand Up @@ -1424,7 +1424,7 @@ class EngineObject
// test which side we bounced off (or both if a corner)
const isBlockedY = tileCollisionTest(new Vector2(oldPos.x, this.pos.y), this.size, this);
const isBlockedX = tileCollisionTest(new Vector2(this.pos.x, oldPos.y), this.size, this);
if (isBlockedY || !isBlockedX)
if (isBlockedY | !isBlockedX)
{
// set if landed on ground
this.groundObject = wasMovingDown;
Expand Down Expand Up @@ -4190,7 +4190,7 @@ gl_VERTEX_BUFFER_SIZE = gl_MAX_BATCH * gl_VERTICES_PER_QUAD * gl_VERTEX_BYTE_STR
const engineName = 'LittleJS';

/** Version of engine */
const engineVersion = '1.4.8';
const engineVersion = '1.4.9';

/** Frames per second to update objects
* @default */
Expand Down
2 changes: 1 addition & 1 deletion engine/engine.all.module.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions engine/engine.all.release.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ let medalsPreventUnlock;
const engineName = 'LittleJS';

/** Version of engine */
const engineVersion = '1.4.8';
const engineVersion = '1.4.9';

/** Frames per second to update objects
* @default */
Expand Down Expand Up @@ -1290,7 +1290,7 @@ class EngineObject
const isBlockedX = abs(oldPos.y - o.pos.y)*2 < sizeBoth.y;
const isBlockedY = abs(oldPos.x - o.pos.x)*2 < sizeBoth.x;

if (smallStepUp || isBlockedY || !isBlockedX) // resolve y collision
if (smallStepUp | isBlockedY | !isBlockedX) // resolve y collision
{
// push outside object collision
this.pos.y = o.pos.y + (sizeBoth.y/2 + epsilon) * sign(oldPos.y - o.pos.y);
Expand Down Expand Up @@ -1320,7 +1320,7 @@ class EngineObject
o.velocity.y = lerp(elasticity, inelastic, elastic1);
}
}
if (!smallStepUp && (isBlockedX || !isBlockedY)) // resolve x collision
if (!smallStepUp & isBlockedX) // resolve x collision
{
// push outside collision
this.pos.x = o.pos.x + (sizeBoth.x/2 + epsilon) * sign(oldPos.x - o.pos.x);
Expand Down Expand Up @@ -1358,7 +1358,7 @@ class EngineObject
// test which side we bounced off (or both if a corner)
const isBlockedY = tileCollisionTest(new Vector2(oldPos.x, this.pos.y), this.size, this);
const isBlockedX = tileCollisionTest(new Vector2(this.pos.x, oldPos.y), this.size, this);
if (isBlockedY || !isBlockedX)
if (isBlockedY | !isBlockedX)
{
// set if landed on ground
this.groundObject = wasMovingDown;
Expand Down
2 changes: 1 addition & 1 deletion engine/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
const engineName = 'LittleJS';

/** Version of engine */
const engineVersion = '1.4.8';
const engineVersion = '1.4.9';

/** Frames per second to update objects
* @default */
Expand Down
2 changes: 1 addition & 1 deletion engine/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ declare const gl_VERTEX_BUFFER_SIZE: number;
/** Name of engine */
declare const engineName: "LittleJS";
/** Version of engine */
declare const engineVersion: "1.4.8";
declare const engineVersion: "1.4.9";
/** Frames per second to update objects
* @default */
declare const frameRate: 60;
Expand Down
2 changes: 1 addition & 1 deletion examples/breakout/gameObjects.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Brick extends EngineObject
0, vec2(16), // tileIndex, tileSize
color1, color2, // colorStartA, colorStartB
color1.scale(1,0), color2.scale(1,0), // colorEndA, colorEndB
.2, 1, 2, .1, .05, // time, sizeStart, sizeEnd, speed, angleSpeed
.2, .5, 1, .05, .05,// time, sizeStart, sizeEnd, speed, angleSpeed
.99, .95, .4, PI, // damping, angleDamping, gravityScale, cone
.1, .5, 0, 1 // fadeRate, randomness, collide, additive
);
Expand Down
6 changes: 3 additions & 3 deletions examples/breakout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<link rel=icon type=image/png href=../../favicon.png>
</head><body>

<script src=../../engine/engine.all.js?122></script>
<script src=gameObjects.js?122></script>
<script src=game.js?122></script>
<script src=../../engine/engine.all.js?123></script>
<script src=gameObjects.js?123></script>
<script src=game.js?123></script>
2 changes: 1 addition & 1 deletion examples/module/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
</head><body>

<!-- Add your game scripts here -->
<script src=game.js?122 type=module></script>
<script src=game.js?123 type=module></script>
12 changes: 6 additions & 6 deletions examples/platformer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<link rel=icon type=image/png href=../../favicon.png>
</head><body>

<script src=../../engine/engine.all.js?122></script>
<script src=gameObjects.js?122></script>
<script src=gamePlayer.js?122></script>
<script src=gameEffects.js?122></script>
<script src=gameLevel.js?122></script>
<script src=game.js?122></script>
<script src=../../engine/engine.all.js?123></script>
<script src=gameObjects.js?123></script>
<script src=gamePlayer.js?123></script>
<script src=gameEffects.js?123></script>
<script src=gameLevel.js?123></script>
<script src=game.js?123></script>
4 changes: 2 additions & 2 deletions examples/puzzle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
<link rel=icon type=image/png href=../../favicon.png>
</head><body>

<script src=../../engine/engine.all.js?122></script>
<script src=game.js?122></script>
<script src=../../engine/engine.all.js?123></script>
<script src=game.js?123></script>
2 changes: 1 addition & 1 deletion examples/stress/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel=icon type=image/png href=../../favicon.png>
</head><body>

<script src=../../engine/engine.all.min.js?122></script>
<script src=../../engine/engine.all.min.js?123></script>
<script>

/*
Expand Down
26 changes: 13 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
</head><body>

<!-- LittleJS engine scripts -->
<script src=engine/engineDebug.js?122></script>
<script src=engine/engineUtilities.js?122></script>
<script src=engine/engineSettings.js?122></script>
<script src=engine/engineObject.js?122></script>
<script src=engine/engineDraw.js?122></script>
<script src=engine/engineInput.js?122></script>
<script src=engine/engineAudio.js?122></script>
<script src=engine/engineTileLayer.js?122></script>
<script src=engine/engineParticles.js?122></script>
<script src=engine/engineMedals.js?122></script>
<script src=engine/engineWebGL.js?122></script>
<script src=engine/engine.js?122></script>
<script src=engine/engineDebug.js?123></script>
<script src=engine/engineUtilities.js?123></script>
<script src=engine/engineSettings.js?123></script>
<script src=engine/engineObject.js?123></script>
<script src=engine/engineDraw.js?123></script>
<script src=engine/engineInput.js?123></script>
<script src=engine/engineAudio.js?123></script>
<script src=engine/engineTileLayer.js?123></script>
<script src=engine/engineParticles.js?123></script>
<script src=engine/engineMedals.js?123></script>
<script src=engine/engineWebGL.js?123></script>
<script src=engine/engine.js?123></script>

<!-- You can also include all engine scripts like this... -->
<!-- <script src=engine/engine.all.js></script> -->

<!-- Add your game scripts here -->
<script src=game.js?122></script>
<script src=game.js?123></script>

0 comments on commit ae96585

Please sign in to comment.