Skip to content

Commit ad248ed

Browse files
fix: ensure newline at end of file in multiple scripts
1 parent 75f15a9 commit ad248ed

6 files changed

Lines changed: 14 additions & 14 deletions

File tree

examples/shorts/objectRaycast.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ function gameRenderPost()
2626
// draw the ray
2727
drawLine(start, end, .1, hits.length ? RED : CYAN);
2828
drawText(hits.length + ' object(s) hit', vec2(0, 8));
29-
}
29+
}

examples/shorts/particles.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function gameInit()
44

55
// fire
66
new ParticleEmitter(
7-
vec2(-5,-2), 0, // pos, angle
7+
vec2(-5,0), 0, // pos, angle
88
2, 0, 200, PI, // emitSize, emitTime, rate, cone
99
tile(0), // tileInfo
1010
rgb(1,.5,.1), rgb(1,.1,.1), // colorStartA, colorStartB
@@ -16,7 +16,7 @@ function gameInit()
1616

1717
// smoke
1818
new ParticleEmitter(
19-
vec2(5,-2), 0, // pos, angle
19+
vec2(5,0), 0, // pos, angle
2020
3, 0, 100, PI, // emitSize, emitTime, rate, cone
2121
tile(0), // tileInfo
2222
hsl(0,0,0,.5), hsl(0,0,1,.5),// colorStartA, colorStartB
@@ -31,16 +31,16 @@ function gameInit()
3131
vec2(), 0, // pos, angle
3232
0, 0, 100, PI, // emitSize, emitTime, rate, cone
3333
tile(0), // tileInfo
34-
rgb(1,1,.5), rgb(1,.5,.5), // colorStartA, colorStartB
35-
rgb(1,0,0,0), rgb(.5,0,1,0), // colorEndA, colorEndB
36-
.8, .5, .1, .01, 0, // time, sizeStart, sizeEnd, speed, angleSpeed
37-
.95, 1, .02, PI, .1,// damp, angleDamp, gravity, particleCone, fade
38-
.3, 0, 1, 0 // randomness, collide, additive, colorLinear
34+
rgb(1,1,.3,.2), rgb(1,.5,.1,.2),// colorStartA, colorStartB
35+
rgb(1,0,0,0), rgb(.5,0,1,0), // colorEndA, colorEndB
36+
1, 1, 3, .01, 0, // time, sizeStart, sizeEnd, speed, angleSpeed
37+
.95, 1, .02, PI, .2,// damp, angleDamp, gravity, particleCone, fade
38+
.3, 0, 1, 0 // randomness, collide, additive, colorLinear
3939
);
4040
}
4141

4242
function gameUpdate()
4343
{
4444
// move comet emitter back and forth so it trails particles
45-
cometEmitter.pos = vec2(sin(time)*9, 5);
46-
}
45+
cometEmitter.pos = vec2(sin(time)*9, cos(time)-5);
46+
}

examples/shorts/save.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ function gameRender()
3030
drawText('Clicks: ' + saveData.clicks, vec2(0, 3), 3);
3131
drawRect(vec2(0, -1), vec2(5), hsl(saveData.hue,.5,.5));
3232
drawText('Reload the page - data persists!', vec2(0, -5), 1);
33-
}
33+
}

examples/shorts/speak.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ function gameInit()
3333

3434
// stop all speech
3535
makeButton(vec2(1,0), 'Stop', speakStop);
36-
}
36+
}

examples/shorts/uiLayout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ function gameInit()
2525
grid.addChild(button);
2626
}
2727
menu.addChild(grid);
28-
}
28+
}

examples/shorts/vibrate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ function gameInit()
3737
vibrateStop();
3838
gamepadVibrateStop(0);
3939
});
40-
}
40+
}

0 commit comments

Comments
 (0)