Skip to content

Commit

Permalink
update js code
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyH2 committed Mar 20, 2024
1 parent e0ba3f7 commit b323700
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/screens/main/SettingsMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

import { Screen } from "../screen";

class SettingsMenu extends Screen {
constructor(root) {
super(root);

this.root = root;
};

render(renderGroup) {

};
};

export { SettingsMenu };
19 changes: 19 additions & 0 deletions src/screens/main/appsMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

import { Screen } from "../screen";

class AppsMenu extends Screen {
constructor(root) {
super(root);

this.root = root;
};

render(renderGroup) {

};
};

export { AppsMenu };
19 changes: 19 additions & 0 deletions src/screens/main/mainMenu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

import { Screen } from "../screen";

class MainMenu extends Screen {
constructor(root) {
super(root);

this.root = root;
};

render(renderGroup) {

};
};

export { MainMenu };
24 changes: 24 additions & 0 deletions src/screens/screen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

class Screen {
constructor(root) {
this.root = root;
this.renderGroup = new THREE.Group();
};

render(renderGroup) {

};

renderScreen(screen) {
this.root.renderScreen(screen);
};

getRender(root) {
return this.renderGroup;
};
};

export { Screen };
23 changes: 23 additions & 0 deletions src/screens/screenManager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

class ScreenManager {
constructor(root) {
this.root = root;
};

renderScreen(screenGroup) {
this.root.scene.scene.background = new THREE.Color(0x000000);

screenGroup.render(screenGroup.renderGroup);

this.root.scene.remove(screenGroup.renderGroup);

this.screenGroup = screenGroup;

this.root.scene.add(screenGroup.renderGroup);
};
};

export { ScreenManager };
19 changes: 19 additions & 0 deletions src/screens/start/actionsInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

import { Screen } from "../screen";

class ActionsInfoScreen extends Screen {
constructor(root) {
super(root);

this.root = root;
};

render(renderGroup) {

};
};

export { ActionsInfoScreen };
19 changes: 19 additions & 0 deletions src/screens/start/controllerAlign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

import { Screen } from "../screen";

class ControllerAlignScreen extends Screen {
constructor(root) {
super(root);

this.root = root;
};

render(renderGroup) {

};
};

export { ControllerAlignScreen };
19 changes: 19 additions & 0 deletions src/screens/start/controllerInfo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @author crazyh / https://github.com/crazyh2
*/

import { Screen } from "../screen";

class ControllerInfoScreen extends Screen {
constructor(root) {
super(root);

this.root = root;
};

render(renderGroup) {

};
};

export { ControllerInfoScreen };
Empty file removed src/screens/start/hasController.js
Empty file.
3 changes: 3 additions & 0 deletions src/world/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
*/

import { Scene } from "./scene.js";
import { ScreenManager } from "./../screens/screenManager.js";

class Render {
constructor(top) {
this.top = top;
this.render();

this.ScreenManager = new ScreenManager(this);
};

render() {
Expand Down

0 comments on commit b323700

Please sign in to comment.