Camera3D Plugin moved out of the main src folder to optional plugin

This commit is contained in:
Richard Davey 2018-08-23 13:18:25 +01:00
parent 5ca4799871
commit beb286297c
13 changed files with 55 additions and 23 deletions

View file

@ -4,16 +4,16 @@
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/ */
var Class = require('../../utils/Class'); var Class = require('../../../src/utils/Class');
var Matrix4 = require('../../math/Matrix4'); var Matrix4 = require('../../../src/math/Matrix4');
var RandomXYZ = require('../../math/RandomXYZ'); var RandomXYZ = require('../../../src/math/RandomXYZ');
var RandomXYZW = require('../../math/RandomXYZW'); var RandomXYZW = require('../../../src/math/RandomXYZW');
var RotateVec3 = require('../../math/RotateVec3'); var RotateVec3 = require('../../../src/math/RotateVec3');
var Set = require('../../structs/Set'); var Set = require('../../../src/structs/Set');
var Sprite3D = require('../../gameobjects/sprite3d/Sprite3D'); var Sprite3D = require('./sprite3d/Sprite3D');
var Vector2 = require('../../math/Vector2'); var Vector2 = require('../../../src/math/Vector2');
var Vector3 = require('../../math/Vector3'); var Vector3 = require('../../../src/math/Vector3');
var Vector4 = require('../../math/Vector4'); var Vector4 = require('../../../src/math/Vector4');
// Local cache vars // Local cache vars
var tmpVec3 = new Vector3(); var tmpVec3 = new Vector3();

View file

@ -4,10 +4,10 @@
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/ */
var Class = require('../../utils/Class'); var Class = require('../../../src/utils/Class');
var OrthographicCamera = require('./OrthographicCamera'); var OrthographicCamera = require('./OrthographicCamera');
var PerspectiveCamera = require('./PerspectiveCamera'); var PerspectiveCamera = require('./PerspectiveCamera');
var PluginCache = require('../../plugins/PluginCache'); var PluginCache = require('../../../src/plugins/PluginCache');
/** /**
* @classdesc * @classdesc

View file

@ -5,8 +5,8 @@
*/ */
var Camera = require('./Camera'); var Camera = require('./Camera');
var Class = require('../../utils/Class'); var Class = require('../../../src/utils/Class');
var Vector3 = require('../../math/Vector3'); var Vector3 = require('../../../src/math/Vector3');
// Local cache vars // Local cache vars
var tmpVec3 = new Vector3(); var tmpVec3 = new Vector3();

View file

@ -5,8 +5,8 @@
*/ */
var Camera = require('./Camera'); var Camera = require('./Camera');
var Class = require('../../utils/Class'); var Class = require('../../../src/utils/Class');
var Vector3 = require('../../math/Vector3'); var Vector3 = require('../../../src/math/Vector3');
// Local cache vars // Local cache vars
var tmpVec3 = new Vector3(); var tmpVec3 = new Vector3();

View file

@ -16,3 +16,19 @@ module.exports = {
PerspectiveCamera: require('./PerspectiveCamera') PerspectiveCamera: require('./PerspectiveCamera')
}; };
/*
var GameObjects = {
Sprite3D: require('./sprite3d/Sprite3D'),
Factories: {
Sprite3D: require('./sprite3d/Sprite3DFactory')
},
Creators: {
Sprite3D: require('./sprite3d/Sprite3DCreator')
}
};
*/

View file

@ -0,0 +1,22 @@
'use strict';
const webpack = require('webpack');
const exec = require('child_process').exec;
module.exports = {
mode: 'development',
context: `${__dirname}/src/`,
entry: {
camera3d: './index.js'
},
output: {
path: `${__dirname}/build/`,
filename: '[name].js',
library: 'PhaserCamera3DPlugin',
libraryTarget: 'umd',
umdNamedDefine: true
}
};

View file

@ -11,7 +11,6 @@
module.exports = { module.exports = {
Controls: require('./controls'), Controls: require('./controls'),
Scene2D: require('./2d'), Scene2D: require('./2d')
Sprite3D: require('./sprite3d')
}; };

View file

@ -32,7 +32,6 @@ var GameObjects = {
PathFollower: require('./pathfollower/PathFollower'), PathFollower: require('./pathfollower/PathFollower'),
RenderTexture: require('./rendertexture/RenderTexture'), RenderTexture: require('./rendertexture/RenderTexture'),
RetroFont: require('./bitmaptext/RetroFont'), RetroFont: require('./bitmaptext/RetroFont'),
Sprite3D: require('./sprite3d/Sprite3D'),
Sprite: require('./sprite/Sprite'), Sprite: require('./sprite/Sprite'),
Text: require('./text/static/Text'), Text: require('./text/static/Text'),
TileSprite: require('./tilesprite/TileSprite'), TileSprite: require('./tilesprite/TileSprite'),
@ -51,7 +50,6 @@ var GameObjects = {
Particles: require('./particles/ParticleManagerFactory'), Particles: require('./particles/ParticleManagerFactory'),
PathFollower: require('./pathfollower/PathFollowerFactory'), PathFollower: require('./pathfollower/PathFollowerFactory'),
RenderTexture: require('./rendertexture/RenderTextureFactory'), RenderTexture: require('./rendertexture/RenderTextureFactory'),
Sprite3D: require('./sprite3d/Sprite3DFactory'),
Sprite: require('./sprite/SpriteFactory'), Sprite: require('./sprite/SpriteFactory'),
StaticBitmapText: require('./bitmaptext/static/BitmapTextFactory'), StaticBitmapText: require('./bitmaptext/static/BitmapTextFactory'),
Text: require('./text/static/TextFactory'), Text: require('./text/static/TextFactory'),
@ -68,7 +66,6 @@ var GameObjects = {
Image: require('./image/ImageCreator'), Image: require('./image/ImageCreator'),
Particles: require('./particles/ParticleManagerCreator'), Particles: require('./particles/ParticleManagerCreator'),
RenderTexture: require('./rendertexture/RenderTextureCreator'), RenderTexture: require('./rendertexture/RenderTextureCreator'),
Sprite3D: require('./sprite3d/Sprite3DCreator'),
Sprite: require('./sprite/SpriteCreator'), Sprite: require('./sprite/SpriteCreator'),
StaticBitmapText: require('./bitmaptext/static/BitmapTextCreator'), StaticBitmapText: require('./bitmaptext/static/BitmapTextCreator'),
Text: require('./text/static/TextCreator'), Text: require('./text/static/TextCreator'),

View file

@ -75,7 +75,6 @@ var DefaultPlugins = {
*/ */
DefaultScene: [ DefaultScene: [
'CameraManager3D',
'Clock', 'Clock',
'DataManagerPlugin', 'DataManagerPlugin',
'InputPlugin', 'InputPlugin',

View file

@ -28,7 +28,6 @@ var InjectionMap = {
events: 'events', events: 'events',
cameras: 'cameras', cameras: 'cameras',
cameras3d: 'cameras3d',
add: 'add', add: 'add',
make: 'make', make: 'make',
scenePlugin: 'scene', scenePlugin: 'scene',