Compress sounds into atlas

This commit is contained in:
tobspr 2020-05-19 11:08:28 +02:00
parent 5f37ff001b
commit a7fff0dcd2
27 changed files with 368 additions and 225 deletions

View File

@ -80,8 +80,13 @@ translations.gulptasksTranslations($, gulp, buildFolder);
gulp.task("utils.cleanBuildFolder", () => {
return gulp.src(buildFolder, { read: false }).pipe($.clean({ force: true }));
});
gulp.task("utils.cleanBuildTempFolder", () => {
return gulp
.src(path.join(__dirname, "..", "src", "js", "built-temp"), { read: false })
.pipe($.clean({ force: true }));
});
gulp.task("utils.cleanup", $.sequence("utils.cleanBuildFolder", "translations.clear"));
gulp.task("utils.cleanup", $.sequence("utils.cleanBuildFolder", "utils.cleanBuildTempFolder"));
// Requires no uncomitted files
gulp.task("utils.requireCleanWorkingTree", cb => {
@ -151,16 +156,12 @@ function serve({ standalone }) {
gulp.watch("../translations/**/*.yaml", ["translations.convertToJson"]);
gulp.watch(
["../res_raw/sounds/ui/*.mp3", "../res_raw/sounds/ui/*.wav"],
$.sequence("sounds.encodeUi", "sounds.copy")
);
gulp.watch(
["../res_raw/sounds/game/*.mp3", "../res_raw/sounds/game/*.wav"],
$.sequence("sounds.encodeGame", "sounds.copy")
["../res_raw/sounds/sfx/*.mp3", "../res_raw/sounds/sfx/*.wav"],
$.sequence("sounds.sfx", "sounds.copy")
);
gulp.watch(
["../res_raw/sounds/music/*.mp3", "../res_raw/sounds/music/*.wav"],
$.sequence("sounds.encodeMusic", "sounds.copy")
$.sequence("sounds.music", "sounds.copy")
);
// Watch resource files and copy them on change
@ -176,7 +177,7 @@ function serve({ standalone }) {
return gulp.src(e.path).pipe(browserSync.reload({ stream: true }));
});
gulp.watch("../src/js/translations-built/*.json").on("change", function (e) {
gulp.watch("../src/js/built-temp/*.json").on("change", function (e) {
return gulp.src(e.path).pipe(browserSync.reload({ stream: true }));
});
@ -197,7 +198,7 @@ gulp.task("default", ["main.serveDev"]);
///////////////////// RUNNABLE TASKS /////////////////////
// Pre and postbuild
gulp.task("step.baseResources", cb => $.multiProcess(["sounds.fullbuild", "imgres.allOptimized"], cb, false));
gulp.task("step.baseResources", cb => $.sequence("imgres.allOptimized")(cb));
gulp.task("step.deleteEmpty", cb => {
deleteEmpty.sync(buildFolder);
cb();
@ -236,7 +237,7 @@ gulp.task("build.standalone.dev", cb => {
});
// Builds everything (staging)
gulp.task("step.staging.code", $.sequence("translations.fullBuild", "js.staging"));
gulp.task("step.staging.code", $.sequence("sounds.fullbuild", "translations.fullBuild", "js.staging"));
gulp.task("step.staging.mainbuild", cb =>
$.multiProcess(["utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code"], cb, false)
);
@ -244,7 +245,7 @@ gulp.task("step.staging.all", $.sequence("step.staging.mainbuild", "css.prod", "
gulp.task("build.staging", $.sequence("utils.cleanup", "step.staging.all", "step.postbuild"));
// Builds everything (prod)
gulp.task("step.prod.code", $.sequence("translations.fullBuild", "js.prod"));
gulp.task("step.prod.code", $.sequence("sounds.fullbuild", "translations.fullBuild", "js.prod"));
gulp.task("step.prod.mainbuild", cb =>
$.multiProcess(["utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code"], cb, false)
);
@ -252,7 +253,10 @@ gulp.task("step.prod.all", $.sequence("step.prod.mainbuild", "css.prod", "html.p
gulp.task("build.prod", $.sequence("utils.cleanup", "step.prod.all", "step.postbuild"));
// Builds everything (standalone-beta)
gulp.task("step.standalone-beta.code", $.sequence("translations.fullBuild", "js.standalone-beta"));
gulp.task(
"step.standalone-beta.code",
$.sequence("sounds.fullbuild", "translations.fullBuild", "js.standalone-beta")
);
gulp.task("step.standalone-beta.mainbuild", cb =>
$.multiProcess(
["utils.copyAdditionalBuildFiles", "step.baseResources", "step.standalone-beta.code"],
@ -267,7 +271,10 @@ gulp.task(
gulp.task("build.standalone-beta", $.sequence("utils.cleanup", "step.standalone-beta.all", "step.postbuild"));
// Builds everything (standalone-prod)
gulp.task("step.standalone-prod.code", $.sequence("translations.fullBuild", "js.standalone-prod"));
gulp.task(
"step.standalone-prod.code",
$.sequence("sounds.fullbuild", "translations.fullBuild", "js.standalone-prod")
);
gulp.task("step.standalone-prod.mainbuild", cb =>
$.multiProcess(
["utils.copyAdditionalBuildFiles", "step.baseResources", "step.standalone-prod.code"],

View File

@ -18,6 +18,7 @@
"@types/filesystem": "^0.0.29",
"@types/node": "^12.7.5",
"ajv": "^6.10.2",
"audiosprite": "^0.7.2",
"babel-loader": "^8.1.0",
"browser-sync": "^2.24.6",
"circular-dependency-plugin": "^5.0.2",
@ -32,6 +33,7 @@
"fastdom": "^1.0.9",
"flatted": "^2.0.1",
"fs-extra": "^8.1.0",
"gulp-audiosprite": "^1.1.0",
"howler": "^2.1.2",
"html-loader": "^0.5.5",
"ignore-loader": "^0.1.2",
@ -48,6 +50,7 @@
"strictdom": "^1.0.1",
"string-replace-webpack-plugin": "^0.1.3",
"terser-webpack-plugin": "^1.1.0",
"through2": "^3.0.1",
"uglify-template-string-loader": "^1.1.0",
"unused-files-webpack-plugin": "^3.4.0",
"webpack": "^4.31.0",

View File

@ -1,4 +1,5 @@
const path = require("path");
const audiosprite = require("gulp-audiosprite");
function gulptasksSounds($, gulp, buildFolder) {
// Gather some basic infos
@ -16,7 +17,7 @@ function gulptasksSounds($, gulp, buildFolder) {
});
// Encodes the game music
gulp.task("sounds.encodeMusic", () => {
gulp.task("sounds.music", () => {
return gulp
.src([path.join(soundsDir, "music", "**", "*.wav"), path.join(soundsDir, "music", "**", "*.mp3")])
.pipe($.plumber())
@ -40,53 +41,43 @@ function gulptasksSounds($, gulp, buildFolder) {
});
// Encodes the ui sounds
gulp.task("sounds.encodeUi", () => {
gulp.task("sounds.sfxGenerateSprites", () => {
return gulp
.src([path.join(soundsDir, "ui", "**", "*.wav"), path.join(soundsDir, "ui", "**", "*.mp3")])
.src([path.join(soundsDir, "sfx", "**", "*.wav"), path.join(soundsDir, "sfx", "**", "*.mp3")])
.pipe($.plumber())
.pipe(
$.cache(
$.fluentFfmpeg("mp3", function (cmd) {
return cmd
.audioBitrate(128)
.audioChannels(1)
.audioFrequency(22050)
.audioCodec("libmp3lame")
.audioFilters(filters);
})
),
{
name: "uisounds",
fileCache,
}
audiosprite({
format: "howler",
output: "sfx",
gap: 0.1,
export: "mp3",
})
)
.pipe(gulp.dest(path.join(builtSoundsDir, "ui")));
.pipe(gulp.dest(path.join(builtSoundsDir)));
});
// Encodes the game sounds
gulp.task("sounds.encodeGame", () => {
gulp.task("sounds.sfxOptimize", () => {
return gulp
.src([path.join(soundsDir, "game", "**", "*.wav"), path.join(soundsDir, "game", "**", "*.mp3")])
.src([path.join(builtSoundsDir, "sfx.mp3")])
.pipe($.plumber())
.pipe(
$.cache(
$.fluentFfmpeg("mp3", function (cmd) {
return cmd
.audioBitrate(128)
.audioChannels(1)
.audioFrequency(22050)
.audioCodec("libmp3lame")
.audioFilters(filters);
}),
{
nane: "gamesounds",
fileCache,
}
)
$.fluentFfmpeg("mp3", function (cmd) {
return cmd
.audioBitrate(128)
.audioChannels(1)
.audioFrequency(22050)
.audioCodec("libmp3lame")
.audioFilters(filters);
})
)
.pipe(gulp.dest(path.join(builtSoundsDir, "game")));
.pipe(gulp.dest(path.join(builtSoundsDir)));
});
gulp.task("sounds.sfxCopyAtlas", () => {
return gulp
.src([path.join(builtSoundsDir, "sfx.json")])
.pipe(gulp.dest(path.join(__dirname, "..", "src", "js", "built-temp")));
});
gulp.task("sounds.sfx", ["sounds.sfxGenerateSprites", "sounds.sfxOptimize", "sounds.sfxCopyAtlas"]);
gulp.task("sounds.copy", () => {
return gulp
@ -96,15 +87,10 @@ function gulptasksSounds($, gulp, buildFolder) {
.pipe(gulp.dest(path.join(buildFolder, "res", "sounds")));
});
gulp.task("sounds.buildall", cb =>
$.multiProcess(["sounds.encodeMusic", "sounds.encodeUi", "sounds.encodeGame"], cb, true)
);
gulp.task("sounds.buildall", cb => $.multiProcess(["sounds.music", "sounds.sfx"], cb, true));
gulp.task("sounds.fullbuild", cb => $.sequence("sounds.clear", "sounds.buildall", "sounds.copy")(cb));
gulp.task("sounds.dev", cb => {
return $.sequence("sounds.buildall", "sounds.copy")(cb);
});
gulp.task("sounds.dev", cb => $.sequence("sounds.buildall", "sounds.copy")(cb));
}
module.exports = {

View File

@ -3,13 +3,9 @@ const path = require("path");
const yaml = require("gulp-yaml");
const translationsSourceDir = path.join(__dirname, "..", "translations");
const translationsJsonDir = path.join(__dirname, "..", "src", "js", "translations-built");
const translationsJsonDir = path.join(__dirname, "..", "src", "js", "built-temp");
function gulptasksTranslations($, gulp, buildFolder) {
gulp.task("translations.clear", () => {
return gulp.src(translationsJsonDir, { read: false }).pipe($.clean({ force: true }));
});
gulp.task("translations.convertToJson", () => {
return gulp
.src(path.join(translationsSourceDir, "*.yaml"))

View File

@ -1854,6 +1854,11 @@ async@~0.9.0:
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
integrity sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=
async@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
integrity sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=
async@~2.1.4:
version "2.1.5"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.5.tgz#e587c68580994ac67fc56ff86d3ac56bdbe810bc"
@ -1871,6 +1876,18 @@ atob@^2.1.1:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
audiosprite@*, audiosprite@^0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/audiosprite/-/audiosprite-0.7.2.tgz#ac431a6c30c127bbb6ed743e5d178862ddf9e31e"
integrity sha512-9Z6UwUuv4To5nUQNRIw5/Q3qA7HYm0ANzoW5EDGPEsU2oIRVgmIlLlm9YZfpPKoeUxt54vMStl2/762189VmJw==
dependencies:
async "~0.9.0"
glob "^6.0.4"
mkdirp "^0.5.0"
optimist "~0.6.1"
underscore "~1.8.3"
winston "~1.0.0"
author-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450"
@ -3065,7 +3082,7 @@ color@^3.0.0:
color-convert "^1.9.1"
color-string "^1.5.2"
colors@1.0.3:
colors@1.0.3, colors@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=
@ -3661,6 +3678,11 @@ currently-unhandled@^0.4.1:
dependencies:
array-find-index "^1.0.1"
cycle@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
integrity sha1-IegLK+hYD5i0aPN5QwZisEbDStI=
cyclist@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
@ -5038,6 +5060,11 @@ extsprintf@^1.2.0:
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
eyes@0.1.x:
version "0.1.8"
resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
integrity sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=
fancy-log@^1.1.0, fancy-log@^1.2.0, fancy-log@^1.3.2, fancy-log@^1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7"
@ -5837,6 +5864,17 @@ glob@^5.0.3:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^6.0.4:
version "6.0.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
integrity sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=
dependencies:
inflight "^1.0.4"
inherits "2"
minimatch "2 || 3"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@~7.1.1:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
@ -6080,6 +6118,15 @@ graceful-fs@~1.2.0:
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=
gulp-audiosprite@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/gulp-audiosprite/-/gulp-audiosprite-1.1.0.tgz#1762d7fb9a669f372b33c1511e3402d79b624892"
integrity sha512-CwSfZjmNPlTyzcAFaE8RiKzh1dQFDLPPZMHshKwvGqNeTB86s30K8hMXGrrjFqHNF9xb0SUnXfbYT32MO4aNog==
dependencies:
audiosprite "*"
through2 "*"
vinyl "*"
gulp-cache@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/gulp-cache/-/gulp-cache-1.1.3.tgz#7c427670aad4d25364c3cc9c53e492b348190d27"
@ -7627,7 +7674,7 @@ isobject@^3.0.0, isobject@^3.0.1:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8=
isstream@~0.1.2:
isstream@0.1.x, isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
@ -8850,6 +8897,11 @@ minimist@^1.2.5:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
minimist@~0.0.1:
version "0.0.10"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
minipass@^2.2.1, minipass@^2.6.0, minipass@^2.6.4:
version "2.7.0"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.7.0.tgz#c01093a82287c8331f08f1075499fef124888796"
@ -9523,6 +9575,14 @@ opn@5.3.0:
dependencies:
is-wsl "^1.1.0"
optimist@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY=
dependencies:
minimist "~0.0.1"
wordwrap "~0.0.2"
optionator@^0.8.1, optionator@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
@ -10069,6 +10129,11 @@ pkg-dir@^3.0.0:
dependencies:
find-up "^3.0.0"
pkginfo@0.3.x:
version "0.3.1"
resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21"
integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=
plist@^3.0.0, plist@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c"
@ -12330,6 +12395,11 @@ stable@^0.1.8:
resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf"
integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==
stack-trace@0.0.x:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=
stat-mode@^0.2.0:
version "0.2.2"
resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502"
@ -12892,6 +12962,13 @@ through2-filter@^3.0.0:
through2 "~2.0.0"
xtend "~4.0.0"
through2@*, through2@3.0.1, through2@^3.0.0, through2@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a"
integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==
dependencies:
readable-stream "2 || 3"
through2@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.1.tgz#384e75314d49f32de12eebb8136b8eb6b5d59da9"
@ -12908,13 +12985,6 @@ through2@2.0.3:
readable-stream "^2.1.5"
xtend "~4.0.1"
through2@3.0.1, through2@^3.0.0, through2@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a"
integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==
dependencies:
readable-stream "2 || 3"
through2@^0.4.1, through2@~0.4.2:
version "0.4.2"
resolved "https://registry.yarnpkg.com/through2/-/through2-0.4.2.tgz#dbf5866031151ec8352bb6c4db64a2292a840b9b"
@ -13279,6 +13349,11 @@ unc-path-regex@^0.1.2:
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo=
underscore@~1.8.3:
version "1.8.3"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
integrity sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=
unicode-canonical-property-names-ecmascript@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"
@ -13644,6 +13719,18 @@ vinyl-sourcemaps-apply@^0.2.0, vinyl-sourcemaps-apply@^0.2.1:
dependencies:
source-map "^0.5.1"
vinyl@*, vinyl@^2.1.0, vinyl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==
dependencies:
clone "^2.1.1"
clone-buffer "^1.0.0"
clone-stats "^1.0.0"
cloneable-readable "^1.0.0"
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"
vinyl@^0.2.1, vinyl@~0.2.2:
version "0.2.3"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.2.3.tgz#bca938209582ec5a49ad538a00fa1f125e513252"
@ -13677,18 +13764,6 @@ vinyl@^1.0.0:
clone-stats "^0.0.1"
replace-ext "0.0.1"
vinyl@^2.1.0, vinyl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86"
integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==
dependencies:
clone "^2.1.1"
clone-buffer "^1.0.0"
clone-stats "^1.0.0"
cloneable-readable "^1.0.0"
remove-trailing-separator "^1.0.1"
replace-ext "^1.0.0"
vm-browserify@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.0.tgz#bd76d6a23323e2ca8ffa12028dc04559c75f9019"
@ -13910,6 +13985,24 @@ window-size@^0.2.0:
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075"
integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU=
winston@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/winston/-/winston-1.0.2.tgz#351c58e2323f8a4ca29a45195aa9aa3b4c35d76f"
integrity sha1-NRxY4jI/ikyimkUZWqmqO0w1128=
dependencies:
async "~1.0.0"
colors "1.0.x"
cycle "1.0.x"
eyes "0.1.x"
isstream "0.1.x"
pkginfo "0.3.x"
stack-trace "0.0.x"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"

View File

@ -575,6 +575,6 @@
"format": "RGBA8888",
"size": {"w":123,"h":380},
"scale": "0.1",
"smartupdate": "$TexturePacker:SmartUpdate:8c5d212e21c7c2fc8a13f1f0f59864ae:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
"smartupdate": "$TexturePacker:SmartUpdate:8070ac06277f5131500335ffd9170197:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
}
}

View File

@ -2,7 +2,7 @@
"sprites/belt/forward_0.png":
{
"frame": {"x":921,"y":2064,"w":100,"h":126},
"frame": {"x":1658,"y":1248,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -10,7 +10,7 @@
},
"sprites/belt/forward_1.png":
{
"frame": {"x":921,"y":2194,"w":100,"h":126},
"frame": {"x":1762,"y":1248,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -18,7 +18,7 @@
},
"sprites/belt/forward_2.png":
{
"frame": {"x":497,"y":2101,"w":100,"h":126},
"frame": {"x":1773,"y":1495,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -26,7 +26,7 @@
},
"sprites/belt/forward_3.png":
{
"frame": {"x":601,"y":2101,"w":100,"h":126},
"frame": {"x":1866,"y":1229,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -34,7 +34,7 @@
},
"sprites/belt/forward_4.png":
{
"frame": {"x":677,"y":3055,"w":100,"h":126},
"frame": {"x":1892,"y":1359,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -42,7 +42,7 @@
},
"sprites/belt/forward_5.png":
{
"frame": {"x":672,"y":3185,"w":100,"h":126},
"frame": {"x":1877,"y":1495,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -50,7 +50,7 @@
},
"sprites/belt/left_0.png":
{
"frame": {"x":779,"y":2353,"w":113,"h":113},
"frame": {"x":121,"y":1512,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -58,7 +58,7 @@
},
"sprites/belt/left_1.png":
{
"frame": {"x":896,"y":2442,"w":113,"h":113},
"frame": {"x":1873,"y":122,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -66,7 +66,7 @@
},
"sprites/belt/left_2.png":
{
"frame": {"x":742,"y":2470,"w":113,"h":113},
"frame": {"x":1659,"y":780,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -74,7 +74,7 @@
},
"sprites/belt/left_3.png":
{
"frame": {"x":859,"y":2559,"w":113,"h":113},
"frame": {"x":1659,"y":897,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -82,7 +82,7 @@
},
"sprites/belt/left_4.png":
{
"frame": {"x":742,"y":2587,"w":113,"h":113},
"frame": {"x":1659,"y":1014,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -90,7 +90,7 @@
},
"sprites/belt/left_5.png":
{
"frame": {"x":859,"y":2676,"w":113,"h":113},
"frame": {"x":1657,"y":1131,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -98,7 +98,7 @@
},
"sprites/belt/right_0.png":
{
"frame": {"x":703,"y":2704,"w":113,"h":113},
"frame": {"x":322,"y":1515,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -106,7 +106,7 @@
},
"sprites/belt/right_1.png":
{
"frame": {"x":697,"y":2821,"w":113,"h":113},
"frame": {"x":439,"y":1515,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -114,7 +114,7 @@
},
"sprites/belt/right_2.png":
{
"frame": {"x":697,"y":2938,"w":113,"h":113},
"frame": {"x":556,"y":1515,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -122,7 +122,7 @@
},
"sprites/belt/right_3.png":
{
"frame": {"x":189,"y":2873,"w":113,"h":113},
"frame": {"x":1658,"y":1378,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -130,7 +130,7 @@
},
"sprites/belt/right_4.png":
{
"frame": {"x":189,"y":2990,"w":113,"h":113},
"frame": {"x":1656,"y":1495,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -138,7 +138,7 @@
},
"sprites/belt/right_5.png":
{
"frame": {"x":189,"y":3107,"w":113,"h":113},
"frame": {"x":1775,"y":1378,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -146,7 +146,7 @@
},
"sprites/blueprints/belt_left.png":
{
"frame": {"x":897,"y":2324,"w":114,"h":114},
"frame": {"x":3,"y":1512,"w":114,"h":114},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":12,"w":114,"h":114},
@ -154,7 +154,7 @@
},
"sprites/blueprints/belt_right.png":
{
"frame": {"x":779,"y":2234,"w":114,"h":115},
"frame": {"x":1873,"y":3,"w":114,"h":115},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":12,"y":11,"w":114,"h":115},
@ -162,7 +162,7 @@
},
"sprites/blueprints/belt_top.png":
{
"frame": {"x":391,"y":2101,"w":102,"h":126},
"frame": {"x":1871,"y":239,"w":102,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":12,"y":0,"w":102,"h":126},
@ -170,7 +170,7 @@
},
"sprites/blueprints/cutter-quad.png":
{
"frame": {"x":3,"y":395,"w":730,"h":191},
"frame": {"x":735,"y":395,"w":730,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":23,"y":0,"w":730,"h":191},
@ -178,7 +178,7 @@
},
"sprites/blueprints/cutter.png":
{
"frame": {"x":352,"y":2819,"w":341,"h":191},
"frame": {"x":354,"y":1320,"w":341,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":23,"y":0,"w":341,"h":191},
@ -186,7 +186,7 @@
},
"sprites/blueprints/miner-chainable.png":
{
"frame": {"x":820,"y":2793,"w":182,"h":190},
"frame": {"x":1469,"y":395,"w":182,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":6,"y":0,"w":182,"h":190},
@ -194,7 +194,7 @@
},
"sprites/blueprints/miner.png":
{
"frame": {"x":814,"y":2987,"w":182,"h":190},
"frame": {"x":1655,"y":394,"w":182,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":6,"y":0,"w":182,"h":190},
@ -202,7 +202,7 @@
},
"sprites/blueprints/mixer.png":
{
"frame": {"x":391,"y":2430,"w":347,"h":191},
"frame": {"x":3,"y":1317,"w":347,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":18,"y":0,"w":347,"h":191},
@ -210,7 +210,7 @@
},
"sprites/blueprints/painter-double.png":
{
"frame": {"x":3,"y":1518,"w":384,"h":382},
"frame": {"x":3,"y":931,"w":384,"h":382},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":384,"h":382},
@ -218,7 +218,7 @@
},
"sprites/blueprints/painter-quad.png":
{
"frame": {"x":3,"y":3,"w":746,"h":192},
"frame": {"x":735,"y":3,"w":746,"h":192},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":0,"w":746,"h":192},
@ -226,7 +226,7 @@
},
"sprites/blueprints/painter.png":
{
"frame": {"x":391,"y":2234,"w":384,"h":192},
"frame": {"x":1485,"y":3,"w":384,"h":192},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":384,"h":192},
@ -234,7 +234,7 @@
},
"sprites/blueprints/rotater-ccw.png":
{
"frame": {"x":751,"y":394,"w":189,"h":191},
"frame": {"x":1279,"y":979,"w":189,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":0,"w":189,"h":191},
@ -242,7 +242,7 @@
},
"sprites/blueprints/rotater.png":
{
"frame": {"x":737,"y":589,"w":189,"h":191},
"frame": {"x":1279,"y":1174,"w":189,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":0,"w":189,"h":191},
@ -250,7 +250,7 @@
},
"sprites/blueprints/splitter-compact-inverse.png":
{
"frame": {"x":735,"y":784,"w":188,"h":182},
"frame": {"x":699,"y":1363,"w":188,"h":182},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":4,"w":188,"h":182},
@ -258,7 +258,7 @@
},
"sprites/blueprints/splitter-compact.png":
{
"frame": {"x":735,"y":1542,"w":185,"h":182},
"frame": {"x":1840,"y":588,"w":185,"h":182},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":4,"w":185,"h":182},
@ -266,7 +266,7 @@
},
"sprites/blueprints/splitter.png":
{
"frame": {"x":391,"y":1518,"w":340,"h":191},
"frame": {"x":391,"y":931,"w":340,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":23,"y":0,"w":340,"h":191},
@ -274,7 +274,7 @@
},
"sprites/blueprints/stacker.png":
{
"frame": {"x":3,"y":2484,"w":347,"h":191},
"frame": {"x":1123,"y":590,"w":347,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":18,"y":0,"w":347,"h":191},
@ -282,7 +282,7 @@
},
"sprites/blueprints/trash.png":
{
"frame": {"x":753,"y":3,"w":192,"h":192},
"frame": {"x":1083,"y":979,"w":192,"h":192},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {"x":0,"y":0,"w":192,"h":192},
@ -290,7 +290,7 @@
},
"sprites/blueprints/underground_belt_entry-tier2.png":
{
"frame": {"x":734,"y":2064,"w":183,"h":166},
"frame": {"x":1472,"y":933,"w":183,"h":166},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":26,"w":183,"h":166},
@ -298,7 +298,7 @@
},
"sprites/blueprints/underground_belt_entry.png":
{
"frame": {"x":3,"y":2873,"w":182,"h":148},
"frame": {"x":1470,"y":1423,"w":182,"h":148},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":6,"y":44,"w":182,"h":148},
@ -306,7 +306,7 @@
},
"sprites/blueprints/underground_belt_exit-tier2.png":
{
"frame": {"x":734,"y":1728,"w":185,"h":148},
"frame": {"x":1840,"y":774,"w":185,"h":148},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":0,"w":185,"h":148},
@ -314,7 +314,7 @@
},
"sprites/blueprints/underground_belt_exit.png":
{
"frame": {"x":3,"y":3025,"w":182,"h":148},
"frame": {"x":1776,"y":926,"w":182,"h":148},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":6,"y":0,"w":182,"h":148},
@ -322,7 +322,7 @@
},
"sprites/buildings/belt_left.png":
{
"frame": {"x":779,"y":2353,"w":113,"h":113},
"frame": {"x":121,"y":1512,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":13,"w":113,"h":113},
@ -330,7 +330,7 @@
},
"sprites/buildings/belt_right.png":
{
"frame": {"x":703,"y":2704,"w":113,"h":113},
"frame": {"x":322,"y":1515,"w":113,"h":113},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":13,"w":113,"h":113},
@ -338,7 +338,7 @@
},
"sprites/buildings/belt_top.png":
{
"frame": {"x":921,"y":2064,"w":100,"h":126},
"frame": {"x":1658,"y":1248,"w":100,"h":126},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":13,"y":0,"w":100,"h":126},
@ -346,7 +346,7 @@
},
"sprites/buildings/cutter-quad.png":
{
"frame": {"x":3,"y":1324,"w":728,"h":190},
"frame": {"x":3,"y":737,"w":728,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":24,"y":0,"w":728,"h":190},
@ -354,7 +354,7 @@
},
"sprites/buildings/cutter.png":
{
"frame": {"x":391,"y":1713,"w":339,"h":190},
"frame": {"x":740,"y":975,"w":339,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":24,"y":0,"w":339,"h":190},
@ -362,7 +362,7 @@
},
"sprites/buildings/hub.png":
{
"frame": {"x":3,"y":590,"w":728,"h":730},
"frame": {"x":3,"y":3,"w":728,"h":730},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":20,"y":22,"w":728,"h":730},
@ -370,7 +370,7 @@
},
"sprites/buildings/miner-chainable.png":
{
"frame": {"x":489,"y":3165,"w":179,"h":188},
"frame": {"x":1657,"y":588,"w":179,"h":188},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":8,"y":1,"w":179,"h":188},
@ -378,7 +378,7 @@
},
"sprites/buildings/miner.png":
{
"frame": {"x":306,"y":3165,"w":179,"h":189},
"frame": {"x":1474,"y":589,"w":179,"h":189},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":8,"y":0,"w":179,"h":189},
@ -386,7 +386,7 @@
},
"sprites/buildings/mixer.png":
{
"frame": {"x":354,"y":2625,"w":345,"h":190},
"frame": {"x":1123,"y":785,"w":345,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":19,"y":0,"w":345,"h":190},
@ -394,7 +394,7 @@
},
"sprites/buildings/painter-double.png":
{
"frame": {"x":3,"y":1904,"w":384,"h":381},
"frame": {"x":735,"y":590,"w":384,"h":381},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":384,"h":381},
@ -402,7 +402,7 @@
},
"sprites/buildings/painter-quad.png":
{
"frame": {"x":3,"y":199,"w":744,"h":192},
"frame": {"x":735,"y":199,"w":744,"h":192},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":8,"y":0,"w":744,"h":192},
@ -410,7 +410,7 @@
},
"sprites/buildings/painter.png":
{
"frame": {"x":3,"y":2289,"w":384,"h":191},
"frame": {"x":1483,"y":199,"w":384,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":0,"w":384,"h":191},
@ -418,7 +418,7 @@
},
"sprites/buildings/rotater-ccw.png":
{
"frame": {"x":735,"y":970,"w":187,"h":190},
"frame": {"x":891,"y":1363,"w":187,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":3,"y":0,"w":187,"h":190},
@ -426,7 +426,7 @@
},
"sprites/buildings/rotater.png":
{
"frame": {"x":735,"y":1164,"w":187,"h":190},
"frame": {"x":1082,"y":1370,"w":187,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":3,"y":0,"w":187,"h":190},
@ -434,7 +434,7 @@
},
"sprites/buildings/splitter-compact-inverse.png":
{
"frame": {"x":735,"y":1358,"w":187,"h":180},
"frame": {"x":1279,"y":1369,"w":187,"h":180},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":5,"w":187,"h":180},
@ -442,7 +442,7 @@
},
"sprites/buildings/splitter-compact.png":
{
"frame": {"x":734,"y":1880,"w":184,"h":180},
"frame": {"x":1841,"y":394,"w":184,"h":180},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":8,"y":5,"w":184,"h":180},
@ -450,7 +450,7 @@
},
"sprites/buildings/splitter.png":
{
"frame": {"x":391,"y":1907,"w":339,"h":190},
"frame": {"x":740,"y":1169,"w":339,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":24,"y":0,"w":339,"h":190},
@ -458,7 +458,7 @@
},
"sprites/buildings/stacker.png":
{
"frame": {"x":3,"y":2679,"w":345,"h":190},
"frame": {"x":391,"y":1126,"w":345,"h":190},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":19,"y":0,"w":345,"h":190},
@ -466,7 +466,7 @@
},
"sprites/buildings/trash.png":
{
"frame": {"x":751,"y":199,"w":192,"h":191},
"frame": {"x":1083,"y":1175,"w":192,"h":191},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":1,"w":192,"h":191},
@ -474,7 +474,7 @@
},
"sprites/buildings/underground_belt_entry-tier2.png":
{
"frame": {"x":3,"y":3177,"w":181,"h":165},
"frame": {"x":1472,"y":1103,"w":181,"h":165},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":27,"w":181,"h":165},
@ -482,7 +482,7 @@
},
"sprites/buildings/underground_belt_entry.png":
{
"frame": {"x":492,"y":3014,"w":181,"h":147},
"frame": {"x":1474,"y":782,"w":181,"h":147},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":45,"w":181,"h":147},
@ -490,7 +490,7 @@
},
"sprites/buildings/underground_belt_exit-tier2.png":
{
"frame": {"x":306,"y":3014,"w":182,"h":147},
"frame": {"x":1472,"y":1272,"w":182,"h":147},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":0,"w":182,"h":147},
@ -498,7 +498,7 @@
},
"sprites/buildings/underground_belt_exit.png":
{
"frame": {"x":781,"y":3181,"w":181,"h":147},
"frame": {"x":1776,"y":1078,"w":181,"h":147},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":0,"w":181,"h":147},
@ -506,7 +506,7 @@
},
"sprites/debug/acceptor_slot.png":
{
"frame": {"x":949,"y":3,"w":50,"h":64},
"frame": {"x":1776,"y":780,"w":50,"h":64},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":0,"w":50,"h":64},
@ -514,7 +514,7 @@
},
"sprites/debug/ejector_slot.png":
{
"frame": {"x":949,"y":71,"w":50,"h":64},
"frame": {"x":759,"y":1549,"w":50,"h":64},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":0,"w":50,"h":64},
@ -522,7 +522,7 @@
},
"sprites/map_overview/belt_forward.png":
{
"frame": {"x":949,"y":171,"w":24,"h":32},
"frame": {"x":1962,"y":926,"w":24,"h":32},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":4,"y":0,"w":24,"h":32},
@ -530,7 +530,7 @@
},
"sprites/map_overview/belt_left.png":
{
"frame": {"x":949,"y":139,"w":28,"h":28},
"frame": {"x":699,"y":1320,"w":28,"h":28},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":4,"w":28,"h":28},
@ -538,7 +538,7 @@
},
"sprites/map_overview/belt_right.png":
{
"frame": {"x":981,"y":139,"w":28,"h":28},
"frame": {"x":1991,"y":3,"w":28,"h":28},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":4,"y":4,"w":28,"h":28},
@ -546,7 +546,7 @@
},
"sprites/misc/deletion_marker.png":
{
"frame": {"x":930,"y":589,"w":82,"h":82},
"frame": {"x":673,"y":1549,"w":82,"h":82},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":7,"w":82,"h":82},
@ -554,7 +554,7 @@
},
"sprites/misc/slot_bad_arrow.png":
{
"frame": {"x":930,"y":589,"w":82,"h":82},
"frame": {"x":673,"y":1549,"w":82,"h":82},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":7,"y":7,"w":82,"h":82},
@ -562,7 +562,7 @@
},
"sprites/misc/slot_good_arrow.png":
{
"frame": {"x":930,"y":675,"w":80,"h":96},
"frame": {"x":238,"y":1512,"w":80,"h":96},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":8,"y":0,"w":80,"h":96},
@ -573,8 +573,8 @@
"version": "1.0",
"image": "atlas0_100.png",
"format": "RGBA8888",
"size": {"w":1024,"h":3357},
"size": {"w":2028,"h":1634},
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:8c5d212e21c7c2fc8a13f1f0f59864ae:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
"smartupdate": "$TexturePacker:SmartUpdate:8070ac06277f5131500335ffd9170197:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 673 KiB

After

Width:  |  Height:  |  Size: 701 KiB

View File

@ -575,6 +575,6 @@
"format": "RGBA8888",
"size": {"w":956,"h":244},
"scale": "0.25",
"smartupdate": "$TexturePacker:SmartUpdate:8c5d212e21c7c2fc8a13f1f0f59864ae:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
"smartupdate": "$TexturePacker:SmartUpdate:8070ac06277f5131500335ffd9170197:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
}
}

View File

@ -575,6 +575,6 @@
"format": "RGBA8888",
"size": {"w":493,"h":1783},
"scale": "0.5",
"smartupdate": "$TexturePacker:SmartUpdate:8c5d212e21c7c2fc8a13f1f0f59864ae:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
"smartupdate": "$TexturePacker:SmartUpdate:8070ac06277f5131500335ffd9170197:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
}
}

View File

@ -2,7 +2,7 @@
"sprites/belt/forward_0.png":
{
"frame": {"x":1769,"y":447,"w":77,"h":95},
"frame": {"x":1510,"y":560,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -10,7 +10,7 @@
},
"sprites/belt/forward_1.png":
{
"frame": {"x":1508,"y":560,"w":77,"h":95},
"frame": {"x":1681,"y":562,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -18,7 +18,7 @@
},
"sprites/belt/forward_2.png":
{
"frame": {"x":1769,"y":546,"w":77,"h":95},
"frame": {"x":1515,"y":725,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -26,7 +26,7 @@
},
"sprites/belt/forward_3.png":
{
"frame": {"x":1513,"y":725,"w":77,"h":95},
"frame": {"x":1515,"y":824,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -34,7 +34,7 @@
},
"sprites/belt/forward_4.png":
{
"frame": {"x":1514,"y":824,"w":77,"h":95},
"frame": {"x":1596,"y":652,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -42,7 +42,7 @@
},
"sprites/belt/forward_5.png":
{
"frame": {"x":1774,"y":645,"w":77,"h":95},
"frame": {"x":1596,"y":751,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -58,7 +58,7 @@
},
"sprites/belt/left_1.png":
{
"frame": {"x":1589,"y":562,"w":86,"h":86},
"frame": {"x":1769,"y":447,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":9,"w":86,"h":86},
@ -66,7 +66,7 @@
},
"sprites/belt/left_2.png":
{
"frame": {"x":1679,"y":562,"w":86,"h":86},
"frame": {"x":1769,"y":537,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":9,"w":86,"h":86},
@ -74,7 +74,7 @@
},
"sprites/belt/left_3.png":
{
"frame": {"x":1514,"y":923,"w":86,"h":86},
"frame": {"x":1591,"y":562,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":9,"w":86,"h":86},
@ -82,7 +82,7 @@
},
"sprites/belt/left_4.png":
{
"frame": {"x":1594,"y":652,"w":86,"h":86},
"frame": {"x":1514,"y":923,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":9,"w":86,"h":86},
@ -90,7 +90,7 @@
},
"sprites/belt/left_5.png":
{
"frame": {"x":1684,"y":652,"w":86,"h":86},
"frame": {"x":1762,"y":627,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":9,"w":86,"h":86},
@ -98,7 +98,7 @@
},
"sprites/belt/right_0.png":
{
"frame": {"x":1660,"y":742,"w":86,"h":86},
"frame": {"x":1677,"y":737,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -106,7 +106,7 @@
},
"sprites/belt/right_1.png":
{
"frame": {"x":1750,"y":744,"w":86,"h":86},
"frame": {"x":1767,"y":717,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -114,7 +114,7 @@
},
"sprites/belt/right_2.png":
{
"frame": {"x":1595,"y":832,"w":86,"h":86},
"frame": {"x":1677,"y":827,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -122,7 +122,7 @@
},
"sprites/belt/right_3.png":
{
"frame": {"x":1604,"y":922,"w":86,"h":86},
"frame": {"x":1767,"y":807,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -130,7 +130,7 @@
},
"sprites/belt/right_4.png":
{
"frame": {"x":1727,"y":834,"w":86,"h":86},
"frame": {"x":1767,"y":897,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -138,7 +138,7 @@
},
"sprites/belt/right_5.png":
{
"frame": {"x":1694,"y":924,"w":86,"h":86},
"frame": {"x":1604,"y":917,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -290,7 +290,7 @@
},
"sprites/blueprints/underground_belt_entry-tier2.png":
{
"frame": {"x":943,"y":888,"w":138,"h":125},
"frame": {"x":798,"y":883,"w":138,"h":125},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":4,"y":19,"w":138,"h":125},
@ -298,7 +298,7 @@
},
"sprites/blueprints/underground_belt_entry.png":
{
"frame": {"x":1372,"y":861,"w":138,"h":112},
"frame": {"x":1372,"y":873,"w":138,"h":112},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":4,"y":32,"w":138,"h":112},
@ -330,7 +330,7 @@
},
"sprites/buildings/belt_right.png":
{
"frame": {"x":1660,"y":742,"w":86,"h":86},
"frame": {"x":1677,"y":737,"w":86,"h":86},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":9,"w":86,"h":86},
@ -338,7 +338,7 @@
},
"sprites/buildings/belt_top.png":
{
"frame": {"x":1769,"y":447,"w":77,"h":95},
"frame": {"x":1510,"y":560,"w":77,"h":95},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":9,"y":0,"w":77,"h":95},
@ -434,7 +434,7 @@
},
"sprites/buildings/splitter-compact-inverse.png":
{
"frame": {"x":798,"y":883,"w":141,"h":136},
"frame": {"x":1365,"y":593,"w":141,"h":136},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":3,"w":141,"h":136},
@ -442,7 +442,7 @@
},
"sprites/buildings/splitter-compact.png":
{
"frame": {"x":1365,"y":593,"w":139,"h":136},
"frame": {"x":1372,"y":733,"w":139,"h":136},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":3,"w":139,"h":136},
@ -474,7 +474,7 @@
},
"sprites/buildings/underground_belt_entry-tier2.png":
{
"frame": {"x":1372,"y":733,"w":137,"h":124},
"frame": {"x":940,"y":888,"w":137,"h":124},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":20,"w":137,"h":124},
@ -498,7 +498,7 @@
},
"sprites/buildings/underground_belt_exit.png":
{
"frame": {"x":1085,"y":888,"w":137,"h":111},
"frame": {"x":1081,"y":888,"w":137,"h":111},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":0,"w":137,"h":111},
@ -506,7 +506,7 @@
},
"sprites/debug/acceptor_slot.png":
{
"frame": {"x":1685,"y":832,"w":38,"h":48},
"frame": {"x":1596,"y":850,"w":38,"h":48},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":0,"w":38,"h":48},
@ -514,7 +514,7 @@
},
"sprites/debug/ejector_slot.png":
{
"frame": {"x":1784,"y":924,"w":38,"h":48},
"frame": {"x":1694,"y":917,"w":38,"h":48},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":0,"w":38,"h":48},
@ -522,7 +522,7 @@
},
"sprites/map_overview/belt_forward.png":
{
"frame": {"x":3,"y":994,"w":20,"h":24},
"frame": {"x":1819,"y":3,"w":20,"h":24},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":0,"w":20,"h":24},
@ -530,7 +530,7 @@
},
"sprites/map_overview/belt_left.png":
{
"frame": {"x":1819,"y":3,"w":22,"h":22},
"frame": {"x":1638,"y":850,"w":22,"h":22},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":0,"y":2,"w":22,"h":22},
@ -538,7 +538,7 @@
},
"sprites/map_overview/belt_right.png":
{
"frame": {"x":1685,"y":884,"w":22,"h":22},
"frame": {"x":1694,"y":969,"w":22,"h":22},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":2,"y":2,"w":22,"h":22},
@ -546,7 +546,7 @@
},
"sprites/misc/deletion_marker.png":
{
"frame": {"x":1508,"y":659,"w":62,"h":62},
"frame": {"x":1510,"y":659,"w":62,"h":62},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":5,"w":62,"h":62},
@ -554,7 +554,7 @@
},
"sprites/misc/slot_bad_arrow.png":
{
"frame": {"x":1508,"y":659,"w":62,"h":62},
"frame": {"x":1510,"y":659,"w":62,"h":62},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":5,"w":62,"h":62},
@ -562,7 +562,7 @@
},
"sprites/misc/slot_good_arrow.png":
{
"frame": {"x":1594,"y":742,"w":62,"h":72},
"frame": {"x":1677,"y":661,"w":62,"h":72},
"rotated": false,
"trimmed": true,
"spriteSourceSize": {"x":5,"y":0,"w":62,"h":72},
@ -573,8 +573,8 @@
"version": "1.0",
"image": "atlas0_75.png",
"format": "RGBA8888",
"size": {"w":1854,"h":1022},
"size": {"w":1858,"h":1015},
"scale": "0.75",
"smartupdate": "$TexturePacker:SmartUpdate:8c5d212e21c7c2fc8a13f1f0f59864ae:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
"smartupdate": "$TexturePacker:SmartUpdate:8070ac06277f5131500335ffd9170197:b1a366c7a8668dcf22b90fcff95a3dba:f159918d23e5952766c6d23ab52278c6$"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 KiB

After

Width:  |  Height:  |  Size: 685 KiB

View File

@ -156,9 +156,9 @@
<key>maxTextureSize</key>
<QSize>
<key>width</key>
<int>4096</int>
<int>2048</int>
<key>height</key>
<int>4096</int>
<int>2048</int>
</QSize>
<key>fixedTextureSize</key>
<QSize>

2
src/js/.gitignore vendored
View File

@ -1 +1 @@
translations-built
built-temp

View File

@ -1,25 +1,33 @@
import { MusicInstanceInterface, SoundInstanceInterface, SoundInterface } from "../sound";
import { MusicInstanceInterface, SoundInstanceInterface, SoundInterface, MUSIC, SOUNDS } from "../sound";
import { cachebust } from "../../core/cachebust";
import { createLogger } from "../../core/logging";
import { globalConfig } from "../../core/config";
const { Howl, Howler } = require("howler");
const logger = createLogger("sound/browser");
class SoundInstance extends SoundInstanceInterface {
constructor(key, url) {
super(key, url);
const sprites = require("../../built-temp/sfx.json");
class SoundSpritesContainer {
constructor() {
this.howl = null;
this.loadingPromise = null;
}
load() {
return Promise.race([
if (this.loadingPromise) {
return this.loadingPromise;
}
return (this.loadingPromise = Promise.race([
new Promise((resolve, reject) => {
setTimeout(reject, G_IS_DEV ? 5000 : 60000);
}),
new Promise(resolve => {
this.howl = new Howl({
src: cachebust("res/sounds/" + this.url),
src: cachebust("res/sounds/sfx.mp3"),
sprite: sprites.sprite,
autoplay: false,
loop: false,
volume: 0,
@ -29,21 +37,21 @@ class SoundInstance extends SoundInstanceInterface {
resolve();
},
onloaderror: (id, err) => {
logger.warn("Sound", this.url, "failed to load:", id, err);
logger.warn("SFX failed to load:", id, err);
this.howl = null;
resolve();
},
onplayerror: (id, err) => {
logger.warn("Sound", this.url, "failed to play:", id, err);
logger.warn("SFX failed to play:", id, err);
},
});
}),
]);
]));
}
play(volume) {
play(volume, key) {
if (this.howl) {
const instance = this.howl.play();
const instance = this.howl.play(key);
this.howl.volume(volume, instance);
}
}
@ -56,6 +64,32 @@ class SoundInstance extends SoundInstanceInterface {
}
}
class WrappedSoundInstance extends SoundInstanceInterface {
/**
*
* @param {SoundSpritesContainer} spriteContainer
* @param {string} key
*/
constructor(spriteContainer, key) {
super(key, "sfx.mp3");
this.spriteContainer = spriteContainer;
}
/** @returns {Promise<void>} */
load() {
return this.spriteContainer.load();
}
play(volume) {
logger.error("TDO: PLAY", this.key);
this.spriteContainer.play(volume, this.key);
}
deinitialize() {
return this.spriteContainer.deinitialize();
}
}
class MusicInstance extends MusicInstanceInterface {
constructor(key, url) {
super(key, url);
@ -140,11 +174,32 @@ export class SoundImplBrowser extends SoundInterface {
Howler.html5PoolSize = 20;
Howler.pos(0, 0, 0);
super(app, SoundInstance, MusicInstance);
super(app, WrappedSoundInstance, MusicInstance);
}
initialize() {
return super.initialize();
this.sfxHandle = new SoundSpritesContainer();
// @ts-ignore
const keys = Object.values(SOUNDS);
keys.forEach(key => {
this.sounds[key] = new WrappedSoundInstance(this.sfxHandle, key);
});
console.log(this.sounds);
for (const musicKey in MUSIC) {
const musicPath = MUSIC[musicKey];
const music = new this.musicClass(musicKey, musicPath);
this.music[musicPath] = music;
}
this.musicMuted = this.app.settings.getAllSettings().musicMuted;
this.soundsMuted = this.app.settings.getAllSettings().soundsMuted;
if (G_IS_DEV && globalConfig.debug.disableMusic) {
this.musicMuted = true;
}
return Promise.resolve();
}
deinitialize() {

View File

@ -12,18 +12,18 @@ const logger = createLogger("sound");
export const SOUNDS = {
// Menu and such
uiClick: "ui/ui_click.mp3",
uiError: "ui/ui_error.mp3",
dialogError: "ui/dialog_error.mp3",
dialogOk: "ui/dialog_ok.mp3",
swishHide: "ui/ui_swish_hide.mp3",
swishShow: "ui/ui_swish_show.mp3",
badgeNotification: "ui/badge_notification.mp3",
uiClick: "ui_click",
uiError: "ui_error",
dialogError: "dialog_error",
dialogOk: "dialog_ok",
swishHide: "ui_swish_hide",
swishShow: "ui_swish_show",
badgeNotification: "badge_notification",
levelComplete: "ui/level_complete.mp3",
levelComplete: "level_complete",
placeBuilding: "game/place_building.mp3",
placeBelt: "game/place_belt.mp3",
placeBuilding: "place_building",
placeBelt: "place_belt",
};
export const MUSIC = {
@ -145,7 +145,9 @@ export class SoundInterface {
}
}
/** Deinits the sound */
/** Deinits the sound
* @returns {Promise<void>}
*/
deinitialize() {
const promises = [];
for (const key in this.sounds) {
@ -154,7 +156,8 @@ export class SoundInterface {
for (const key in this.music) {
promises.push(this.music[key].deinitialize());
}
return Promise.all(promises);
// @ts-ignore
return Promise.all(...promises);
}
/**

View File

@ -1,6 +1,6 @@
import { globalConfig } from "./core/config";
const baseTranslations = require("./translations-built/base-en.json");
const baseTranslations = require("./built-temp/base-en.json");
export const T = baseTranslations;