Skip to content

Commit

Permalink
Use up-to-date low quality text texture, fixes #18
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-roesch committed Aug 6, 2020
1 parent 3fd166e commit faeca0f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/convert-textures.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const textures = {
}

const basePath = './public/img/textures'
const webpOnly = process.argv.slice(2)[0] === '--webp-only'

Promise.all(Object.keys(textures).flatMap((name) => {
const texture = textures[name]
Expand All @@ -36,12 +37,12 @@ Promise.all(Object.keys(textures).flatMap((name) => {

console.log(`Optimizing and converting texture '${name}'...`)

return imagemin(changedFiles, {
return (webpOnly ? new Promise(resolve => resolve()) : imagemin(changedFiles, {
destination: basePath,
plugins: [
imageminZopfli({ more: true })
]
}).then(() => {
})).then(() => {
console.log(`Optimized PNGs for texture '${name}'`)

return imagemin(changedFiles, {
Expand Down
Binary file modified public/img/textures/map_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/img/textures/map_text.webp
Binary file not shown.

0 comments on commit faeca0f

Please sign in to comment.