mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
The Camera3D
Plugin has been rebuilt for Phaser 3.50 and the webpack config updated.
This commit is contained in:
parent
4d4b3c1cad
commit
f51200479b
4 changed files with 23034 additions and 13007 deletions
13
plugins/camera3d/copy-to-examples.js
Normal file
13
plugins/camera3d/copy-to-examples.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
var fs = require('fs-extra');
|
||||
|
||||
var source = './plugins/camera3d/dist/';
|
||||
var dest = '../phaser3-examples/public/plugins/';
|
||||
|
||||
if (fs.existsSync(dest))
|
||||
{
|
||||
fs.copySync(source, dest, { overwrite: true });
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log('Copy-to-Examples failed: Phaser 3 Examples not present at ../phaser3-examples');
|
||||
}
|
36006
plugins/camera3d/dist/camera3d.js
vendored
36006
plugins/camera3d/dist/camera3d.js
vendored
File diff suppressed because it is too large
Load diff
2
plugins/camera3d/dist/camera3d.min.js
vendored
2
plugins/camera3d/dist/camera3d.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,8 @@
|
|||
|
||||
const webpack = require('webpack');
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
||||
const exec = require('child_process').exec;
|
||||
const RemovePlugin = require('remove-files-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'production',
|
||||
|
@ -42,6 +43,21 @@ module.exports = {
|
|||
},
|
||||
|
||||
plugins: [
|
||||
new CleanWebpackPlugin([ 'dist' ])
|
||||
new RemovePlugin({
|
||||
before: {
|
||||
root: './plugins/camera3d/dist/',
|
||||
include: [ 'camera3d.js', 'camera3d.min.js' ]
|
||||
}
|
||||
}),
|
||||
{
|
||||
apply: (compiler) => {
|
||||
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
|
||||
exec('node plugins/camera3d/copy-to-examples.js', (err, stdout, stderr) => {
|
||||
if (stdout) process.stdout.write(stdout);
|
||||
if (stderr) process.stderr.write(stderr);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue