Skip to content

Commit ef83442

Browse files
committed
Run Prettier
1 parent 7bdd9df commit ef83442

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+548
-558
lines changed

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
22
"singleQuote": true
33
}
4-

examples/balls/Ball.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ export class Ball {
6060
x: this.x,
6161
y: this.y,
6262
radius: this.radius,
63-
color: [0, 1, 0]
63+
color: [0, 1, 0],
6464
});
6565
}

examples/balls/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ const NUMBER_OF_BALLS = 4;
2020
new Ball({
2121
x: Math.random(),
2222
y: Math.random(),
23-
radius: Math.random() / 5 + 0.05
23+
radius: Math.random() / 5 + 0.05,
2424
})
2525
);
2626
}
2727

2828
const scene = new Scene({
29-
resolution: 70
29+
resolution: 70,
3030
});
3131

3232
let lastTime = Date.now();
@@ -36,13 +36,13 @@ const NUMBER_OF_BALLS = 4;
3636
y: 0,
3737
width: 1,
3838
height: 1,
39-
color: [0, 1, 0]
39+
color: [0, 1, 0],
4040
});
4141
scene.add(bounds);
4242

4343
const curTime = Date.now();
4444
const timeStep = (curTime - lastTime) / 1000;
45-
balls.forEach(ball => {
45+
balls.forEach((ball) => {
4646
ball.update(timeStep);
4747
scene.add(ball.draw());
4848
});

examples/font/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function renderText(text: string) {
1414
x: 0.1,
1515
y: 0.4,
1616
color: [1, 0, 0],
17-
charWidth: 0.08
17+
charWidth: 0.08,
1818
});
1919
}
2020

@@ -23,17 +23,17 @@ const textAnimation = new Timeline({
2323
items: [
2424
{
2525
duration: 2000,
26-
render: renderText('Play')
26+
render: renderText('Play'),
2727
},
2828
{
2929
duration: 2000,
30-
render: renderText('This')
30+
render: renderText('This'),
3131
},
3232
{
3333
duration: 2000,
34-
render: renderText('Game')
35-
}
36-
]
34+
render: renderText('Game'),
35+
},
36+
],
3737
});
3838

3939
(async () => {

examples/ilda-animation/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const boeing = loadIldaFile(path.resolve(__dirname, './boeing.ild'));
2121
file: boeing,
2222
frame,
2323
x: 0,
24-
y: 0
24+
y: 0,
2525
});
2626

2727
scene.add(ilda);

examples/pong/Ball.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ export class Ball {
8080
y: this.y - RADIUS,
8181
width: RADIUS * 2,
8282
height: RADIUS * 2,
83-
color: [0, 1, 0]
83+
color: [0, 1, 0],
8484
});
8585
}

examples/pong/Player.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ export class Player {
7474
return new Line({
7575
from: {
7676
x: this.x,
77-
y: this.y
77+
y: this.y,
7878
},
7979
to: {
8080
x: this.x + PADDLE_WIDTH,
81-
y: this.y
81+
y: this.y,
8282
},
8383
color: [0, 1, 0],
8484
blankBefore: true,
85-
blankAfter: true
85+
blankAfter: true,
8686
});
8787
}
8888
}

examples/pong/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ app.use(express.static(path.join(__dirname, '/public')));
1414
const wss = new WebSocketServer({ server });
1515

1616
server.on('request', app);
17-
server.listen(PORT, function() {
17+
server.listen(PORT, function () {
1818
console.log(`Started Pong Interactive demo on http://localhost:${PORT}`);
1919
});
2020

examples/pong/public/index.html

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<title>Square Interactive Demo</title>
5-
<style>
6-
html {
7-
height: 100%;
8-
}
9-
body {
10-
background: #000;
11-
margin: 50px;;
12-
height: 100%;
13-
display: flex;
14-
align-items: center;
15-
justify-content: space-between;
16-
}
17-
button {
18-
background: #fff;
19-
border: 0;
20-
font-size: 80px;
21-
}
22-
</style>
23-
</head>
24-
<body>
25-
<button id="left"></button>
26-
<button id="right"></button>
27-
<script src="./index.js" type="module"></script>
28-
</body>
3+
<head>
4+
<title>Square Interactive Demo</title>
5+
<style>
6+
html {
7+
height: 100%;
8+
}
9+
body {
10+
background: #000;
11+
margin: 50px;
12+
height: 100%;
13+
display: flex;
14+
align-items: center;
15+
justify-content: space-between;
16+
}
17+
button {
18+
background: #fff;
19+
border: 0;
20+
font-size: 80px;
21+
}
22+
</style>
23+
</head>
24+
<body>
25+
<button id="left"></button>
26+
<button id="right"></button>
27+
<script src="./index.js" type="module"></script>
28+
</body>
2929
</html>

examples/pong/public/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ function sendMessage(msg) {
1010

1111
function moveToLeft() {
1212
sendMessage({
13-
type: 'LEFT'
13+
type: 'LEFT',
1414
});
1515
}
1616

1717
function moveToRight() {
1818
sendMessage({
19-
type: 'RIGHT'
19+
type: 'RIGHT',
2020
});
2121
}
2222

23-
ws.onopen = function() {
23+
ws.onopen = function () {
2424
console.log('Websocket connection opened.');
2525

2626
const $left = document.getElementById('left');

0 commit comments

Comments
 (0)