Merge remote-tracking branch 'origin/master'
# Conflicts: # src/css/resources.scss # src/js/game/hud/parts/buildings_toolbar.js # src/js/game/meta_building_registry.js # src/js/game/systems/item_processor.js # translations/base-en.yaml
@ -64,7 +64,7 @@ This project is based on ES5. Some ES2015 features are used but most of them are
|
|||||||
5. Add a constructor. **The constructor must be called with optional parameters only!** `new MyFancyComponent({})` should always work.
|
5. Add a constructor. **The constructor must be called with optional parameters only!** `new MyFancyComponent({})` should always work.
|
||||||
6. Add any props you need in the constructor.
|
6. Add any props you need in the constructor.
|
||||||
7. Add the component in `src/js/game/component_registry.js`
|
7. Add the component in `src/js/game/component_registry.js`
|
||||||
8. Add the componetn in `src/js/game/entity_components.js`
|
8. Add the component in `src/js/game/entity_components.js`
|
||||||
9. Done! You can use your component now
|
9. Done! You can use your component now
|
||||||
|
|
||||||
#### Adding a new building
|
#### Adding a new building
|
||||||
@ -81,7 +81,7 @@ This project is based on ES5. Some ES2015 features are used but most of them are
|
|||||||
8. In `translations/base-en.yaml` add it to two sections: `buildings.[my_building].XXX` (See other buildings) and also `keybindings.mappings.[my_building]`. Be sure to do it the same way as other buildings do!
|
8. In `translations/base-en.yaml` add it to two sections: `buildings.[my_building].XXX` (See other buildings) and also `keybindings.mappings.[my_building]`. Be sure to do it the same way as other buildings do!
|
||||||
9. Create a icon (128x128, [prefab](https://github.com/tobspr/shapez.io-artwork/blob/master/ui/toolbar-icons.psd)) for your building and save it in `res/ui/buildings_icons` with the id of your building
|
9. Create a icon (128x128, [prefab](https://github.com/tobspr/shapez.io-artwork/blob/master/ui/toolbar-icons.psd)) for your building and save it in `res/ui/buildings_icons` with the id of your building
|
||||||
10. Create a tutorial image (600x600) for your building and save it in `res/ui/building_tutorials`
|
10. Create a tutorial image (600x600) for your building and save it in `res/ui/building_tutorials`
|
||||||
11. In `src/css/icons.scss` add your building to `$buildings` as well as `$buildingAndVariants`
|
11. In `src/css/resources.scss` add your building to `$buildings` as well as `$buildingAndVariants`
|
||||||
12. Done! Optional: Add a new reward for unlocking your building at some point.
|
12. Done! Optional: Add a new reward for unlocking your building at some point.
|
||||||
|
|
||||||
#### Adding a new game system
|
#### Adding a new game system
|
||||||
@ -96,6 +96,6 @@ This project is based on ES5. Some ES2015 features are used but most of them are
|
|||||||
|
|
||||||
For most assets I use Adobe Photoshop, you can find them in `assets/`.
|
For most assets I use Adobe Photoshop, you can find them in `assets/`.
|
||||||
|
|
||||||
You will need a <a href="https://www.codeandweb.com/texturepacker" target="_blank">Texture Packer</a> license in order to regenerate the atlas. If you don't have one but want to contribute assets, let me know and I might compile it for you. I'm currently switching to an open source solution but I can't give an estimate when thats done.
|
You will need a <a href="https://www.codeandweb.com/texturepacker" target="_blank">Texture Packer</a> license in order to regenerate the atlas. If you don't have one but want to contribute assets, let me know and I might compile it for you. I'm currently switching to an open source solution but I can't give an estimate when that's done.
|
||||||
|
|
||||||
<img src="https://i.imgur.com/W25Fkl0.png" alt="shapez.io Screenshot">
|
<img src="https://i.imgur.com/W25Fkl0.png" alt="shapez.io Screenshot">
|
||||||
|
236
gulp/css.js
@ -1,99 +1,137 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const buildUtils = require("./buildutils");
|
const buildUtils = require("./buildutils");
|
||||||
|
|
||||||
function gulptasksCSS($, gulp, buildFolder, browserSync) {
|
function gulptasksCSS($, gulp, buildFolder, browserSync) {
|
||||||
// The assets plugin copies the files
|
// The assets plugin copies the files
|
||||||
const commitHash = buildUtils.getRevision();
|
const commitHash = buildUtils.getRevision();
|
||||||
const postcssAssetsPlugin = cachebust =>
|
const postcssAssetsPlugin = cachebust =>
|
||||||
$.postcssAssets({
|
$.postcssAssets({
|
||||||
loadPaths: [path.join(buildFolder, "res", "ui")],
|
loadPaths: [path.join(buildFolder, "res", "ui")],
|
||||||
basePath: buildFolder,
|
basePath: buildFolder,
|
||||||
baseUrl: ".",
|
baseUrl: ".",
|
||||||
cachebuster: cachebust
|
cachebuster: cachebust
|
||||||
? (filePath, urlPathname) => ({
|
? (filePath, urlPathname) => ({
|
||||||
pathname: buildUtils.cachebust(urlPathname, commitHash),
|
pathname: buildUtils.cachebust(urlPathname, commitHash),
|
||||||
})
|
})
|
||||||
: "",
|
: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Postcss configuration
|
// Postcss configuration
|
||||||
const postcssPlugins = (prod, { cachebust = false }) => {
|
const postcssPlugins = (prod, { cachebust = false }) => {
|
||||||
const plugins = [postcssAssetsPlugin(cachebust)];
|
const plugins = [postcssAssetsPlugin(cachebust)];
|
||||||
if (prod) {
|
if (prod) {
|
||||||
plugins.unshift(
|
plugins.unshift(
|
||||||
$.postcssUnprefix(),
|
$.postcssUnprefix(),
|
||||||
$.postcssPresetEnv({
|
$.postcssPresetEnv({
|
||||||
browsers: ["> 0.1%"],
|
browsers: ["> 0.1%"],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
plugins.push(
|
plugins.push(
|
||||||
$.cssMqpacker({
|
$.cssMqpacker({
|
||||||
sort: true,
|
sort: true,
|
||||||
}),
|
}),
|
||||||
$.cssnano({
|
$.cssnano({
|
||||||
preset: [
|
preset: [
|
||||||
"advanced",
|
"advanced",
|
||||||
{
|
{
|
||||||
cssDeclarationSorter: false,
|
cssDeclarationSorter: false,
|
||||||
discardUnused: true,
|
discardUnused: true,
|
||||||
mergeIdents: false,
|
mergeIdents: false,
|
||||||
reduceIdents: true,
|
reduceIdents: true,
|
||||||
zindex: true,
|
zindex: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
$.postcssRoundSubpixels()
|
$.postcssRoundSubpixels()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return plugins;
|
return plugins;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Performs linting on css
|
// Performs linting on css
|
||||||
gulp.task("css.lint", () => {
|
gulp.task("css.lint", () => {
|
||||||
return gulp
|
return gulp
|
||||||
.src(["../src/css/**/*.scss"])
|
.src(["../src/css/**/*.scss"])
|
||||||
.pipe($.sassLint({ configFile: ".sasslint.yml" }))
|
.pipe($.sassLint({ configFile: ".sasslint.yml" }))
|
||||||
.pipe($.sassLint.format())
|
.pipe($.sassLint.format())
|
||||||
.pipe($.sassLint.failOnError());
|
.pipe($.sassLint.failOnError());
|
||||||
});
|
});
|
||||||
|
|
||||||
// Builds the css in dev mode
|
function resourcesTask({ cachebust, isProd }) {
|
||||||
gulp.task("css.dev", () => {
|
return gulp
|
||||||
return gulp
|
.src("../src/css/main.scss", { cwd: __dirname })
|
||||||
.src(["../src/css/main.scss"])
|
.pipe($.plumber())
|
||||||
.pipe($.plumber())
|
.pipe($.sass.sync().on("error", $.sass.logError))
|
||||||
.pipe($.sass.sync().on("error", $.sass.logError))
|
.pipe(
|
||||||
.pipe($.postcss(postcssPlugins(false, {})))
|
$.postcss([
|
||||||
.pipe(gulp.dest(buildFolder))
|
$.postcssCriticalSplit({
|
||||||
.pipe(browserSync.stream());
|
blockTag: "@load-async",
|
||||||
});
|
}),
|
||||||
|
])
|
||||||
// Builds the css in production mode (=minified)
|
)
|
||||||
gulp.task("css.prod", () => {
|
.pipe($.rename("async-resources.css"))
|
||||||
return (
|
.pipe($.postcss(postcssPlugins(isProd, { cachebust })))
|
||||||
gulp
|
.pipe(gulp.dest(buildFolder))
|
||||||
.src("../src/css/main.scss", { cwd: __dirname })
|
.pipe(browserSync.stream());
|
||||||
.pipe($.plumber())
|
}
|
||||||
.pipe($.sass.sync({ outputStyle: "compressed" }).on("error", $.sass.logError))
|
|
||||||
.pipe($.postcss(postcssPlugins(true, { cachebust: true })))
|
// Builds the css resources
|
||||||
.pipe(gulp.dest(buildFolder))
|
gulp.task("css.resources.dev", () => {
|
||||||
);
|
return resourcesTask({ cachebust: false, isProd: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
// Builds the css in production mode (=minified), without cachebusting
|
// Builds the css resources in prod (=minified)
|
||||||
gulp.task("css.prod-standalone", () => {
|
gulp.task("css.resources.prod", () => {
|
||||||
return (
|
return resourcesTask({ cachebust: true, isProd: true });
|
||||||
gulp
|
});
|
||||||
.src("../src/css/main.scss", { cwd: __dirname })
|
|
||||||
.pipe($.plumber())
|
// Builds the css resources in prod (=minified), without cachebusting
|
||||||
.pipe($.sass.sync({ outputStyle: "compressed" }).on("error", $.sass.logError))
|
gulp.task("css.resources.prod-standalone", () => {
|
||||||
.pipe($.postcss(postcssPlugins(true, { cachebust: false })))
|
return resourcesTask({ cachebust: false, isProd: true });
|
||||||
.pipe(gulp.dest(buildFolder))
|
});
|
||||||
);
|
|
||||||
});
|
function mainTask({ cachebust, isProd }) {
|
||||||
}
|
return gulp
|
||||||
|
.src("../src/css/main.scss", { cwd: __dirname })
|
||||||
module.exports = {
|
.pipe($.plumber())
|
||||||
gulptasksCSS,
|
.pipe($.sass.sync().on("error", $.sass.logError))
|
||||||
};
|
.pipe(
|
||||||
|
$.postcss([
|
||||||
|
$.postcssCriticalSplit({
|
||||||
|
blockTag: "@load-async",
|
||||||
|
output: "rest",
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
)
|
||||||
|
.pipe($.postcss(postcssPlugins(isProd, { cachebust })))
|
||||||
|
.pipe(gulp.dest(buildFolder))
|
||||||
|
.pipe(browserSync.stream());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Builds the css main
|
||||||
|
gulp.task("css.main.dev", () => {
|
||||||
|
return mainTask({ cachebust: false, isProd: false });
|
||||||
|
});
|
||||||
|
|
||||||
|
// Builds the css main in prod (=minified)
|
||||||
|
gulp.task("css.main.prod", () => {
|
||||||
|
return mainTask({ cachebust: true, isProd: true });
|
||||||
|
});
|
||||||
|
|
||||||
|
// Builds the css main in prod (=minified), without cachebusting
|
||||||
|
gulp.task("css.main.prod-standalone", () => {
|
||||||
|
return mainTask({ cachebust: false, isProd: true });
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task("css.dev", gulp.parallel("css.main.dev", "css.resources.dev"));
|
||||||
|
gulp.task("css.prod", gulp.parallel("css.main.prod", "css.resources.prod"));
|
||||||
|
gulp.task(
|
||||||
|
"css.prod-standalone",
|
||||||
|
gulp.parallel("css.main.prod-standalone", "css.resources.prod-standalone")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
gulptasksCSS,
|
||||||
|
};
|
||||||
|
650
gulp/gulpfile.js
@ -1,325 +1,325 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
require("colors");
|
require("colors");
|
||||||
|
|
||||||
const gulp = require("gulp");
|
const gulp = require("gulp");
|
||||||
const browserSync = require("browser-sync").create({});
|
const browserSync = require("browser-sync").create({});
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const deleteEmpty = require("delete-empty");
|
const deleteEmpty = require("delete-empty");
|
||||||
const execSync = require("child_process").execSync;
|
const execSync = require("child_process").execSync;
|
||||||
|
|
||||||
const lfsOutput = execSync("git lfs install", { encoding: "utf-8" });
|
const lfsOutput = execSync("git lfs install", { encoding: "utf-8" });
|
||||||
if (!lfsOutput.toLowerCase().includes("git lfs initialized")) {
|
if (!lfsOutput.toLowerCase().includes("git lfs initialized")) {
|
||||||
console.error(`
|
console.error(`
|
||||||
Git LFS is not installed, unable to build.
|
Git LFS is not installed, unable to build.
|
||||||
|
|
||||||
To install Git LFS on Linux:
|
To install Git LFS on Linux:
|
||||||
- Arch:
|
- Arch:
|
||||||
sudo pacman -S git-lfs
|
sudo pacman -S git-lfs
|
||||||
- Debian/Ubuntu:
|
- Debian/Ubuntu:
|
||||||
sudo apt install git-lfs
|
sudo apt install git-lfs
|
||||||
|
|
||||||
For other systems, see:
|
For other systems, see:
|
||||||
https://github.com/git-lfs/git-lfs/wiki/Installation
|
https://github.com/git-lfs/git-lfs/wiki/Installation
|
||||||
`);
|
`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load other plugins dynamically
|
// Load other plugins dynamically
|
||||||
const $ = require("gulp-load-plugins")({
|
const $ = require("gulp-load-plugins")({
|
||||||
scope: ["devDependencies"],
|
scope: ["devDependencies"],
|
||||||
pattern: "*",
|
pattern: "*",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Check environment variables
|
// Check environment variables
|
||||||
|
|
||||||
const envVars = [
|
const envVars = [
|
||||||
"SHAPEZ_CLI_SERVER_HOST",
|
"SHAPEZ_CLI_SERVER_HOST",
|
||||||
// "SHAPEZ_CLI_PHONEGAP_KEY",
|
// "SHAPEZ_CLI_PHONEGAP_KEY",
|
||||||
"SHAPEZ_CLI_ALPHA_FTP_USER",
|
"SHAPEZ_CLI_ALPHA_FTP_USER",
|
||||||
"SHAPEZ_CLI_ALPHA_FTP_PW",
|
"SHAPEZ_CLI_ALPHA_FTP_PW",
|
||||||
"SHAPEZ_CLI_STAGING_FTP_USER",
|
"SHAPEZ_CLI_STAGING_FTP_USER",
|
||||||
"SHAPEZ_CLI_STAGING_FTP_PW",
|
"SHAPEZ_CLI_STAGING_FTP_PW",
|
||||||
"SHAPEZ_CLI_LIVE_FTP_USER",
|
"SHAPEZ_CLI_LIVE_FTP_USER",
|
||||||
"SHAPEZ_CLI_LIVE_FTP_PW",
|
"SHAPEZ_CLI_LIVE_FTP_PW",
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let i = 0; i < envVars.length; ++i) {
|
for (let i = 0; i < envVars.length; ++i) {
|
||||||
if (!process.env[envVars[i]]) {
|
if (!process.env[envVars[i]]) {
|
||||||
console.warn("Please set", envVars[i]);
|
console.warn("Please set", envVars[i]);
|
||||||
// process.exit(1);
|
// process.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseDir = path.join(__dirname, "..");
|
const baseDir = path.join(__dirname, "..");
|
||||||
const buildFolder = path.join(baseDir, "build");
|
const buildFolder = path.join(baseDir, "build");
|
||||||
|
|
||||||
const imgres = require("./image-resources");
|
const imgres = require("./image-resources");
|
||||||
imgres.gulptasksImageResources($, gulp, buildFolder);
|
imgres.gulptasksImageResources($, gulp, buildFolder);
|
||||||
|
|
||||||
const css = require("./css");
|
const css = require("./css");
|
||||||
css.gulptasksCSS($, gulp, buildFolder, browserSync);
|
css.gulptasksCSS($, gulp, buildFolder, browserSync);
|
||||||
|
|
||||||
const sounds = require("./sounds");
|
const sounds = require("./sounds");
|
||||||
sounds.gulptasksSounds($, gulp, buildFolder);
|
sounds.gulptasksSounds($, gulp, buildFolder);
|
||||||
|
|
||||||
const js = require("./js");
|
const js = require("./js");
|
||||||
js.gulptasksJS($, gulp, buildFolder, browserSync);
|
js.gulptasksJS($, gulp, buildFolder, browserSync);
|
||||||
|
|
||||||
const html = require("./html");
|
const html = require("./html");
|
||||||
html.gulptasksHTML($, gulp, buildFolder, browserSync);
|
html.gulptasksHTML($, gulp, buildFolder, browserSync);
|
||||||
|
|
||||||
const ftp = require("./ftp");
|
const ftp = require("./ftp");
|
||||||
ftp.gulptasksFTP($, gulp, buildFolder);
|
ftp.gulptasksFTP($, gulp, buildFolder);
|
||||||
|
|
||||||
const docs = require("./docs");
|
const docs = require("./docs");
|
||||||
docs.gulptasksDocs($, gulp, buildFolder);
|
docs.gulptasksDocs($, gulp, buildFolder);
|
||||||
|
|
||||||
const standalone = require("./standalone");
|
const standalone = require("./standalone");
|
||||||
standalone.gulptasksStandalone($, gulp, buildFolder);
|
standalone.gulptasksStandalone($, gulp, buildFolder);
|
||||||
|
|
||||||
const translations = require("./translations");
|
const translations = require("./translations");
|
||||||
translations.gulptasksTranslations($, gulp, buildFolder);
|
translations.gulptasksTranslations($, gulp, buildFolder);
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
// const cordova = require("./cordova");
|
// const cordova = require("./cordova");
|
||||||
// cordova.gulptasksCordova($, gulp, buildFolder);
|
// cordova.gulptasksCordova($, gulp, buildFolder);
|
||||||
|
|
||||||
///////////////////// BUILD TASKS /////////////////////
|
///////////////////// BUILD TASKS /////////////////////
|
||||||
|
|
||||||
// Cleans up everything
|
// Cleans up everything
|
||||||
gulp.task("utils.cleanBuildFolder", () => {
|
gulp.task("utils.cleanBuildFolder", () => {
|
||||||
return gulp.src(buildFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
return gulp.src(buildFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
||||||
});
|
});
|
||||||
gulp.task("utils.cleanBuildTempFolder", () => {
|
gulp.task("utils.cleanBuildTempFolder", () => {
|
||||||
return gulp
|
return gulp
|
||||||
.src(path.join(__dirname, "..", "src", "js", "built-temp"), { read: false, allowEmpty: true })
|
.src(path.join(__dirname, "..", "src", "js", "built-temp"), { read: false, allowEmpty: true })
|
||||||
.pipe($.clean({ force: true }));
|
.pipe($.clean({ force: true }));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("utils.cleanup", gulp.series("utils.cleanBuildFolder", "utils.cleanBuildTempFolder"));
|
gulp.task("utils.cleanup", gulp.series("utils.cleanBuildFolder", "utils.cleanBuildTempFolder"));
|
||||||
|
|
||||||
// Requires no uncomitted files
|
// Requires no uncomitted files
|
||||||
gulp.task("utils.requireCleanWorkingTree", cb => {
|
gulp.task("utils.requireCleanWorkingTree", cb => {
|
||||||
let output = $.trim(execSync("git status -su").toString("ascii")).replace(/\r/gi, "").split("\n");
|
let output = $.trim(execSync("git status -su").toString("ascii")).replace(/\r/gi, "").split("\n");
|
||||||
|
|
||||||
// Filter files which are OK to be untracked
|
// Filter files which are OK to be untracked
|
||||||
output = output
|
output = output
|
||||||
.map(x => x.replace(/[\r\n]+/gi, ""))
|
.map(x => x.replace(/[\r\n]+/gi, ""))
|
||||||
.filter(x => x.indexOf(".local.js") < 0)
|
.filter(x => x.indexOf(".local.js") < 0)
|
||||||
.filter(x => x.length > 0);
|
.filter(x => x.length > 0);
|
||||||
if (output.length > 0) {
|
if (output.length > 0) {
|
||||||
console.error("\n\nYou have unstaged changes, please commit everything first!");
|
console.error("\n\nYou have unstaged changes, please commit everything first!");
|
||||||
console.error("Unstaged files:");
|
console.error("Unstaged files:");
|
||||||
console.error(output.map(x => "'" + x + "'").join("\n"));
|
console.error(output.map(x => "'" + x + "'").join("\n"));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("utils.copyAdditionalBuildFiles", cb => {
|
gulp.task("utils.copyAdditionalBuildFiles", cb => {
|
||||||
const additionalFolder = path.join("additional_build_files");
|
const additionalFolder = path.join("additional_build_files");
|
||||||
const additionalSrcGlobs = [
|
const additionalSrcGlobs = [
|
||||||
path.join(additionalFolder, "**/*.*"),
|
path.join(additionalFolder, "**/*.*"),
|
||||||
path.join(additionalFolder, "**/.*"),
|
path.join(additionalFolder, "**/.*"),
|
||||||
path.join(additionalFolder, "**/*"),
|
path.join(additionalFolder, "**/*"),
|
||||||
];
|
];
|
||||||
|
|
||||||
return gulp.src(additionalSrcGlobs).pipe(gulp.dest(buildFolder));
|
return gulp.src(additionalSrcGlobs).pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Starts a webserver on the built directory (useful for testing prod build)
|
// Starts a webserver on the built directory (useful for testing prod build)
|
||||||
gulp.task("main.webserver", () => {
|
gulp.task("main.webserver", () => {
|
||||||
return gulp.src(buildFolder).pipe(
|
return gulp.src(buildFolder).pipe(
|
||||||
$.webserver({
|
$.webserver({
|
||||||
livereload: {
|
livereload: {
|
||||||
enable: true,
|
enable: true,
|
||||||
},
|
},
|
||||||
directoryListing: false,
|
directoryListing: false,
|
||||||
open: true,
|
open: true,
|
||||||
port: 3005,
|
port: 3005,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
function serve({ standalone }) {
|
function serve({ standalone }) {
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
server: buildFolder,
|
server: buildFolder,
|
||||||
port: 3005,
|
port: 3005,
|
||||||
ghostMode: {
|
ghostMode: {
|
||||||
clicks: false,
|
clicks: false,
|
||||||
scroll: false,
|
scroll: false,
|
||||||
location: false,
|
location: false,
|
||||||
forms: false,
|
forms: false,
|
||||||
},
|
},
|
||||||
logLevel: "info",
|
logLevel: "info",
|
||||||
logPrefix: "BS",
|
logPrefix: "BS",
|
||||||
online: false,
|
online: false,
|
||||||
xip: false,
|
xip: false,
|
||||||
notify: false,
|
notify: false,
|
||||||
reloadDebounce: 100,
|
reloadDebounce: 100,
|
||||||
reloadOnRestart: true,
|
reloadOnRestart: true,
|
||||||
watchEvents: ["add", "change"],
|
watchEvents: ["add", "change"],
|
||||||
});
|
});
|
||||||
|
|
||||||
// Watch .scss files, those trigger a css rebuild
|
// Watch .scss files, those trigger a css rebuild
|
||||||
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
|
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
|
||||||
|
|
||||||
// Watch .html files, those trigger a html rebuild
|
// Watch .html files, those trigger a html rebuild
|
||||||
gulp.watch("../src/**/*.html", gulp.series(standalone ? "html.standalone-dev" : "html.dev"));
|
gulp.watch("../src/**/*.html", gulp.series(standalone ? "html.standalone-dev" : "html.dev"));
|
||||||
|
|
||||||
// Watch sound files
|
// Watch sound files
|
||||||
// gulp.watch(["../res_raw/sounds/**/*.mp3", "../res_raw/sounds/**/*.wav"], gulp.series("sounds.dev"));
|
// gulp.watch(["../res_raw/sounds/**/*.mp3", "../res_raw/sounds/**/*.wav"], gulp.series("sounds.dev"));
|
||||||
|
|
||||||
// Watch translations
|
// Watch translations
|
||||||
gulp.watch("../translations/**/*.yaml", gulp.series("translations.convertToJson"));
|
gulp.watch("../translations/**/*.yaml", gulp.series("translations.convertToJson"));
|
||||||
|
|
||||||
gulp.watch(
|
gulp.watch(
|
||||||
["../res_raw/sounds/sfx/*.mp3", "../res_raw/sounds/sfx/*.wav"],
|
["../res_raw/sounds/sfx/*.mp3", "../res_raw/sounds/sfx/*.wav"],
|
||||||
gulp.series("sounds.sfx", "sounds.copy")
|
gulp.series("sounds.sfx", "sounds.copy")
|
||||||
);
|
);
|
||||||
gulp.watch(
|
gulp.watch(
|
||||||
["../res_raw/sounds/music/*.mp3", "../res_raw/sounds/music/*.wav"],
|
["../res_raw/sounds/music/*.mp3", "../res_raw/sounds/music/*.wav"],
|
||||||
gulp.series("sounds.music", "sounds.copy")
|
gulp.series("sounds.music", "sounds.copy")
|
||||||
);
|
);
|
||||||
|
|
||||||
// Watch resource files and copy them on change
|
// Watch resource files and copy them on change
|
||||||
gulp.watch(imgres.nonImageResourcesGlobs, gulp.series("imgres.copyNonImageResources"));
|
gulp.watch(imgres.nonImageResourcesGlobs, gulp.series("imgres.copyNonImageResources"));
|
||||||
gulp.watch(imgres.imageResourcesGlobs, gulp.series("imgres.copyImageResources"));
|
gulp.watch(imgres.imageResourcesGlobs, gulp.series("imgres.copyImageResources"));
|
||||||
|
|
||||||
// Watch .atlas files and recompile the atlas on change
|
// Watch .atlas files and recompile the atlas on change
|
||||||
gulp.watch("../res_built/atlas/*.json", gulp.series("imgres.atlas"));
|
gulp.watch("../res_built/atlas/*.json", gulp.series("imgres.atlas"));
|
||||||
|
|
||||||
// Watch the build folder and reload when anything changed
|
// Watch the build folder and reload when anything changed
|
||||||
const extensions = ["html", "js", "png", "gif", "jpg", "svg", "mp3", "ico", "woff2", "json"];
|
const extensions = ["html", "js", "png", "gif", "jpg", "svg", "mp3", "ico", "woff2", "json"];
|
||||||
gulp.watch(extensions.map(ext => path.join(buildFolder, "**", "*." + ext))).on("change", function (path) {
|
gulp.watch(extensions.map(ext => path.join(buildFolder, "**", "*." + ext))).on("change", function (path) {
|
||||||
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.watch("../src/js/built-temp/*.json").on("change", function (path) {
|
gulp.watch("../src/js/built-temp/*.json").on("change", function (path) {
|
||||||
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start the webpack watching server (Will never return)
|
// Start the webpack watching server (Will never return)
|
||||||
if (standalone) {
|
if (standalone) {
|
||||||
gulp.series("js.standalone-dev.watch")(() => true);
|
gulp.series("js.standalone-dev.watch")(() => true);
|
||||||
} else {
|
} else {
|
||||||
gulp.series("js.dev.watch")(() => true);
|
gulp.series("js.dev.watch")(() => true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////// RUNNABLE TASKS /////////////////////
|
///////////////////// RUNNABLE TASKS /////////////////////
|
||||||
|
|
||||||
// Pre and postbuild
|
// Pre and postbuild
|
||||||
gulp.task("step.baseResources", gulp.series("imgres.allOptimized"));
|
gulp.task("step.baseResources", gulp.series("imgres.allOptimized"));
|
||||||
gulp.task("step.deleteEmpty", cb => {
|
gulp.task("step.deleteEmpty", cb => {
|
||||||
deleteEmpty.sync(buildFolder);
|
deleteEmpty.sync(buildFolder);
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("step.postbuild", gulp.series("imgres.cleanupUnusedCssInlineImages", "step.deleteEmpty"));
|
gulp.task("step.postbuild", gulp.series("imgres.cleanupUnusedCssInlineImages", "step.deleteEmpty"));
|
||||||
|
|
||||||
// Builds everything (dev)
|
// Builds everything (dev)
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"build.dev",
|
"build.dev",
|
||||||
gulp.series(
|
gulp.series(
|
||||||
"utils.cleanup",
|
"utils.cleanup",
|
||||||
"utils.copyAdditionalBuildFiles",
|
"utils.copyAdditionalBuildFiles",
|
||||||
"imgres.atlas",
|
"imgres.atlas",
|
||||||
"sounds.dev",
|
"sounds.dev",
|
||||||
"imgres.copyImageResources",
|
"imgres.copyImageResources",
|
||||||
"imgres.copyNonImageResources",
|
"imgres.copyNonImageResources",
|
||||||
"translations.fullBuild",
|
"translations.fullBuild",
|
||||||
"css.dev",
|
"css.dev",
|
||||||
"html.dev"
|
"html.dev"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Builds everything (standalone -dev)
|
// Builds everything (standalone -dev)
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"build.standalone.dev",
|
"build.standalone.dev",
|
||||||
gulp.series(
|
gulp.series(
|
||||||
"utils.cleanup",
|
"utils.cleanup",
|
||||||
"imgres.atlas",
|
"imgres.atlas",
|
||||||
"sounds.dev",
|
"sounds.dev",
|
||||||
"imgres.copyImageResources",
|
"imgres.copyImageResources",
|
||||||
"imgres.copyNonImageResources",
|
"imgres.copyNonImageResources",
|
||||||
"translations.fullBuild",
|
"translations.fullBuild",
|
||||||
"js.standalone-dev",
|
"js.standalone-dev",
|
||||||
"css.dev",
|
"css.dev",
|
||||||
"html.standalone-dev"
|
"html.standalone-dev"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Builds everything (staging)
|
// Builds everything (staging)
|
||||||
gulp.task("step.staging.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.staging"));
|
gulp.task("step.staging.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.staging"));
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"step.staging.mainbuild",
|
"step.staging.mainbuild",
|
||||||
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code")
|
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code")
|
||||||
);
|
);
|
||||||
gulp.task("step.staging.all", gulp.series("step.staging.mainbuild", "css.prod", "html.staging"));
|
gulp.task("step.staging.all", gulp.series("step.staging.mainbuild", "css.prod", "html.staging"));
|
||||||
gulp.task("build.staging", gulp.series("utils.cleanup", "step.staging.all", "step.postbuild"));
|
gulp.task("build.staging", gulp.series("utils.cleanup", "step.staging.all", "step.postbuild"));
|
||||||
|
|
||||||
// Builds everything (prod)
|
// Builds everything (prod)
|
||||||
gulp.task("step.prod.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.prod"));
|
gulp.task("step.prod.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.prod"));
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"step.prod.mainbuild",
|
"step.prod.mainbuild",
|
||||||
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code")
|
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code")
|
||||||
);
|
);
|
||||||
gulp.task("step.prod.all", gulp.series("step.prod.mainbuild", "css.prod", "html.prod"));
|
gulp.task("step.prod.all", gulp.series("step.prod.mainbuild", "css.prod", "html.prod"));
|
||||||
gulp.task("build.prod", gulp.series("utils.cleanup", "step.prod.all", "step.postbuild"));
|
gulp.task("build.prod", gulp.series("utils.cleanup", "step.prod.all", "step.postbuild"));
|
||||||
|
|
||||||
// Builds everything (standalone-beta)
|
// Builds everything (standalone-beta)
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"step.standalone-beta.code",
|
"step.standalone-beta.code",
|
||||||
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-beta")
|
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-beta")
|
||||||
);
|
);
|
||||||
gulp.task("step.standalone-beta.mainbuild", gulp.parallel("step.baseResources", "step.standalone-beta.code"));
|
gulp.task("step.standalone-beta.mainbuild", gulp.parallel("step.baseResources", "step.standalone-beta.code"));
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"step.standalone-beta.all",
|
"step.standalone-beta.all",
|
||||||
gulp.series("step.standalone-beta.mainbuild", "css.prod-standalone", "html.standalone-beta")
|
gulp.series("step.standalone-beta.mainbuild", "css.prod-standalone", "html.standalone-beta")
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"build.standalone-beta",
|
"build.standalone-beta",
|
||||||
gulp.series("utils.cleanup", "step.standalone-beta.all", "step.postbuild")
|
gulp.series("utils.cleanup", "step.standalone-beta.all", "step.postbuild")
|
||||||
);
|
);
|
||||||
|
|
||||||
// Builds everything (standalone-prod)
|
// Builds everything (standalone-prod)
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"step.standalone-prod.code",
|
"step.standalone-prod.code",
|
||||||
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-prod")
|
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-prod")
|
||||||
);
|
);
|
||||||
gulp.task("step.standalone-prod.mainbuild", gulp.parallel("step.baseResources", "step.standalone-prod.code"));
|
gulp.task("step.standalone-prod.mainbuild", gulp.parallel("step.baseResources", "step.standalone-prod.code"));
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"step.standalone-prod.all",
|
"step.standalone-prod.all",
|
||||||
gulp.series("step.standalone-prod.mainbuild", "css.prod-standalone", "html.standalone-prod")
|
gulp.series("step.standalone-prod.mainbuild", "css.prod-standalone", "html.standalone-prod")
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"build.standalone-prod",
|
"build.standalone-prod",
|
||||||
gulp.series("utils.cleanup", "step.standalone-prod.all", "step.postbuild")
|
gulp.series("utils.cleanup", "step.standalone-prod.all", "step.postbuild")
|
||||||
);
|
);
|
||||||
|
|
||||||
// Deploying!
|
// Deploying!
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.deploy.alpha",
|
"main.deploy.alpha",
|
||||||
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.alpha")
|
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.alpha")
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.deploy.staging",
|
"main.deploy.staging",
|
||||||
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.staging")
|
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.staging")
|
||||||
);
|
);
|
||||||
gulp.task("main.deploy.prod", gulp.series("utils.requireCleanWorkingTree", "build.prod", "ftp.upload.prod"));
|
gulp.task("main.deploy.prod", gulp.series("utils.requireCleanWorkingTree", "build.prod", "ftp.upload.prod"));
|
||||||
gulp.task("main.deploy.all", gulp.series("main.deploy.staging", "main.deploy.prod"));
|
gulp.task("main.deploy.all", gulp.series("main.deploy.staging", "main.deploy.prod"));
|
||||||
gulp.task("main.standalone", gulp.series("build.standalone-prod", "standalone.package.prod"));
|
gulp.task("main.standalone", gulp.series("build.standalone-prod", "standalone.package.prod"));
|
||||||
|
|
||||||
// Live-development
|
// Live-development
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.serveDev",
|
"main.serveDev",
|
||||||
gulp.series("build.dev", () => serve({ standalone: false }))
|
gulp.series("build.dev", () => serve({ standalone: false }))
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.serveStandalone",
|
"main.serveStandalone",
|
||||||
gulp.series("build.standalone.dev", () => serve({ standalone: true }))
|
gulp.series("build.standalone.dev", () => serve({ standalone: true }))
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("default", gulp.series("main.serveDev"));
|
gulp.task("default", gulp.series("main.serveDev"));
|
||||||
|
584
gulp/html.js
@ -1,283 +1,301 @@
|
|||||||
const buildUtils = require("./buildutils");
|
const buildUtils = require("./buildutils");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
|
|
||||||
function computeIntegrityHash(fullPath, algorithm = "sha256") {
|
function computeIntegrityHash(fullPath, algorithm = "sha256") {
|
||||||
const file = fs.readFileSync(fullPath);
|
const file = fs.readFileSync(fullPath);
|
||||||
const hash = crypto.createHash(algorithm).update(file).digest("base64");
|
const hash = crypto.createHash(algorithm).update(file).digest("base64");
|
||||||
return algorithm + "-" + hash;
|
return algorithm + "-" + hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
function gulptasksHTML($, gulp, buildFolder) {
|
function gulptasksHTML($, gulp, buildFolder) {
|
||||||
const commitHash = buildUtils.getRevision();
|
const commitHash = buildUtils.getRevision();
|
||||||
async function buildHtml(
|
async function buildHtml(
|
||||||
apiUrl,
|
apiUrl,
|
||||||
{ analytics = false, standalone = false, app = false, integrity = true, enableCachebust = true }
|
{ analytics = false, standalone = false, app = false, integrity = true, enableCachebust = true }
|
||||||
) {
|
) {
|
||||||
function cachebust(url) {
|
function cachebust(url) {
|
||||||
if (enableCachebust) {
|
if (enableCachebust) {
|
||||||
return buildUtils.cachebust(url, commitHash);
|
return buildUtils.cachebust(url, commitHash);
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasLocalFiles = standalone || app;
|
const hasLocalFiles = standalone || app;
|
||||||
|
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/html/" + (standalone ? "index.standalone.html" : "index.html"))
|
.src("../src/html/" + (standalone ? "index.standalone.html" : "index.html"))
|
||||||
.pipe(
|
.pipe(
|
||||||
$.dom(/** @this {Document} **/ function () {
|
$.dom(
|
||||||
const document = this;
|
/** @this {Document} **/ function () {
|
||||||
|
const document = this;
|
||||||
// Preconnect to api
|
|
||||||
const prefetchLink = document.createElement("link");
|
// Preconnect to api
|
||||||
prefetchLink.rel = "preconnect";
|
const prefetchLink = document.createElement("link");
|
||||||
prefetchLink.href = apiUrl;
|
prefetchLink.rel = "preconnect";
|
||||||
prefetchLink.setAttribute("crossorigin", "anonymous");
|
prefetchLink.href = apiUrl;
|
||||||
document.head.appendChild(prefetchLink);
|
prefetchLink.setAttribute("crossorigin", "anonymous");
|
||||||
|
document.head.appendChild(prefetchLink);
|
||||||
// Append css
|
|
||||||
const css = document.createElement("link");
|
// Append css
|
||||||
css.rel = "stylesheet";
|
const css = document.createElement("link");
|
||||||
css.type = "text/css";
|
css.rel = "stylesheet";
|
||||||
css.media = "none";
|
css.type = "text/css";
|
||||||
css.setAttribute("onload", "this.media='all'");
|
css.media = "none";
|
||||||
css.href = cachebust("main.css");
|
css.setAttribute("onload", "this.media='all'");
|
||||||
if (integrity) {
|
css.href = cachebust("main.css");
|
||||||
css.setAttribute(
|
if (integrity) {
|
||||||
"integrity",
|
css.setAttribute(
|
||||||
computeIntegrityHash(path.join(buildFolder, "main.css"))
|
"integrity",
|
||||||
);
|
computeIntegrityHash(path.join(buildFolder, "main.css"))
|
||||||
}
|
);
|
||||||
document.head.appendChild(css);
|
}
|
||||||
|
document.head.appendChild(css);
|
||||||
if (app) {
|
|
||||||
// Append cordova link
|
// Append async css
|
||||||
const cdv = document.createElement("script");
|
const asyncCss = document.createElement("link");
|
||||||
cdv.src = "cordova.js";
|
asyncCss.rel = "stylesheet";
|
||||||
cdv.type = "text/javascript";
|
asyncCss.type = "text/css";
|
||||||
document.head.appendChild(cdv);
|
asyncCss.media = "none";
|
||||||
}
|
asyncCss.setAttribute("onload", "this.media='all'");
|
||||||
|
asyncCss.href = cachebust("async-resources.css");
|
||||||
// Google analytics
|
if (integrity) {
|
||||||
if (analytics) {
|
asyncCss.setAttribute(
|
||||||
const tagManagerScript = document.createElement("script");
|
"integrity",
|
||||||
tagManagerScript.src = "https://www.googletagmanager.com/gtag/js?id=UA-165342524-1";
|
computeIntegrityHash(path.join(buildFolder, "async-resources.css"))
|
||||||
tagManagerScript.setAttribute("async", "");
|
);
|
||||||
document.head.appendChild(tagManagerScript);
|
}
|
||||||
|
document.head.appendChild(asyncCss);
|
||||||
const initScript = document.createElement("script");
|
|
||||||
initScript.textContent = `
|
if (app) {
|
||||||
window.dataLayer = window.dataLayer || [];
|
// Append cordova link
|
||||||
function gtag(){dataLayer.push(arguments);}
|
const cdv = document.createElement("script");
|
||||||
gtag('js', new Date());
|
cdv.src = "cordova.js";
|
||||||
gtag('config', 'UA-165342524-1', { anonymize_ip: true });
|
cdv.type = "text/javascript";
|
||||||
`;
|
document.head.appendChild(cdv);
|
||||||
document.head.appendChild(initScript);
|
}
|
||||||
|
|
||||||
const abTestingScript = document.createElement("script");
|
// Google analytics
|
||||||
abTestingScript.setAttribute(
|
if (analytics) {
|
||||||
"src",
|
const tagManagerScript = document.createElement("script");
|
||||||
"https://www.googleoptimize.com/optimize.js?id=OPT-M5NHCV7"
|
tagManagerScript.src =
|
||||||
);
|
"https://www.googletagmanager.com/gtag/js?id=UA-165342524-1";
|
||||||
abTestingScript.setAttribute("async", "");
|
tagManagerScript.setAttribute("async", "");
|
||||||
document.head.appendChild(abTestingScript);
|
document.head.appendChild(tagManagerScript);
|
||||||
}
|
|
||||||
|
const initScript = document.createElement("script");
|
||||||
// Do not need to preload in app or standalone
|
initScript.textContent = `
|
||||||
if (!hasLocalFiles) {
|
window.dataLayer = window.dataLayer || [];
|
||||||
// Preload essentials
|
function gtag(){dataLayer.push(arguments);}
|
||||||
const preloads = ["fonts/GameFont.woff2"];
|
gtag('js', new Date());
|
||||||
|
gtag('config', 'UA-165342524-1', { anonymize_ip: true });
|
||||||
preloads.forEach(src => {
|
`;
|
||||||
const preloadLink = document.createElement("link");
|
document.head.appendChild(initScript);
|
||||||
preloadLink.rel = "preload";
|
|
||||||
preloadLink.href = cachebust("res/" + src);
|
const abTestingScript = document.createElement("script");
|
||||||
if (src.endsWith(".woff2")) {
|
abTestingScript.setAttribute(
|
||||||
preloadLink.setAttribute("crossorigin", "anonymous");
|
"src",
|
||||||
preloadLink.setAttribute("as", "font");
|
"https://www.googleoptimize.com/optimize.js?id=OPT-M5NHCV7"
|
||||||
} else {
|
);
|
||||||
preloadLink.setAttribute("as", "image");
|
abTestingScript.setAttribute("async", "");
|
||||||
}
|
document.head.appendChild(abTestingScript);
|
||||||
document.head.appendChild(preloadLink);
|
}
|
||||||
});
|
|
||||||
}
|
// Do not need to preload in app or standalone
|
||||||
|
if (!hasLocalFiles) {
|
||||||
const loadingSvg = `background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46YXV0bztiYWNrZ3JvdW5kOjAgMCIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgZGlzcGxheT0iYmxvY2siPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzM5Mzc0NyIgc3Ryb2tlLXdpZHRoPSIzIiByPSI0MiIgc3Ryb2tlLWRhc2hhcnJheT0iMTk3LjkyMDMzNzE3NjE1Njk4IDY3Ljk3MzQ0NTcyNTM4NTY2IiB0cmFuc2Zvcm09InJvdGF0ZSg0OC4yNjUgNTAgNTApIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iNS41NTU1NTU1NTU1NTU1NTVzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIi8+PC9jaXJjbGU+PC9zdmc+")`;
|
// Preload essentials
|
||||||
|
const preloads = ["fonts/GameFont.woff2"];
|
||||||
const loadingCss = `
|
|
||||||
@font-face {
|
preloads.forEach(src => {
|
||||||
font-family: 'GameFont';
|
const preloadLink = document.createElement("link");
|
||||||
font-style: normal;
|
preloadLink.rel = "preload";
|
||||||
font-weight: normal;
|
preloadLink.href = cachebust("res/" + src);
|
||||||
font-display: swap;
|
if (src.endsWith(".woff2")) {
|
||||||
src: url('${cachebust("res/fonts/GameFont.woff2")}') format('woff2');
|
preloadLink.setAttribute("crossorigin", "anonymous");
|
||||||
}
|
preloadLink.setAttribute("as", "font");
|
||||||
|
} else {
|
||||||
#ll_fp {
|
preloadLink.setAttribute("as", "image");
|
||||||
font-family: GameFont;
|
}
|
||||||
font-size: 14px;
|
document.head.appendChild(preloadLink);
|
||||||
position: fixed;
|
});
|
||||||
z-index: -1;
|
}
|
||||||
top: 0;
|
|
||||||
left: 0;
|
const loadingSvg = `background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46YXV0bztiYWNrZ3JvdW5kOjAgMCIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgZGlzcGxheT0iYmxvY2siPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzM5Mzc0NyIgc3Ryb2tlLXdpZHRoPSIzIiByPSI0MiIgc3Ryb2tlLWRhc2hhcnJheT0iMTk3LjkyMDMzNzE3NjE1Njk4IDY3Ljk3MzQ0NTcyNTM4NTY2IiB0cmFuc2Zvcm09InJvdGF0ZSg0OC4yNjUgNTAgNTApIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iNS41NTU1NTU1NTU1NTU1NTVzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIi8+PC9jaXJjbGU+PC9zdmc+")`;
|
||||||
opacity: 0.05;
|
|
||||||
}
|
const loadingCss = `
|
||||||
|
@font-face {
|
||||||
#ll_p {
|
font-family: 'GameFont';
|
||||||
display: flex;
|
font-style: normal;
|
||||||
position: fixed;
|
font-weight: normal;
|
||||||
z-index: 99999;
|
font-display: swap;
|
||||||
top: 0;
|
src: url('${cachebust("res/fonts/GameFont.woff2")}') format('woff2');
|
||||||
left: 0;
|
}
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
#ll_fp {
|
||||||
justify-content:
|
font-family: GameFont;
|
||||||
center;
|
font-size: 14px;
|
||||||
align-items: center;
|
position: fixed;
|
||||||
}
|
z-index: -1;
|
||||||
|
top: 0;
|
||||||
#ll_p > div {
|
left: 0;
|
||||||
position: absolute;
|
opacity: 0.05;
|
||||||
text-align: center;
|
}
|
||||||
bottom: 40px;
|
|
||||||
left: 20px;
|
#ll_p {
|
||||||
right: 20px;
|
display: flex;
|
||||||
color: #393747;
|
position: fixed;
|
||||||
font-family: 'GameFont', sans-serif;
|
z-index: 99999;
|
||||||
font-size: 20px;
|
top: 0;
|
||||||
}
|
left: 0;
|
||||||
|
right: 0;
|
||||||
#ll_p > span {
|
bottom: 0;
|
||||||
width: 60px;
|
justify-content:
|
||||||
height: 60px;
|
center;
|
||||||
display: inline-flex;
|
align-items: center;
|
||||||
background: center center / contain no-repeat;
|
}
|
||||||
${loadingSvg};
|
|
||||||
}
|
#ll_p > div {
|
||||||
`;
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
const style = document.createElement("style");
|
bottom: 40px;
|
||||||
style.setAttribute("type", "text/css");
|
left: 20px;
|
||||||
style.textContent = loadingCss;
|
right: 20px;
|
||||||
document.head.appendChild(style);
|
color: #393747;
|
||||||
|
font-family: 'GameFont', sans-serif;
|
||||||
// Append loader, but not in standalone (directly include bundle there)
|
font-size: 20px;
|
||||||
if (standalone) {
|
}
|
||||||
const bundleScript = document.createElement("script");
|
|
||||||
bundleScript.type = "text/javascript";
|
#ll_p > span {
|
||||||
bundleScript.src = "bundle.js";
|
width: 60px;
|
||||||
if (integrity) {
|
height: 60px;
|
||||||
bundleScript.setAttribute(
|
display: inline-flex;
|
||||||
"integrity",
|
background: center center / contain no-repeat;
|
||||||
computeIntegrityHash(path.join(buildFolder, "bundle.js"))
|
${loadingSvg};
|
||||||
);
|
}
|
||||||
}
|
`;
|
||||||
document.head.appendChild(bundleScript);
|
|
||||||
} else {
|
const style = document.createElement("style");
|
||||||
const loadJs = document.createElement("script");
|
style.setAttribute("type", "text/css");
|
||||||
loadJs.type = "text/javascript";
|
style.textContent = loadingCss;
|
||||||
let scriptContent = "";
|
document.head.appendChild(style);
|
||||||
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
|
|
||||||
scriptContent += `var bundleSrcTranspiled = '${cachebust(
|
// Append loader, but not in standalone (directly include bundle there)
|
||||||
"bundle-transpiled.js"
|
if (standalone) {
|
||||||
)}';\n`;
|
const bundleScript = document.createElement("script");
|
||||||
|
bundleScript.type = "text/javascript";
|
||||||
if (integrity) {
|
bundleScript.src = "bundle.js";
|
||||||
scriptContent +=
|
if (integrity) {
|
||||||
"var bundleIntegrity = '" +
|
bundleScript.setAttribute(
|
||||||
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
|
"integrity",
|
||||||
"';\n";
|
computeIntegrityHash(path.join(buildFolder, "bundle.js"))
|
||||||
scriptContent +=
|
);
|
||||||
"var bundleIntegrityTranspiled = '" +
|
}
|
||||||
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +
|
document.head.appendChild(bundleScript);
|
||||||
"';\n";
|
} else {
|
||||||
} else {
|
const loadJs = document.createElement("script");
|
||||||
scriptContent += "var bundleIntegrity = null;\n";
|
loadJs.type = "text/javascript";
|
||||||
scriptContent += "var bundleIntegrityTranspiled = null;\n";
|
let scriptContent = "";
|
||||||
}
|
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
|
||||||
|
scriptContent += `var bundleSrcTranspiled = '${cachebust(
|
||||||
scriptContent += fs.readFileSync("./bundle-loader.js").toString();
|
"bundle-transpiled.js"
|
||||||
loadJs.textContent = scriptContent;
|
)}';\n`;
|
||||||
document.head.appendChild(loadJs);
|
|
||||||
}
|
if (integrity) {
|
||||||
|
scriptContent +=
|
||||||
const bodyContent = `
|
"var bundleIntegrity = '" +
|
||||||
<div id="ll_fp">_</div>
|
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
|
||||||
<div id="ll_p">
|
"';\n";
|
||||||
<span></span>
|
scriptContent +=
|
||||||
<div>${hasLocalFiles ? "Loading" : "Downloading"} Game Files</div >
|
"var bundleIntegrityTranspiled = '" +
|
||||||
</div >
|
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +
|
||||||
`;
|
"';\n";
|
||||||
|
} else {
|
||||||
document.body.innerHTML = bodyContent;
|
scriptContent += "var bundleIntegrity = null;\n";
|
||||||
})
|
scriptContent += "var bundleIntegrityTranspiled = null;\n";
|
||||||
)
|
}
|
||||||
.pipe(
|
|
||||||
$.htmlmin({
|
scriptContent += fs.readFileSync("./bundle-loader.js").toString();
|
||||||
caseSensitive: true,
|
loadJs.textContent = scriptContent;
|
||||||
collapseBooleanAttributes: true,
|
document.head.appendChild(loadJs);
|
||||||
collapseInlineTagWhitespace: true,
|
}
|
||||||
collapseWhitespace: true,
|
|
||||||
preserveLineBreaks: true,
|
const bodyContent = `
|
||||||
minifyJS: true,
|
<div id="ll_fp">_</div>
|
||||||
minifyCSS: true,
|
<div id="ll_p">
|
||||||
quoteCharacter: '"',
|
<span></span>
|
||||||
useShortDoctype: true,
|
<div>${hasLocalFiles ? "Loading" : "Downloading"} Game Files</div >
|
||||||
})
|
</div >
|
||||||
)
|
`;
|
||||||
.pipe($.htmlBeautify())
|
|
||||||
.pipe($.rename("index.html"))
|
document.body.innerHTML = bodyContent;
|
||||||
.pipe(gulp.dest(buildFolder));
|
}
|
||||||
}
|
)
|
||||||
|
)
|
||||||
gulp.task("html.dev", () => {
|
.pipe(
|
||||||
return buildHtml("http://localhost:5005", {
|
$.htmlmin({
|
||||||
analytics: false,
|
caseSensitive: true,
|
||||||
integrity: false,
|
collapseBooleanAttributes: true,
|
||||||
enableCachebust: false,
|
collapseInlineTagWhitespace: true,
|
||||||
});
|
collapseWhitespace: true,
|
||||||
});
|
preserveLineBreaks: true,
|
||||||
|
minifyJS: true,
|
||||||
gulp.task("html.staging", () => {
|
minifyCSS: true,
|
||||||
return buildHtml("https://api-staging.shapez.io", {
|
quoteCharacter: '"',
|
||||||
analytics: true,
|
useShortDoctype: true,
|
||||||
});
|
})
|
||||||
});
|
)
|
||||||
|
.pipe($.htmlBeautify())
|
||||||
gulp.task("html.prod", () => {
|
.pipe($.rename("index.html"))
|
||||||
return buildHtml("https://analytics.shapez.io", {
|
.pipe(gulp.dest(buildFolder));
|
||||||
analytics: true,
|
}
|
||||||
});
|
|
||||||
});
|
gulp.task("html.dev", () => {
|
||||||
|
return buildHtml("http://localhost:5005", {
|
||||||
gulp.task("html.standalone-dev", () => {
|
analytics: false,
|
||||||
return buildHtml("https://localhost:5005", {
|
integrity: false,
|
||||||
analytics: false,
|
enableCachebust: false,
|
||||||
standalone: true,
|
});
|
||||||
integrity: false,
|
});
|
||||||
enableCachebust: false,
|
|
||||||
});
|
gulp.task("html.staging", () => {
|
||||||
});
|
return buildHtml("https://api-staging.shapez.io", {
|
||||||
|
analytics: true,
|
||||||
gulp.task("html.standalone-beta", () => {
|
});
|
||||||
return buildHtml("https://api-staging.shapez.io", {
|
});
|
||||||
analytics: false,
|
|
||||||
standalone: true,
|
gulp.task("html.prod", () => {
|
||||||
enableCachebust: false,
|
return buildHtml("https://analytics.shapez.io", {
|
||||||
});
|
analytics: true,
|
||||||
});
|
});
|
||||||
|
});
|
||||||
gulp.task("html.standalone-prod", () => {
|
|
||||||
return buildHtml("https://analytics.shapez.io", {
|
gulp.task("html.standalone-dev", () => {
|
||||||
analytics: false,
|
return buildHtml("https://localhost:5005", {
|
||||||
standalone: true,
|
analytics: false,
|
||||||
enableCachebust: false,
|
standalone: true,
|
||||||
});
|
integrity: false,
|
||||||
});
|
enableCachebust: false,
|
||||||
}
|
});
|
||||||
|
});
|
||||||
module.exports = {
|
|
||||||
gulptasksHTML,
|
gulp.task("html.standalone-beta", () => {
|
||||||
};
|
return buildHtml("https://api-staging.shapez.io", {
|
||||||
|
analytics: false,
|
||||||
|
standalone: true,
|
||||||
|
enableCachebust: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task("html.standalone-prod", () => {
|
||||||
|
return buildHtml("https://analytics.shapez.io", {
|
||||||
|
analytics: false,
|
||||||
|
standalone: true,
|
||||||
|
enableCachebust: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
gulptasksHTML,
|
||||||
|
};
|
||||||
|
@ -1,110 +1,111 @@
|
|||||||
{
|
{
|
||||||
"name": "builder",
|
"name": "builder",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "builder",
|
"description": "builder",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"gulp": "gulp"
|
"gulp": "gulp"
|
||||||
},
|
},
|
||||||
"author": "tobspr",
|
"author": "tobspr",
|
||||||
"license": "private",
|
"license": "private",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.9.0",
|
"@babel/core": "^7.9.0",
|
||||||
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
||||||
"@babel/plugin-transform-classes": "^7.5.5",
|
"@babel/plugin-transform-classes": "^7.5.5",
|
||||||
"@babel/preset-env": "^7.5.4",
|
"@babel/preset-env": "^7.5.4",
|
||||||
"@types/cordova": "^0.0.34",
|
"@types/cordova": "^0.0.34",
|
||||||
"@types/filesystem": "^0.0.29",
|
"@types/filesystem": "^0.0.29",
|
||||||
"@types/node": "^12.7.5",
|
"@types/node": "^12.7.5",
|
||||||
"ajv": "^6.10.2",
|
"ajv": "^6.10.2",
|
||||||
"audiosprite": "^0.7.2",
|
"audiosprite": "^0.7.2",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"browser-sync": "^2.26.10",
|
"browser-sync": "^2.26.10",
|
||||||
"circular-dependency-plugin": "^5.0.2",
|
"circular-dependency-plugin": "^5.0.2",
|
||||||
"circular-json": "^0.5.9",
|
"circular-json": "^0.5.9",
|
||||||
"clipboard-copy": "^3.1.0",
|
"clipboard-copy": "^3.1.0",
|
||||||
"colors": "^1.3.3",
|
"colors": "^1.3.3",
|
||||||
"core-js": "3",
|
"core-js": "3",
|
||||||
"crypto": "^1.0.1",
|
"crypto": "^1.0.1",
|
||||||
"cssnano-preset-advanced": "^4.0.7",
|
"cssnano-preset-advanced": "^4.0.7",
|
||||||
"delete-empty": "^3.0.0",
|
"delete-empty": "^3.0.0",
|
||||||
"email-validator": "^2.0.4",
|
"email-validator": "^2.0.4",
|
||||||
"eslint": "^5.9.0",
|
"eslint": "^5.9.0",
|
||||||
"fastdom": "^1.0.9",
|
"fastdom": "^1.0.9",
|
||||||
"flatted": "^2.0.1",
|
"flatted": "^2.0.1",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"gulp-audiosprite": "^1.1.0",
|
"gulp-audiosprite": "^1.1.0",
|
||||||
"howler": "^2.1.2",
|
"howler": "^2.1.2",
|
||||||
"html-loader": "^0.5.5",
|
"html-loader": "^0.5.5",
|
||||||
"ignore-loader": "^0.1.2",
|
"ignore-loader": "^0.1.2",
|
||||||
"lz-string": "^1.4.4",
|
"lz-string": "^1.4.4",
|
||||||
"markdown-loader": "^5.1.0",
|
"markdown-loader": "^5.1.0",
|
||||||
"node-sri": "^1.1.1",
|
"node-sri": "^1.1.1",
|
||||||
"phonegap-plugin-mobile-accessibility": "^1.0.5",
|
"phonegap-plugin-mobile-accessibility": "^1.0.5",
|
||||||
"promise-polyfill": "^8.1.0",
|
"promise-polyfill": "^8.1.0",
|
||||||
"query-string": "^6.8.1",
|
"query-string": "^6.8.1",
|
||||||
"rusha": "^0.8.13",
|
"rusha": "^0.8.13",
|
||||||
"serialize-error": "^3.0.0",
|
"serialize-error": "^3.0.0",
|
||||||
"strictdom": "^1.0.1",
|
"strictdom": "^1.0.1",
|
||||||
"string-replace-webpack-plugin": "^0.1.3",
|
"string-replace-webpack-plugin": "^0.1.3",
|
||||||
"terser-webpack-plugin": "^1.1.0",
|
"terser-webpack-plugin": "^1.1.0",
|
||||||
"through2": "^3.0.1",
|
"through2": "^3.0.1",
|
||||||
"uglify-template-string-loader": "^1.1.0",
|
"uglify-template-string-loader": "^1.1.0",
|
||||||
"unused-files-webpack-plugin": "^3.4.0",
|
"unused-files-webpack-plugin": "^3.4.0",
|
||||||
"webpack": "^4.43.0",
|
"webpack": "^4.43.0",
|
||||||
"webpack-cli": "^3.1.0",
|
"webpack-cli": "^3.1.0",
|
||||||
"webpack-deep-scope-plugin": "^1.6.0",
|
"webpack-deep-scope-plugin": "^1.6.0",
|
||||||
"webpack-plugin-replace": "^1.1.1",
|
"webpack-plugin-replace": "^1.1.1",
|
||||||
"webpack-strip-block": "^0.2.0",
|
"webpack-strip-block": "^0.2.0",
|
||||||
"whatwg-fetch": "^3.0.0",
|
"whatwg-fetch": "^3.0.0",
|
||||||
"worker-loader": "^2.0.0"
|
"worker-loader": "^2.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^9.4.3",
|
"autoprefixer": "^9.4.3",
|
||||||
"babel-plugin-closure-elimination": "^1.3.0",
|
"babel-plugin-closure-elimination": "^1.3.0",
|
||||||
"babel-plugin-console-source": "^2.0.2",
|
"babel-plugin-console-source": "^2.0.2",
|
||||||
"babel-plugin-danger-remove-unused-import": "^1.1.2",
|
"babel-plugin-danger-remove-unused-import": "^1.1.2",
|
||||||
"css-mqpacker": "^7.0.0",
|
"css-mqpacker": "^7.0.0",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"electron-packager": "^14.0.6",
|
"postcss-critical-split": "^2.5.3",
|
||||||
"faster.js": "^1.1.0",
|
"electron-packager": "^14.0.6",
|
||||||
"glob": "^7.1.3",
|
"faster.js": "^1.1.0",
|
||||||
"gulp": "^4.0.2",
|
"glob": "^7.1.3",
|
||||||
"gulp-cache": "^1.1.3",
|
"gulp": "^4.0.2",
|
||||||
"gulp-cached": "^1.1.1",
|
"gulp-cache": "^1.1.3",
|
||||||
"gulp-clean": "^0.4.0",
|
"gulp-cached": "^1.1.1",
|
||||||
"gulp-dom": "^1.0.0",
|
"gulp-clean": "^0.4.0",
|
||||||
"gulp-flatten": "^0.4.0",
|
"gulp-dom": "^1.0.0",
|
||||||
"gulp-fluent-ffmpeg": "^2.0.0",
|
"gulp-flatten": "^0.4.0",
|
||||||
"gulp-html-beautify": "^1.0.1",
|
"gulp-fluent-ffmpeg": "^2.0.0",
|
||||||
"gulp-htmlmin": "^5.0.1",
|
"gulp-html-beautify": "^1.0.1",
|
||||||
"gulp-if": "^3.0.0",
|
"gulp-htmlmin": "^5.0.1",
|
||||||
"gulp-imagemin": "^7.1.0",
|
"gulp-if": "^3.0.0",
|
||||||
"gulp-load-plugins": "^2.0.3",
|
"gulp-imagemin": "^7.1.0",
|
||||||
"gulp-phonegap-build": "^0.1.5",
|
"gulp-load-plugins": "^2.0.3",
|
||||||
"gulp-plumber": "^1.2.1",
|
"gulp-phonegap-build": "^0.1.5",
|
||||||
"gulp-pngquant": "^1.0.13",
|
"gulp-plumber": "^1.2.1",
|
||||||
"gulp-postcss": "^8.0.0",
|
"gulp-pngquant": "^1.0.13",
|
||||||
"gulp-rename": "^2.0.0",
|
"gulp-postcss": "^8.0.0",
|
||||||
"gulp-sass": "^4.1.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-sass-lint": "^1.4.0",
|
"gulp-sass": "^4.1.0",
|
||||||
"gulp-sftp": "git+https://git@github.com/webksde/gulp-sftp",
|
"gulp-sass-lint": "^1.4.0",
|
||||||
"gulp-terser": "^1.2.0",
|
"gulp-sftp": "git+https://git@github.com/webksde/gulp-sftp",
|
||||||
"gulp-webserver": "^0.9.1",
|
"gulp-terser": "^1.2.0",
|
||||||
"gulp-yaml": "^2.0.4",
|
"gulp-webserver": "^0.9.1",
|
||||||
"imagemin-gifsicle": "^7.0.0",
|
"gulp-yaml": "^2.0.4",
|
||||||
"imagemin-jpegtran": "^7.0.0",
|
"imagemin-gifsicle": "^7.0.0",
|
||||||
"imagemin-pngquant": "^9.0.0",
|
"imagemin-jpegtran": "^7.0.0",
|
||||||
"jimp": "^0.6.1",
|
"imagemin-pngquant": "^9.0.0",
|
||||||
"js-yaml": "^3.13.1",
|
"jimp": "^0.6.1",
|
||||||
"postcss-assets": "^5.0.0",
|
"js-yaml": "^3.13.1",
|
||||||
"postcss-preset-env": "^6.5.0",
|
"postcss-assets": "^5.0.0",
|
||||||
"postcss-round-subpixels": "^1.2.0",
|
"postcss-preset-env": "^6.5.0",
|
||||||
"postcss-unprefix": "^2.1.3",
|
"postcss-round-subpixels": "^1.2.0",
|
||||||
"sass-unused": "^0.3.0",
|
"postcss-unprefix": "^2.1.3",
|
||||||
"strip-json-comments": "^3.0.1",
|
"sass-unused": "^0.3.0",
|
||||||
"trim": "^0.0.1",
|
"strip-json-comments": "^3.0.1",
|
||||||
"webpack-stream": "^5.2.1",
|
"trim": "^0.0.1",
|
||||||
"yaml-loader": "^0.6.0"
|
"webpack-stream": "^5.2.1",
|
||||||
}
|
"yaml-loader": "^0.6.0"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -16,6 +16,12 @@ function gulptasksSounds($, gulp, buildFolder) {
|
|||||||
cacheDirName: "shapezio-precompiled-sounds",
|
cacheDirName: "shapezio-precompiled-sounds",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getFileCacheValue(file) {
|
||||||
|
const { _isVinyl, base, cwd, contents, history, stat, path } = file;
|
||||||
|
const encodedContents = Buffer.from(contents).toString('base64');
|
||||||
|
return { _isVinyl, base, cwd, contents: encodedContents, history, stat, path };
|
||||||
|
}
|
||||||
|
|
||||||
// Encodes the game music
|
// Encodes the game music
|
||||||
gulp.task("sounds.music", () => {
|
gulp.task("sounds.music", () => {
|
||||||
return gulp
|
return gulp
|
||||||
@ -34,6 +40,7 @@ function gulptasksSounds($, gulp, buildFolder) {
|
|||||||
{
|
{
|
||||||
name: "music",
|
name: "music",
|
||||||
fileCache,
|
fileCache,
|
||||||
|
value: getFileCacheValue,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -58,6 +65,7 @@ function gulptasksSounds($, gulp, buildFolder) {
|
|||||||
{
|
{
|
||||||
name: "music-high-quality",
|
name: "music-high-quality",
|
||||||
fileCache,
|
fileCache,
|
||||||
|
value: getFileCacheValue,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
27116
gulp/yarn.lock
BIN
res/ui/building_icons/balancer.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.4 KiB |
BIN
res/ui/building_icons/storage.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.0 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
BIN
res/ui/building_tutorials/balancer-splitter.png
Normal file
After Width: | Height: | Size: 79 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
BIN
res/ui/building_tutorials/constant_signal.png
Normal file
After Width: | Height: | Size: 242 KiB |
BIN
res/ui/building_tutorials/display.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
res/ui/building_tutorials/lever.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
res/ui/building_tutorials/reader.png
Normal file
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 34 KiB |
BIN
res/ui/building_tutorials/rotater-rotate180.png
Normal file
After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 57 KiB |
BIN
res/ui/building_tutorials/storage.png
Normal file
After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 825 B After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 756 B After Width: | Height: | Size: 2.2 KiB |
BIN
res/ui/icons/enum_selector_white.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 731 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 728 B After Width: | Height: | Size: 385 B |
BIN
res/ui/icons/settings_menu_exit.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
res/ui/icons/settings_menu_play.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
res/ui/icons/settings_menu_settings.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
res/ui/icons/shop_active.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 927 B After Width: | Height: | Size: 546 B |
BIN
res/ui/icons/toggle_unit.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 278 KiB |
Before Width: | Height: | Size: 677 KiB After Width: | Height: | Size: 701 KiB |
@ -197,7 +197,7 @@
|
|||||||
<key>scaleMode</key>
|
<key>scaleMode</key>
|
||||||
<enum type="ScaleMode">Smooth</enum>
|
<enum type="ScaleMode">Smooth</enum>
|
||||||
<key>extrude</key>
|
<key>extrude</key>
|
||||||
<uint>2</uint>
|
<uint>3</uint>
|
||||||
<key>trimThreshold</key>
|
<key>trimThreshold</key>
|
||||||
<uint>2</uint>
|
<uint>2</uint>
|
||||||
<key>trimMargin</key>
|
<key>trimMargin</key>
|
||||||
@ -257,6 +257,10 @@
|
|||||||
<key type="filename">sprites/belt/built/right_7.png</key>
|
<key type="filename">sprites/belt/built/right_7.png</key>
|
||||||
<key type="filename">sprites/belt/built/right_8.png</key>
|
<key type="filename">sprites/belt/built/right_8.png</key>
|
||||||
<key type="filename">sprites/belt/built/right_9.png</key>
|
<key type="filename">sprites/belt/built/right_9.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/balancer-merger-inverse.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/balancer-merger.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/balancer-splitter-inverse.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/balancer-splitter.png</key>
|
||||||
<key type="filename">sprites/blueprints/constant_signal.png</key>
|
<key type="filename">sprites/blueprints/constant_signal.png</key>
|
||||||
<key type="filename">sprites/blueprints/display.png</key>
|
<key type="filename">sprites/blueprints/display.png</key>
|
||||||
<key type="filename">sprites/blueprints/lever.png</key>
|
<key type="filename">sprites/blueprints/lever.png</key>
|
||||||
@ -269,24 +273,26 @@
|
|||||||
<key type="filename">sprites/blueprints/miner.png</key>
|
<key type="filename">sprites/blueprints/miner.png</key>
|
||||||
<key type="filename">sprites/blueprints/reader.png</key>
|
<key type="filename">sprites/blueprints/reader.png</key>
|
||||||
<key type="filename">sprites/blueprints/rotater-ccw.png</key>
|
<key type="filename">sprites/blueprints/rotater-ccw.png</key>
|
||||||
<key type="filename">sprites/blueprints/rotater-fl.png</key>
|
<key type="filename">sprites/blueprints/rotater-rotate180.png</key>
|
||||||
<key type="filename">sprites/blueprints/rotater.png</key>
|
<key type="filename">sprites/blueprints/rotater.png</key>
|
||||||
<key type="filename">sprites/blueprints/splitter-compact-inverse.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/splitter-compact-merge-inverse.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/splitter-compact-merge.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/splitter-compact.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/trash.png</key>
|
<key type="filename">sprites/blueprints/trash.png</key>
|
||||||
<key type="filename">sprites/blueprints/underground_belt_entry-tier2.png</key>
|
<key type="filename">sprites/blueprints/underground_belt_entry-tier2.png</key>
|
||||||
<key type="filename">sprites/blueprints/underground_belt_entry.png</key>
|
<key type="filename">sprites/blueprints/underground_belt_entry.png</key>
|
||||||
<key type="filename">sprites/blueprints/underground_belt_exit-tier2.png</key>
|
<key type="filename">sprites/blueprints/underground_belt_exit-tier2.png</key>
|
||||||
<key type="filename">sprites/blueprints/underground_belt_exit.png</key>
|
<key type="filename">sprites/blueprints/underground_belt_exit.png</key>
|
||||||
<key type="filename">sprites/blueprints/virtual_processor-analyzer.png</key>
|
<key type="filename">sprites/blueprints/virtual_processor-analyzer.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/virtual_processor-painter.png</key>
|
||||||
<key type="filename">sprites/blueprints/virtual_processor-rotater.png</key>
|
<key type="filename">sprites/blueprints/virtual_processor-rotater.png</key>
|
||||||
<key type="filename">sprites/blueprints/virtual_processor-shapecompare.png</key>
|
<key type="filename">sprites/blueprints/virtual_processor-shapecompare.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/virtual_processor-stacker.png</key>
|
||||||
<key type="filename">sprites/blueprints/virtual_processor-unstacker.png</key>
|
<key type="filename">sprites/blueprints/virtual_processor-unstacker.png</key>
|
||||||
<key type="filename">sprites/blueprints/virtual_processor.png</key>
|
<key type="filename">sprites/blueprints/virtual_processor.png</key>
|
||||||
<key type="filename">sprites/blueprints/wire_tunnel-coating.png</key>
|
<key type="filename">sprites/blueprints/wire_tunnel-coating.png</key>
|
||||||
<key type="filename">sprites/blueprints/wire_tunnel.png</key>
|
<key type="filename">sprites/blueprints/wire_tunnel.png</key>
|
||||||
|
<key type="filename">sprites/buildings/balancer-merger-inverse.png</key>
|
||||||
|
<key type="filename">sprites/buildings/balancer-merger.png</key>
|
||||||
|
<key type="filename">sprites/buildings/balancer-splitter-inverse.png</key>
|
||||||
|
<key type="filename">sprites/buildings/balancer-splitter.png</key>
|
||||||
<key type="filename">sprites/buildings/constant_signal.png</key>
|
<key type="filename">sprites/buildings/constant_signal.png</key>
|
||||||
<key type="filename">sprites/buildings/display.png</key>
|
<key type="filename">sprites/buildings/display.png</key>
|
||||||
<key type="filename">sprites/buildings/lever.png</key>
|
<key type="filename">sprites/buildings/lever.png</key>
|
||||||
@ -298,18 +304,16 @@
|
|||||||
<key type="filename">sprites/buildings/miner-chainable.png</key>
|
<key type="filename">sprites/buildings/miner-chainable.png</key>
|
||||||
<key type="filename">sprites/buildings/reader.png</key>
|
<key type="filename">sprites/buildings/reader.png</key>
|
||||||
<key type="filename">sprites/buildings/rotater-ccw.png</key>
|
<key type="filename">sprites/buildings/rotater-ccw.png</key>
|
||||||
<key type="filename">sprites/buildings/rotater-fl.png</key>
|
<key type="filename">sprites/buildings/rotater-rotate180.png</key>
|
||||||
<key type="filename">sprites/buildings/splitter-compact-inverse.png</key>
|
|
||||||
<key type="filename">sprites/buildings/splitter-compact-merge-inverse.png</key>
|
|
||||||
<key type="filename">sprites/buildings/splitter-compact-merge.png</key>
|
|
||||||
<key type="filename">sprites/buildings/splitter-compact.png</key>
|
|
||||||
<key type="filename">sprites/buildings/underground_belt_entry-tier2.png</key>
|
<key type="filename">sprites/buildings/underground_belt_entry-tier2.png</key>
|
||||||
<key type="filename">sprites/buildings/underground_belt_entry.png</key>
|
<key type="filename">sprites/buildings/underground_belt_entry.png</key>
|
||||||
<key type="filename">sprites/buildings/underground_belt_exit-tier2.png</key>
|
<key type="filename">sprites/buildings/underground_belt_exit-tier2.png</key>
|
||||||
<key type="filename">sprites/buildings/underground_belt_exit.png</key>
|
<key type="filename">sprites/buildings/underground_belt_exit.png</key>
|
||||||
<key type="filename">sprites/buildings/virtual_processor-analyzer.png</key>
|
<key type="filename">sprites/buildings/virtual_processor-analyzer.png</key>
|
||||||
|
<key type="filename">sprites/buildings/virtual_processor-painter.png</key>
|
||||||
<key type="filename">sprites/buildings/virtual_processor-rotater.png</key>
|
<key type="filename">sprites/buildings/virtual_processor-rotater.png</key>
|
||||||
<key type="filename">sprites/buildings/virtual_processor-shapecompare.png</key>
|
<key type="filename">sprites/buildings/virtual_processor-shapecompare.png</key>
|
||||||
|
<key type="filename">sprites/buildings/virtual_processor-stacker.png</key>
|
||||||
<key type="filename">sprites/buildings/virtual_processor-unstacker.png</key>
|
<key type="filename">sprites/buildings/virtual_processor-unstacker.png</key>
|
||||||
<key type="filename">sprites/buildings/virtual_processor.png</key>
|
<key type="filename">sprites/buildings/virtual_processor.png</key>
|
||||||
<key type="filename">sprites/buildings/wire_tunnel-coating.png</key>
|
<key type="filename">sprites/buildings/wire_tunnel-coating.png</key>
|
||||||
@ -346,6 +350,30 @@
|
|||||||
<key>scale9FromFile</key>
|
<key>scale9FromFile</key>
|
||||||
<false/>
|
<false/>
|
||||||
</struct>
|
</struct>
|
||||||
|
<key type="filename">sprites/blueprints/balancer.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/cutter.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/filter.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/mixer.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/painter-mirrored.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/painter.png</key>
|
||||||
|
<key type="filename">sprites/blueprints/stacker.png</key>
|
||||||
|
<key type="filename">sprites/buildings/balancer.png</key>
|
||||||
|
<key type="filename">sprites/buildings/filter.png</key>
|
||||||
|
<key type="filename">sprites/buildings/painter-mirrored.png</key>
|
||||||
|
<struct type="IndividualSpriteSettings">
|
||||||
|
<key>pivotPoint</key>
|
||||||
|
<point_f>0.5,0.5</point_f>
|
||||||
|
<key>spriteScale</key>
|
||||||
|
<double>1</double>
|
||||||
|
<key>scale9Enabled</key>
|
||||||
|
<false/>
|
||||||
|
<key>scale9Borders</key>
|
||||||
|
<rect>96,48,192,96</rect>
|
||||||
|
<key>scale9Paddings</key>
|
||||||
|
<rect>96,48,192,96</rect>
|
||||||
|
<key>scale9FromFile</key>
|
||||||
|
<false/>
|
||||||
|
</struct>
|
||||||
<key type="filename">sprites/blueprints/belt_left.png</key>
|
<key type="filename">sprites/blueprints/belt_left.png</key>
|
||||||
<key type="filename">sprites/blueprints/belt_right.png</key>
|
<key type="filename">sprites/blueprints/belt_right.png</key>
|
||||||
<key type="filename">sprites/blueprints/belt_top.png</key>
|
<key type="filename">sprites/blueprints/belt_top.png</key>
|
||||||
@ -392,29 +420,6 @@
|
|||||||
<key>scale9FromFile</key>
|
<key>scale9FromFile</key>
|
||||||
<false/>
|
<false/>
|
||||||
</struct>
|
</struct>
|
||||||
<key type="filename">sprites/blueprints/cutter.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/filter.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/mixer.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/painter-mirrored.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/painter.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/splitter.png</key>
|
|
||||||
<key type="filename">sprites/blueprints/stacker.png</key>
|
|
||||||
<key type="filename">sprites/buildings/filter.png</key>
|
|
||||||
<key type="filename">sprites/buildings/painter-mirrored.png</key>
|
|
||||||
<struct type="IndividualSpriteSettings">
|
|
||||||
<key>pivotPoint</key>
|
|
||||||
<point_f>0.5,0.5</point_f>
|
|
||||||
<key>spriteScale</key>
|
|
||||||
<double>1</double>
|
|
||||||
<key>scale9Enabled</key>
|
|
||||||
<false/>
|
|
||||||
<key>scale9Borders</key>
|
|
||||||
<rect>96,48,192,96</rect>
|
|
||||||
<key>scale9Paddings</key>
|
|
||||||
<rect>96,48,192,96</rect>
|
|
||||||
<key>scale9FromFile</key>
|
|
||||||
<false/>
|
|
||||||
</struct>
|
|
||||||
<key type="filename">sprites/blueprints/painter-double.png</key>
|
<key type="filename">sprites/blueprints/painter-double.png</key>
|
||||||
<key type="filename">sprites/blueprints/trash-storage.png</key>
|
<key type="filename">sprites/blueprints/trash-storage.png</key>
|
||||||
<key type="filename">sprites/buildings/painter-double.png</key>
|
<key type="filename">sprites/buildings/painter-double.png</key>
|
||||||
@ -435,7 +440,6 @@
|
|||||||
<key type="filename">sprites/buildings/cutter.png</key>
|
<key type="filename">sprites/buildings/cutter.png</key>
|
||||||
<key type="filename">sprites/buildings/mixer.png</key>
|
<key type="filename">sprites/buildings/mixer.png</key>
|
||||||
<key type="filename">sprites/buildings/painter.png</key>
|
<key type="filename">sprites/buildings/painter.png</key>
|
||||||
<key type="filename">sprites/buildings/splitter.png</key>
|
|
||||||
<key type="filename">sprites/buildings/stacker.png</key>
|
<key type="filename">sprites/buildings/stacker.png</key>
|
||||||
<struct type="IndividualSpriteSettings">
|
<struct type="IndividualSpriteSettings">
|
||||||
<key>pivotPoint</key>
|
<key>pivotPoint</key>
|
||||||
@ -503,6 +507,28 @@
|
|||||||
<key>scale9FromFile</key>
|
<key>scale9FromFile</key>
|
||||||
<false/>
|
<false/>
|
||||||
</struct>
|
</struct>
|
||||||
|
<key type="filename">sprites/colors/blue.png</key>
|
||||||
|
<key type="filename">sprites/colors/cyan.png</key>
|
||||||
|
<key type="filename">sprites/colors/green.png</key>
|
||||||
|
<key type="filename">sprites/colors/purple.png</key>
|
||||||
|
<key type="filename">sprites/colors/red.png</key>
|
||||||
|
<key type="filename">sprites/colors/uncolored.png</key>
|
||||||
|
<key type="filename">sprites/colors/white.png</key>
|
||||||
|
<key type="filename">sprites/colors/yellow.png</key>
|
||||||
|
<struct type="IndividualSpriteSettings">
|
||||||
|
<key>pivotPoint</key>
|
||||||
|
<point_f>0.5,0.5</point_f>
|
||||||
|
<key>spriteScale</key>
|
||||||
|
<double>1</double>
|
||||||
|
<key>scale9Enabled</key>
|
||||||
|
<false/>
|
||||||
|
<key>scale9Borders</key>
|
||||||
|
<rect>18,18,36,36</rect>
|
||||||
|
<key>scale9Paddings</key>
|
||||||
|
<rect>18,18,36,36</rect>
|
||||||
|
<key>scale9FromFile</key>
|
||||||
|
<false/>
|
||||||
|
</struct>
|
||||||
<key type="filename">sprites/debug/acceptor_slot.png</key>
|
<key type="filename">sprites/debug/acceptor_slot.png</key>
|
||||||
<key type="filename">sprites/debug/ejector_slot.png</key>
|
<key type="filename">sprites/debug/ejector_slot.png</key>
|
||||||
<key type="filename">sprites/misc/hub_direction_indicator.png</key>
|
<key type="filename">sprites/misc/hub_direction_indicator.png</key>
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
BIN
res_raw/sprites/blueprints/balancer.png
Normal file
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 18 KiB |
BIN
res_raw/sprites/blueprints/rotater-rotate180.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 23 KiB |
BIN
res_raw/sprites/blueprints/storage.png
Normal file
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 44 KiB |
BIN
res_raw/sprites/blueprints/virtual_processor-painter.png
Normal file
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
res_raw/sprites/buildings/balancer.png
Normal file
After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 13 KiB |
BIN
res_raw/sprites/buildings/rotater-rotate180.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 19 KiB |
BIN
res_raw/sprites/buildings/storage.png
Normal file
After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 28 KiB |
BIN
res_raw/sprites/buildings/virtual_processor-painter.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 11 KiB |
BIN
res_raw/sprites/colors/blue.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
res_raw/sprites/colors/cyan.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
res_raw/sprites/colors/green.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
res_raw/sprites/colors/purple.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
res_raw/sprites/colors/red.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
res_raw/sprites/colors/uncolored.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
res_raw/sprites/colors/white.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
res_raw/sprites/colors/yellow.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 14 KiB |
@ -50,7 +50,6 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: rgba($mainBgColor, 0.9) uiResource("loading.svg") center center / #{D(60px)} no-repeat;
|
|
||||||
@include InlineAnimation(0.2s ease-in-out) {
|
@include InlineAnimation(0.2s ease-in-out) {
|
||||||
0% {
|
0% {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@ -59,6 +58,11 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: rgba($mainBgColor, 0.9) uiResource("loading.svg") center center / #{D(60px)} no-repeat;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|