diff --git a/favicon.ico b/favicon.ico
new file mode 100644
index 0000000..52e6cda
Binary files /dev/null and b/favicon.ico differ
diff --git a/icons/android-icon-144x144.png b/icons/android-icon-144x144.png
index dbc3939..4a480bf 100644
Binary files a/icons/android-icon-144x144.png and b/icons/android-icon-144x144.png differ
diff --git a/icons/android-icon-192x192.png b/icons/android-icon-192x192.png
index 5077de6..ea1cb0e 100644
Binary files a/icons/android-icon-192x192.png and b/icons/android-icon-192x192.png differ
diff --git a/icons/android-icon-36x36.png b/icons/android-icon-36x36.png
new file mode 100644
index 0000000..9ba08dd
Binary files /dev/null and b/icons/android-icon-36x36.png differ
diff --git a/icons/android-icon-48x48.png b/icons/android-icon-48x48.png
new file mode 100644
index 0000000..b36441c
Binary files /dev/null and b/icons/android-icon-48x48.png differ
diff --git a/icons/android-icon-72x72.png b/icons/android-icon-72x72.png
new file mode 100644
index 0000000..cd1e9e0
Binary files /dev/null and b/icons/android-icon-72x72.png differ
diff --git a/icons/android-icon-96x96.png b/icons/android-icon-96x96.png
new file mode 100644
index 0000000..a4d8c1a
Binary files /dev/null and b/icons/android-icon-96x96.png differ
diff --git a/icons/apple-icon-114x114.png b/icons/apple-icon-114x114.png
index 5944546..10cbc85 100644
Binary files a/icons/apple-icon-114x114.png and b/icons/apple-icon-114x114.png differ
diff --git a/icons/apple-icon-120x120.png b/icons/apple-icon-120x120.png
index 32c9a72..724fc4e 100644
Binary files a/icons/apple-icon-120x120.png and b/icons/apple-icon-120x120.png differ
diff --git a/icons/apple-icon-144x144.png b/icons/apple-icon-144x144.png
index dbc3939..4a480bf 100644
Binary files a/icons/apple-icon-144x144.png and b/icons/apple-icon-144x144.png differ
diff --git a/icons/apple-icon-152x152.png b/icons/apple-icon-152x152.png
index 0ed410c..396eb95 100644
Binary files a/icons/apple-icon-152x152.png and b/icons/apple-icon-152x152.png differ
diff --git a/icons/apple-icon-180x180.png b/icons/apple-icon-180x180.png
index 6b17176..d1dead9 100644
Binary files a/icons/apple-icon-180x180.png and b/icons/apple-icon-180x180.png differ
diff --git a/icons/apple-icon-57x57.png b/icons/apple-icon-57x57.png
index cc897f4..bf9f720 100644
Binary files a/icons/apple-icon-57x57.png and b/icons/apple-icon-57x57.png differ
diff --git a/icons/apple-icon-60x60.png b/icons/apple-icon-60x60.png
index d00bda8..0c89467 100644
Binary files a/icons/apple-icon-60x60.png and b/icons/apple-icon-60x60.png differ
diff --git a/icons/apple-icon-72x72.png b/icons/apple-icon-72x72.png
index eed5470..cd1e9e0 100644
Binary files a/icons/apple-icon-72x72.png and b/icons/apple-icon-72x72.png differ
diff --git a/icons/apple-icon-76x76.png b/icons/apple-icon-76x76.png
index df9b751..9711ea9 100644
Binary files a/icons/apple-icon-76x76.png and b/icons/apple-icon-76x76.png differ
diff --git a/icons/apple-icon-precomposed.png b/icons/apple-icon-precomposed.png
new file mode 100644
index 0000000..8c574ee
Binary files /dev/null and b/icons/apple-icon-precomposed.png differ
diff --git a/icons/apple-icon.png b/icons/apple-icon.png
new file mode 100644
index 0000000..8c574ee
Binary files /dev/null and b/icons/apple-icon.png differ
diff --git a/icons/favicon-16x16.png b/icons/favicon-16x16.png
index e5b5749..b2ace7e 100644
Binary files a/icons/favicon-16x16.png and b/icons/favicon-16x16.png differ
diff --git a/icons/favicon-256x256.png b/icons/favicon-256x256.png
deleted file mode 100644
index 48427f6..0000000
Binary files a/icons/favicon-256x256.png and /dev/null differ
diff --git a/icons/favicon-32x32.png b/icons/favicon-32x32.png
index 85b2aa6..6c3622a 100644
Binary files a/icons/favicon-32x32.png and b/icons/favicon-32x32.png differ
diff --git a/icons/favicon-96x96.png b/icons/favicon-96x96.png
index 621aae3..a4d8c1a 100644
Binary files a/icons/favicon-96x96.png and b/icons/favicon-96x96.png differ
diff --git a/icons/favicon.ico b/icons/favicon.ico
deleted file mode 100644
index 1f42600..0000000
Binary files a/icons/favicon.ico and /dev/null differ
diff --git a/icons/ms-icon-144x144.png b/icons/ms-icon-144x144.png
index dbc3939..4a480bf 100644
Binary files a/icons/ms-icon-144x144.png and b/icons/ms-icon-144x144.png differ
diff --git a/icons/ms-icon-150x150.png b/icons/ms-icon-150x150.png
index b089b14..7d39a0a 100644
Binary files a/icons/ms-icon-150x150.png and b/icons/ms-icon-150x150.png differ
diff --git a/icons/ms-icon-310x310.png b/icons/ms-icon-310x310.png
index fcd0bae..1237397 100644
Binary files a/icons/ms-icon-310x310.png and b/icons/ms-icon-310x310.png differ
diff --git a/icons/ms-icon-70x70.png b/icons/ms-icon-70x70.png
index 0119fda..d96d70b 100644
Binary files a/icons/ms-icon-70x70.png and b/icons/ms-icon-70x70.png differ
diff --git a/index.html b/index.html
index 0774b5f..35cc881 100644
--- a/index.html
+++ b/index.html
@@ -1 +1 @@
-
tether!
\ No newline at end of file
+tether!
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
deleted file mode 100644
index a885ca4..0000000
--- a/manifest.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "name": "tether! | Swing Around a Ball of Destruction!",
- "short_name": "tether!",
- "lang": "en-US",
- "start_url": ".",
- "display": "standalone",
- "background_color": "#fff",
- "description": "A game about swinging a ball around and sheer destruction.",
- "categories": ["game", "mobile", "fun"],
- "icons":
- [
- {
- "src": "icons/android-icon-36x36.png",
- "sizes": "36x36",
- "type": "image/png",
- "density": "0.75"
- },
- {
- "src": "icons/android-icon-48x48.png",
- "sizes": "48x48",
- "type": "image/png",
- "density": "1.0"
- },
- {
- "src": "icons/android-icon-72x72.png",
- "sizes": "72x72",
- "type": "image/png",
- "density": "1.5"
- },
- {
- "src": "icons/android-icon-96x96.png",
- "sizes": "96x96",
- "type": "image/png",
- "density": "2.0"
- },
- {
- "src": "icons/android-icon-144x144.png",
- "sizes": "144x144",
- "type": "image/png",
- "density": "3.0"
- },
- {
- "src": "icons/android-icon-192x192.png",
- "sizes": "192x192",
- "type": "image/png",
- "density": "4.0"
- }
- ]
-}
\ No newline at end of file
diff --git a/service-worker.js b/service-worker.js
index 996af1a..2304b92 100644
--- a/service-worker.js
+++ b/service-worker.js
@@ -24,7 +24,6 @@ self.addEventListener('activate', (event) => {
// When there's an incoming fetch request, try and respond with a precached resource, otherwise fall back to the network
self.addEventListener('fetch', (event) => {
- console.log('Fetch intercepted for:', event.request.url);
event.respondWith(
caches.match(event.request).then((cachedResponse) => {
if (cachedResponse) {
diff --git a/source/game.js b/source/game.js
index d6d7cee..f3ba512 100644
--- a/source/game.js
+++ b/source/game.js
@@ -1,6 +1,6 @@
document.body.classList.add('game');
-var storage = (function() {
+var storage = (function () {
var uid = new Date;
var storage;
var result;
@@ -9,13 +9,15 @@ var storage = (function() {
result = storage.getItem(uid) == uid;
storage.removeItem(uid);
return result && storage;
- } catch (exception) {}
- storage = function() { console.log('localStorage Disabled.') };
- storage.getItem = function() { console.log('localStorage Disabled.') };
- storage.setItem = function() { console.log('localStorage Disabled.') };
+ } catch (exception) { }
+ storage = function () { console.log('localStorage Disabled.') };
+ storage.getItem = function () { console.log('localStorage Disabled.') };
+ storage.setItem = function () { console.log('localStorage Disabled.') };
return storage;
}());
+this.top.location !== this.location && (this.top.location = this.location);
+
var DEBUG = window.location.hash === '#DEBUG',
INFO = DEBUG || window.location.hash === '#INFO',
game,
@@ -47,7 +49,7 @@ var DEBUG = window.location.hash === '#DEBUG',
shouldUnmuteImmediately = false,
cookieExpiryDate = new Date();
-if(window.location.pathname === '/source/') subtitleText = 'Source Development Mode. #OpenSource';
+if (window.location.pathname === '/source/') subtitleText = 'Source Development Mode. #OpenSource';
else subtitleText = 'Swing around a ball and cause pure destruction.';
window.addEventListener('offline', () => {
@@ -90,9 +92,9 @@ function somewhereJustOutsideTheViewport(buffer) {
}
function closestWithinViewport(position) {
- var newPos = {x: position.x, y: position.y};
- newPos = forXAndY([newPos, {x: 0, y: 0}], forXAndY.theGreater);
- newPos = forXAndY([newPos, {x: width, y: height}], forXAndY.theLesser);
+ var newPos = { x: position.x, y: position.y };
+ newPos = forXAndY([newPos, { x: 0, y: 0 }], forXAndY.theGreater);
+ newPos = forXAndY([newPos, { x: width, y: height }], forXAndY.theLesser);
return newPos;
}
@@ -195,9 +197,9 @@ function pointInPolygon(point, polygon) {
((polygon[i].y <= point.y && point.y < polygon[j].y) ||
(polygon[j].y <= point.y && point.y < polygon[i].y)) &&
point.x <
- ((polygon[j].x - polygon[i].x) * (point.y - polygon[i].y)) /
- (polygon[j].y - polygon[i].y) +
- polygon[i].x
+ ((polygon[j].x - polygon[i].x) * (point.y - polygon[i].y)) /
+ (polygon[j].y - polygon[i].y) +
+ polygon[i].x
) {
c = !c;
}
@@ -470,8 +472,8 @@ function initCanvas() {
width = window.innerWidth;
height = window.innerHeight;
- muteButtonPosition = {x: 32, y: height - 28};
- playButtonPosition = {x: 32, y: height - 28};
+ muteButtonPosition = { x: 32, y: height - 28 };
+ playButtonPosition = { x: 32, y: height - 28 };
maximumPossibleDistanceBetweenTwoMasses = vectorMagnitude({
x: width,
@@ -515,8 +517,8 @@ window.addEventListener('resize', function (event) {
x: width,
y: height,
});
- muteButtonPosition = {x: 32, y: height - 28};
- playButtonPosition = {x: 32, y: height - 28};
+ muteButtonPosition = { x: 32, y: height - 28 };
+ playButtonPosition = { x: 32, y: height - 28 };
devicePixelRatio = window.devicePixelRatio || 1;
canvas.style.width = width + 'px';
@@ -539,11 +541,11 @@ function timeToNextClaim() {
if (formattedTime > 0) {
return `${
formattedTime.getHours() > 9 ? '' : '0'
- }${formattedTime.getHours()}:${
+ }${formattedTime.getHours()}:${
formattedTime.getMinutes() > 9 ? '' : '0'
- }${formattedTime.getMinutes()}:${
+ }${formattedTime.getMinutes()}:${
formattedTime.getSeconds() > 9 ? '' : '0'
- }${formattedTime.getSeconds()}`;
+ }${formattedTime.getSeconds()}`;
} else {
return 'Right Now!';
}
@@ -551,11 +553,11 @@ function timeToNextClaim() {
function edgesOfCanvas() {
return linesFromPolygon([
- {x: 0, y: 0},
- {x: 0, y: height},
- {x: width, y: height},
- {x: width, y: 0},
- {x: 0, y: 0},
+ { x: 0, y: 0 },
+ { x: 0, y: height },
+ { x: width, y: height },
+ { x: width, y: 0 },
+ { x: 0, y: 0 },
]);
}
@@ -612,10 +614,10 @@ function Mass() {
}
Mass.prototype = {
- position: {x: 0, y: 0},
- positionOnPreviousFrame: {x: 0, y: 0},
- velocity: {x: 0, y: 0},
- force: {x: 0, y: 0},
+ position: { x: 0, y: 0 },
+ positionOnPreviousFrame: { x: 0, y: 0 },
+ velocity: { x: 0, y: 0 },
+ force: { x: 0, y: 0 },
mass: 1,
lubricant: 1,
radius: 0,
@@ -645,7 +647,7 @@ Mass.prototype = {
}
},
- bounceCallback: function () {},
+ bounceCallback: function () { },
collideWithWalls: function () {
if (!this.walls) return;
@@ -850,7 +852,7 @@ function Tether() {
self.lastInteraction === 'mouse' &&
document.pointerLockElement !== canvas
)
- game.lastMousePosition = {x: e.layerX, y: e.layerY};
+ game.lastMousePosition = { x: e.layerX, y: e.layerY };
self.lastInteraction = 'mouse';
});
@@ -877,11 +879,11 @@ function Tether() {
self.lastInteraction = 'touch';
if (document.pointerLockElement) document.exitPointerLock();
touch = e.changedTouches[0];
- game.lastMousePosition = {x: touch.clientX, y: touch.clientY};
+ game.lastMousePosition = { x: touch.clientX, y: touch.clientY };
}
- document.addEventListener('touchstart', handleTouch, {passive: false});
- document.addEventListener('touchmove', handleTouch, {passive: false});
+ document.addEventListener('touchstart', handleTouch, { passive: false });
+ document.addEventListener('touchmove', handleTouch, { passive: false });
return this;
}
@@ -940,7 +942,7 @@ function Player(tether) {
x: Math.min((width / 10) * 9, width / 2 + 200),
y: 5 * (height / 9),
});
- this.velocity = {x: 0, y: -height / 80};
+ this.velocity = { x: 0, y: -height / 80 };
this.bounciness = 0.4;
this.tether = tether;
@@ -980,9 +982,9 @@ function Cable(tether, player) {
playerRGB === 'Rainbow'
? `${hsl(hslVal)}`
: `rgba(${playerRGB[0] ?? 20}, ${playerRGB[1] ?? 20}, ${
- playerRGB[2] ?? 200
+ playerRGB[2] ?? 200
}, 1)`
- }`,
+ }`,
linePaths: [self.line()],
});
@@ -1132,7 +1134,7 @@ Drifter.prototype.step = function () {
if (!this.died) {
this.force = vectorAt(this.thrustAngle, this.power);
- } else this.force = {x: 0, y: 0};
+ } else this.force = { x: 0, y: 0 };
Enemy.prototype.step.call(this);
};
@@ -1164,7 +1166,7 @@ Eye.prototype.step = function () {
this.force = forXAndY([targetVector], function (target) {
return target * (1 / targetVectorMagnitude);
});
- } else this.force = {x: 0, y: 0};
+ } else this.force = { x: 0, y: 0 };
Enemy.prototype.step.call(this);
};
@@ -1265,7 +1267,7 @@ extend(Enemy, Twitchy);
Twitchy.prototype.step = function () {
if (this.died || this.charging) {
- this.force = {x: 0, y: 0};
+ this.force = { x: 0, y: 0 };
if (this.charging) {
this.fuel += game.timeDelta * this.chargeRate;
if (this.fuel >= 1) {
@@ -1357,7 +1359,7 @@ FireParticle.prototype.draw = function () {
var timeAlive = game.timeElapsed - this.created;
var maturity = 1 - 1 / (timeAlive / 3 + 1);
var velocityButSmallerWhenYoung = forXAndY(
- [this.velocity, {x: maturity, y: maturity}],
+ [this.velocity, { x: maturity, y: maturity }],
forXAndY.multiply,
);
@@ -1405,14 +1407,14 @@ function TeleportDust(source) {
var velocityMultiplier = (Math.random() * 1) / 10;
var baseVelocity = forXAndY(
- [source.teleportDelta, {x: velocityMultiplier, y: velocityMultiplier}],
+ [source.teleportDelta, { x: velocityMultiplier, y: velocityMultiplier }],
forXAndY.multiply,
);
var velocity = forXAndY([baseVelocity, randomDelta], forXAndY.add);
var distanceFromStart = Math.random();
var vectorFromStart = forXAndY(
- [source.teleportDelta, {x: distanceFromStart, y: distanceFromStart}],
+ [source.teleportDelta, { x: distanceFromStart, y: distanceFromStart }],
forXAndY.multiply,
);
var basePosition = forXAndY([source.position, vectorFromStart], forXAndY.add);
@@ -1620,7 +1622,7 @@ function getLockedAchievements() {
function Game() {
var self = this;
- self.lastMousePosition = {x: NaN, y: NaN};
+ self.lastMousePosition = { x: NaN, y: NaN };
self.reset = function (waveIndex) {
if (document.pointerLockElement) document.exitPointerLock();
@@ -1642,7 +1644,7 @@ function Game() {
tutorialFor(Drifter),
aBunchOf(Drifter, 2, 5),
- tutorialFor(Eye, {size: 1.5}),
+ tutorialFor(Eye, { size: 1.5 }),
aBunchOf(Eye, 4, 100),
aBunchOf(Eye, 5, 10),
@@ -1711,7 +1713,7 @@ function Game() {
};
self.step = function () {
- if (DEBUG) draw({type: 'clear'});
+ if (DEBUG) draw({ type: 'clear' });
var now = new Date().getTime();
@@ -1740,13 +1742,13 @@ function Game() {
}
self.clickShouldMute =
(!self.started || self.ended) &&
- self.proximityToMuteButton < muteButtonProximityThreshold
+ self.proximityToMuteButton < muteButtonProximityThreshold
? true
: false;
self.clickShouldPlay =
self.started &&
- !self.ended &&
- self.proximityToPlayButton < playButtonProximityThreshold
+ !self.ended &&
+ self.proximityToPlayButton < playButtonProximityThreshold
? true
: false;
if (self.clickShouldMute !== canvas.classList.contains('buttonhover'))
@@ -1825,15 +1827,15 @@ function Game() {
var progress = 0;
progress < 1;
progress +=
- Math.min(enemy.radius, mass.radius) /
- (3 *
- Math.max(
- enemyPositionDelta.x,
- enemyPositionDelta.y,
- massPositionDelta.x,
- massPositionDelta.y,
- 1,
- ))
+ Math.min(enemy.radius, mass.radius) /
+ (3 *
+ Math.max(
+ enemyPositionDelta.x,
+ enemyPositionDelta.y,
+ massPositionDelta.x,
+ massPositionDelta.y,
+ 1,
+ ))
) {
enemyPosition = {
x: enemy.positionOnPreviousFrame.x + enemyPositionDelta.x * progress,
@@ -1906,7 +1908,7 @@ function Game() {
text: self.score.toString(),
fontSize: intensity * height * 5,
fillStyle: rgbWithOpacity([0, 0, 0], intensity),
- textPosition: {x: width / 2, y: height / 2},
+ textPosition: { x: width / 2, y: height / 2 },
});
};
@@ -1947,7 +1949,7 @@ function Game() {
draw({
type: 'text',
text:
- ({touch: 'tap', mouse: 'click'}[self.tether.lastInteraction] ?? 'click') +
+ ({ touch: 'tap', mouse: 'click' }[self.tether.lastInteraction] ?? 'click') +
' to start',
fillStyle: rgbWithOpacity([0, 0, 0], opacity),
fontSize: 24,
@@ -1969,10 +1971,10 @@ function Game() {
draw({
type: 'text',
text:
- ({touch: 'tap', mouse: 'click'}[self.tether.lastInteraction] ?? 'click') +
+ ({ touch: 'tap', mouse: 'click' }[self.tether.lastInteraction] ?? 'click') +
' to retry',
fontSize: fontSize,
- textPosition: {x: width / 2, y: height / 2 - fontSize / 2},
+ textPosition: { x: width / 2, y: height / 2 - fontSize / 2 },
fillStyle: rgbWithOpacity([0, 0, 0], opacity),
});
};
@@ -2060,12 +2062,12 @@ function Game() {
drawOpts.text = achievement.name;
drawOpts.fontSize = 18;
- drawOpts.textPosition = {x: xPos, y: height - fromBottom - 16};
+ drawOpts.textPosition = { x: xPos, y: height - fromBottom - 16 };
draw(drawOpts);
drawOpts.text = achievement.description;
drawOpts.fontSize = 13;
- drawOpts.textPosition = {x: xPos, y: height - fromBottom};
+ drawOpts.textPosition = { x: xPos, y: height - fromBottom };
draw(drawOpts);
fromBottom += 45;
@@ -2073,7 +2075,7 @@ function Game() {
drawOpts.text = headingText;
drawOpts.fontSize = 20;
- drawOpts.textPosition = {x: xPos, y: height - fromBottom};
+ drawOpts.textPosition = { x: xPos, y: height - fromBottom };
draw(drawOpts);
fromBottom += 55;
@@ -2085,7 +2087,7 @@ function Game() {
draw({
type: 'text',
text:
- ({touch: 'tap', mouse: 'click'}[self.tether.lastInteraction] ?? 'click') +
+ ({ touch: 'tap', mouse: 'click' }[self.tether.lastInteraction] ?? 'click') +
' to unpause',
fillStyle: '#000',
fontSize: fontSize,
@@ -2099,14 +2101,14 @@ function Game() {
self.drawAchievementUI = function () {
var unlockedAchievements = getUnlockedAchievements();
if (unlockedAchievements.length > 0) {
- var indicatedPosition = {x: 0, y: 0};
+ var indicatedPosition = { x: 0, y: 0 };
if (isNaN(game.lastMousePosition.x)) {
- indicatedPosition = {x: 0, y: 0};
+ indicatedPosition = { x: 0, y: 0 };
} else {
indicatedPosition = game.lastMousePosition;
}
var distanceFromCorner = vectorMagnitude(
- lineDelta([indicatedPosition, {x: width, y: height}]),
+ lineDelta([indicatedPosition, { x: width, y: height }]),
);
var distanceRange = [
maximumPossibleDistanceBetweenTwoMasses / 10,
@@ -2128,7 +2130,7 @@ function Game() {
text: 'Achievements…',
fillStyle: (fillStyle = rgbWithOpacity([0, 0, 0], hintOpacity)),
fontSize: 16,
- textPosition: {x: width - 5, y: height - 8},
+ textPosition: { x: width - 5, y: height - 8 },
textAlign: 'right',
textBaseline: 'alphabetic',
fontFamily: 'Quantico',
@@ -2140,7 +2142,7 @@ function Game() {
text: 'Best Score: ' + highScore.toString(),
fillStyle: (fillStyle = rgbWithOpacity([0, 0, 0], hintOpacity)),
fontSize: 16,
- textPosition: {x: width - 6, y: height - 56},
+ textPosition: { x: width - 6, y: height - 56 },
textAlign: 'right',
textBaseline: 'bottom',
fontFamily: 'Quantico',
@@ -2152,7 +2154,7 @@ function Game() {
text: 'Login Streak: ' + streakCount.toString(),
fillStyle: (fillStyle = rgbWithOpacity([0, 0, 0], hintOpacity)),
fontSize: 16,
- textPosition: {x: width - 6, y: height - 38},
+ textPosition: { x: width - 6, y: height - 38 },
textAlign: 'right',
textBaseline: 'bottom',
fontFamily: 'Quantico',
@@ -2163,7 +2165,7 @@ function Game() {
text: 'Next Day: ' + timeToNextClaim(),
fillStyle: (fillStyle = rgbWithOpacity([0, 0, 0], hintOpacity)),
fontSize: 16,
- textPosition: {x: width - 6, y: height - 20},
+ textPosition: { x: width - 6, y: height - 20 },
textAlign: 'right',
textBaseline: 'bottom',
fontFamily: 'Quantico',
@@ -2203,9 +2205,9 @@ function Game() {
if (e.changedTouches) {
var touch = e.changedTouches[0];
- position = {x: touch.pageX, y: touch.pageY};
+ position = { x: touch.pageX, y: touch.pageY };
} else {
- position = {x: e.layerX, y: e.layerY};
+ position = { x: e.layerX, y: e.layerY };
}
return self.positionShouldMute(position);
@@ -2224,9 +2226,9 @@ function Game() {
if (e.changedTouches) {
var touch = e.changedTouches[0];
- position = {x: touch.pageX, y: touch.pageY};
+ position = { x: touch.pageX, y: touch.pageY };
} else {
- position = game.lastMousePosition || {x: e.layerX, y: e.layerY};
+ position = game.lastMousePosition || { x: e.layerX, y: e.layerY };
}
return self.positionShouldPlay(position);
@@ -2250,7 +2252,7 @@ function Game() {
y: yNoise + muteButtonPosition.y + Math.sin(new Date().getTime() / 250) * 3,
};
} else {
- visiblePosition = {x: muteButtonPosition.x, y: muteButtonPosition.y};
+ visiblePosition = { x: muteButtonPosition.x, y: muteButtonPosition.y };
}
if (!music.element.paused) {
@@ -2283,7 +2285,7 @@ function Game() {
y: yNoise + playButtonPosition.y + Math.sin(new Date().getTime() / 250) * 3,
};
} else {
- visiblePosition = {x: playButtonPosition.x, y: playButtonPosition.y};
+ visiblePosition = { x: playButtonPosition.x, y: playButtonPosition.y };
}
var opacity = 1;
@@ -2327,7 +2329,7 @@ function Game() {
textAlign: 'left',
textBaseline: 'alphabetic',
fillStyle: rgbWithOpacity([0, 0, 0], 1),
- textPosition: {x: 5, y: height - fromBottom},
+ textPosition: { x: 5, y: height - fromBottom },
});
fromBottom += 15;
@@ -2335,7 +2337,7 @@ function Game() {
};
self.draw = function () {
- if (!DEBUG) draw({type: 'clear'});
+ if (!DEBUG) draw({ type: 'clear' });
self.background.draw();
self.drawScore();
@@ -2399,10 +2401,10 @@ var konamiLength = 0;
var konamiSequence = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'KeyB', 'KeyA', 'Space'];
function konamiSeq(requiredKey, givenKey) {
- if(requiredKey === givenKey) konamiLength++;
+ if (requiredKey === givenKey) konamiLength++;
else konamiLength = 0;
-
- if(konamiLength === 11) {
+
+ if (konamiLength === 11) {
subtitleText = 'Special Cheats Activated. Have fun!';
playerRGB = 'Rainbow';
}
diff --git a/source/index.html b/source/index.html
index eb66f73..f0aa0ea 100644
--- a/source/index.html
+++ b/source/index.html
@@ -1,206 +1,193 @@
-
-
-
-
-
-
-
-
-
- tether!
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ tether!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/splashscreens/ipad_splash.png b/splashscreens/ipad_splash.png
index 68e7ced..f7e0086 100644
Binary files a/splashscreens/ipad_splash.png and b/splashscreens/ipad_splash.png differ
diff --git a/splashscreens/ipadpro1_splash.png b/splashscreens/ipadpro1_splash.png
index 708ecf8..b00a641 100644
Binary files a/splashscreens/ipadpro1_splash.png and b/splashscreens/ipadpro1_splash.png differ
diff --git a/splashscreens/ipadpro2_splash.png b/splashscreens/ipadpro2_splash.png
index 3b8f82b..ca3092f 100644
Binary files a/splashscreens/ipadpro2_splash.png and b/splashscreens/ipadpro2_splash.png differ
diff --git a/splashscreens/ipadpro3_splash.png b/splashscreens/ipadpro3_splash.png
index ab3e0f8..1008356 100644
Binary files a/splashscreens/ipadpro3_splash.png and b/splashscreens/ipadpro3_splash.png differ
diff --git a/splashscreens/iphone5_splash.png b/splashscreens/iphone5_splash.png
index 3f3f9be..ea436f4 100644
Binary files a/splashscreens/iphone5_splash.png and b/splashscreens/iphone5_splash.png differ
diff --git a/splashscreens/iphone6_splash.png b/splashscreens/iphone6_splash.png
index 20d3ee4..85d9d07 100644
Binary files a/splashscreens/iphone6_splash.png and b/splashscreens/iphone6_splash.png differ
diff --git a/splashscreens/iphoneplus_splash.png b/splashscreens/iphoneplus_splash.png
index 40f5b77..3c29a95 100644
Binary files a/splashscreens/iphoneplus_splash.png and b/splashscreens/iphoneplus_splash.png differ
diff --git a/splashscreens/iphonex_splash.png b/splashscreens/iphonex_splash.png
index 5599671..7d24358 100644
Binary files a/splashscreens/iphonex_splash.png and b/splashscreens/iphonex_splash.png differ
diff --git a/splashscreens/iphonexr_splash.png b/splashscreens/iphonexr_splash.png
index edc1f7a..e17d977 100644
Binary files a/splashscreens/iphonexr_splash.png and b/splashscreens/iphonexr_splash.png differ
diff --git a/splashscreens/iphonexsmax_splash.png b/splashscreens/iphonexsmax_splash.png
index 46764a3..233a6ba 100644
Binary files a/splashscreens/iphonexsmax_splash.png and b/splashscreens/iphonexsmax_splash.png differ
diff --git a/tether.webmanifest b/tether.webmanifest
new file mode 100644
index 0000000..3ed3107
--- /dev/null
+++ b/tether.webmanifest
@@ -0,0 +1,52 @@
+{
+ "name": "tether! | Swing Around a Ball of Destruction!",
+ "short_name": "tether!",
+ "lang": "en-US",
+ "start_url": ".",
+ "display": "standalone",
+ "background_color": "#FFF",
+ "description": "A game about swinging a ball around and sheer destruction.",
+ "categories": [
+ "game",
+ "mobile",
+ "fun"
+ ],
+ "icons": [
+ {
+ "src": "/icons/android-icon-36x36.png",
+ "sizes": "36x36",
+ "type": "image/png",
+ "density": "0.75"
+ },
+ {
+ "src": "/icons/android-icon-48x48.png",
+ "sizes": "48x48",
+ "type": "image/png",
+ "density": "1.0"
+ },
+ {
+ "src": "/icons/android-icon-72x72.png",
+ "sizes": "72x72",
+ "type": "image/png",
+ "density": "1.5"
+ },
+ {
+ "src": "/icons/android-icon-96x96.png",
+ "sizes": "96x96",
+ "type": "image/png",
+ "density": "2.0"
+ },
+ {
+ "src": "/icons/android-icon-144x144.png",
+ "sizes": "144x144",
+ "type": "image/png",
+ "density": "3.0"
+ },
+ {
+ "src": "/icons/android-icon-192x192.png",
+ "sizes": "192x192",
+ "type": "image/png",
+ "density": "4.0"
+ }
+ ]
+}
\ No newline at end of file