mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Remove old Layer3D scripts
This commit is contained in:
parent
a39cfbda01
commit
ce93fd9549
4 changed files with 2 additions and 109 deletions
|
@ -1,58 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
const webpack = require('webpack');
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
|
||||
context: `${__dirname}/../src/`,
|
||||
|
||||
entry: {
|
||||
phaser: './phaser.js',
|
||||
'phaser.min': './phaser.js'
|
||||
},
|
||||
|
||||
output: {
|
||||
path: `${__dirname}/../dist/`,
|
||||
filename: '[name]3d.js',
|
||||
library: 'Phaser',
|
||||
libraryTarget: 'umd',
|
||||
umdNamedDefine: true
|
||||
},
|
||||
|
||||
performance: { hints: false },
|
||||
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new UglifyJSPlugin({
|
||||
include: /\.min\.js$/,
|
||||
parallel: true,
|
||||
sourceMap: false,
|
||||
uglifyOptions: {
|
||||
compress: true,
|
||||
ie8: false,
|
||||
ecma: 5,
|
||||
output: {comments: false},
|
||||
warnings: false
|
||||
},
|
||||
warningsFilter: () => false
|
||||
})
|
||||
]
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"typeof CANVAS_RENDERER": JSON.stringify(true),
|
||||
"typeof WEBGL_RENDERER": JSON.stringify(true),
|
||||
"typeof EXPERIMENTAL": JSON.stringify(false),
|
||||
"typeof PLUGIN_3D": JSON.stringify(true),
|
||||
"typeof PLUGIN_CAMERA3D": JSON.stringify(false),
|
||||
"typeof PLUGIN_FBINSTANT": JSON.stringify(false),
|
||||
"typeof FEATURE_SOUND": JSON.stringify(true)
|
||||
}),
|
||||
|
||||
new CleanWebpackPlugin()
|
||||
]
|
||||
};
|
|
@ -4,10 +4,10 @@
|
|||
"release": "Miku",
|
||||
"description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.",
|
||||
"author": "Richard Davey <rich@photonstorm.com> (http://www.photonstorm.com)",
|
||||
"homepage": "http://phaser.io",
|
||||
"homepage": "https://phaser.io",
|
||||
"bugs": "https://github.com/photonstorm/phaser/issues",
|
||||
"license": "MIT",
|
||||
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
|
||||
"licenseUrl": "https://www.opensource.org/licenses/mit-license.php",
|
||||
"main": "./src/phaser.js",
|
||||
"types": "./types/phaser.d.ts",
|
||||
"browser": "./dist/phaser.js",
|
||||
|
@ -23,7 +23,6 @@
|
|||
"buildfb": "webpack --config config/webpack.fb.config.js",
|
||||
"watchfb": "webpack --config config/webpack.fb.config.js --watch",
|
||||
"dist": "webpack --config config/webpack.dist.config.js",
|
||||
"dist3d": "webpack --config config/webpack.3d.dist.config.js",
|
||||
"distfb": "webpack --config config/webpack.fb.dist.config.js",
|
||||
"distfull": "npm run dist && npm run distfb",
|
||||
"plugin.cam3d": "webpack --config plugins/camera3d/webpack.config.js",
|
||||
|
@ -44,7 +43,6 @@
|
|||
"lintfix": "eslint --config .eslintrc.json \"src/**/*.js\" --fix",
|
||||
"sloc": "node-sloc \"./src\" --include-extensions \"js\"",
|
||||
"bundleshaders": "node scripts/bundle-shaders.js",
|
||||
"bundle3dshaders": "node scripts/bundle-layer3d-shaders.js",
|
||||
"build-tsgen": "cd scripts/tsgen && tsc",
|
||||
"tsgen": "cd scripts/tsgen && jsdoc -c jsdoc-tsd.conf.json",
|
||||
"test-ts": "cd scripts/tsgen/test && tsc --build tsconfig.json > output.txt",
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
let fs = require('fs-extra');
|
||||
|
||||
let srcdir = './src/layer3d/shaders/chunks/glsl/';
|
||||
let destdir = './src/layer3d/shaders/chunks/';
|
||||
|
||||
let files = fs.readdirSync(srcdir);
|
||||
|
||||
files.forEach(function (file) {
|
||||
|
||||
let shaderSource = fs.readFileSync(srcdir + file, 'utf8');
|
||||
let shaderFilename = file.substr(0, file.lastIndexOf('.')) + '.js';
|
||||
|
||||
let outputSource = 'module.exports = [\n';
|
||||
|
||||
let lines = shaderSource.split('\n');
|
||||
|
||||
for (var i = 0; i < lines.length; i++)
|
||||
{
|
||||
let line = lines[i].trimRight();
|
||||
|
||||
if (i < lines.length - 1)
|
||||
{
|
||||
outputSource = outputSource.concat(" '" + line + "',\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
outputSource = outputSource.concat(" '" + line + "'\n");
|
||||
}
|
||||
}
|
||||
|
||||
outputSource = outputSource.concat('].join(\'\\n\');\n');
|
||||
|
||||
fs.writeFile(destdir + shaderFilename, outputSource, function (error) {
|
||||
|
||||
if (error)
|
||||
{
|
||||
throw error;
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('Saved', shaderFilename);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
|
@ -11,7 +11,6 @@ v.log('{bgYellow}{black} Available commands:
|
|||
v.log('{white} npm run {green}build {cyan} Build dev version of Phaser with Webpack');
|
||||
v.log('{white} npm run {green}watch {cyan} Build dev & put Webpack in watch mode');
|
||||
v.log('{white} npm run {green}dist {cyan} Build dist versions of Phaser');
|
||||
v.log('{white} npm run {green}dist3d {cyan} Build dist versions of Phaser 3D');
|
||||
v.log('{white} npm run {green}lint {cyan} ESLint check Phaser source');
|
||||
v.log('{white} npm run {green}lintfix {cyan} ESLint check and fix Phaser source');
|
||||
v.log('{white} npm run {green}sloc {cyan} Get source code & comments line count');
|
||||
|
|
Loading…
Reference in a new issue