Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/SOK-37_animations' …
Browse files Browse the repository at this point in the history
…into SOK-23_game_docs
  • Loading branch information
shamemask committed Oct 15, 2024
2 parents a6128a4 + afe203f commit 08482b5
Show file tree
Hide file tree
Showing 26 changed files with 1,051 additions and 227 deletions.
2 changes: 1 addition & 1 deletion packages/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="/favicon.png" />
<link rel="manifest" href="/manifest.json">
<link rel="manifest" href="/manifest.json" />

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
Expand Down
17 changes: 8 additions & 9 deletions packages/client/public/serviceWorker.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const CACHE_NAME = 'cache-data-v1'
const urlsToCache = [
'/'
]
const urlsToCache = ['/']

const networkFirst = async (request) => {
const networkFirst = async request => {
const cache = await caches.open(CACHE_NAME)
try {
const response = await fetch(request)
const cachePutCondition = response && response.status === 200 && response.type === 'basic'
const cachePutCondition =
response && response.status === 200 && response.type === 'basic'
if (cachePutCondition) {
await cache.put(request, response.clone())
}
Expand All @@ -25,21 +24,21 @@ const networkFirst = async (request) => {
}
}

self.addEventListener('install', (event) => {
self.addEventListener('install', event => {
event.waitUntil(
caches
.open(CACHE_NAME)
.then((cache) => {
.then(cache => {
return cache.addAll(urlsToCache)
})
.then(() => self.skipWaiting())
.catch((err) => {
.catch(err => {
console.error('Cache installation failed:', err)
})
)
})

self.addEventListener('fetch', (event) => {
self.addEventListener('fetch', event => {
const { request } = event
const { url, method } = request

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions packages/client/src/assets/images/sprites/enemy.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 08482b5

Please sign in to comment.