Refactoring

0

Added digital display of color component values. Their changes are interconnected.

Spent a lot of code refactoring.

  1. Made the code modules.
  2. Moved most of the code from TertiusAxis.js to TA_UI.js.
    Now it only has a start () function
start (){
    let taUI = new TA_UI();
    taUI.init();
    let taScene = new TA_Scene( taUI );
 
        if ( taUI.fillMainToolbar( taScene ) ) {
 
            console.log( 'TertiusAxis loaded');
 
        }
 
}

I split the TA_UI.js file into several modules and moved them to the UI folder. The formation of each section of the menu is now in a separate function in a separate file. Now the menu forming and filling functions look like this:


import { createMainMenu } from "./MainMenu.js";
import { createMainToolbar } from "./MainToolbar.js";
import { createManipulateToolbar } from "./ManipulateToolbar.js";
import { createAddToSceneToolbar } from "./AddToSceneToolbar.js";
import { createParametersToolbar } from "./ParametersToolbar.js";
import { fillGeometryParametersTab } from "./GeometryParametersTab.js";
import { fillMaterialParametersTab } from "./MaterialParametersTab.js";
import { fillGeneralParametersTab } from "./GeneralParametersTab.js";

class TA_UI {
 
    constructor( ) {
    }
 
    init() {
 
        createMainMenu();
        createMainToolbar();
 
        return true;
 
    }
 
    fillMainToolbar( taScene ){
 
        createManipulateToolbar( taScene );
        createAddToSceneToolbar( taScene );
        createParametersToolbar();
 
        return true;
 
    }

A bug was detected in FireFox with the display input, it ran away when scrolling (fixed).

I found that in Edge input it does not scroll and there are no arrows to change the value. I need to study cross-browser compatibility.

Todo. Refactoring TA_Entities.js, creating functionality for all buttons for creating primitives.

0