mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added pixi view controller - prepared architecture for multiple view systems - e.g. three, ivank, pixi but havent implemented any new ones yet
This commit is contained in:
parent
efc5bc23b7
commit
f2fb716689
4 changed files with 221 additions and 102 deletions
27
app/Game/Client/View/ViewManager.js
Normal file
27
app/Game/Client/View/ViewManager.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
define([
|
||||
"Game/Config/Settings",
|
||||
"Game/Client/View/Views/ThreeView",
|
||||
"Game/Client/View/Views/PixiView",
|
||||
],
|
||||
|
||||
function (Settings, ThreeView, PixiView) {
|
||||
|
||||
function ViewManager() {
|
||||
}
|
||||
|
||||
ViewManager.prototype.createView = function(arguments) {
|
||||
switch(Settings.VIEW_CONTROLLER) {
|
||||
case 'Three':
|
||||
return new ThreeView();
|
||||
break;
|
||||
case 'Pixi':
|
||||
return new PixiView();
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return ViewManager;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue