From 9fd73543179ce5ea62b2b76390733489ae5174fa Mon Sep 17 00:00:00 2001 From: Viktor Kovacs Date: Wed, 11 Jan 2023 08:53:46 +0100 Subject: [PATCH] Update documentation. --- docs/Camera.html | 2 +- docs/CameraMode.html | 2 +- ...nment.html => DevelopmentEnvironment.html} | 25 ++++++++++++++++--- docs/EdgeSettings.html | 2 +- docs/EmbeddedViewer.html | 2 +- docs/EnvironmentSettings.html | 2 +- docs/FileSource.html | 2 +- docs/Init3DViewerElement.html | 2 +- docs/Init3DViewerElements.html | 2 +- docs/InputFile.html | 2 +- docs/Installation.html | 2 +- docs/RGBAColor.html | 2 +- docs/RGBColor.html | 2 +- docs/SetExternalLibLocation.html | 2 +- docs/Usage.html | 2 +- docs/index.html | 4 +-- ...nment.html => DevelopmentEnvironment.html} | 19 +++++++++++++- docs/source/config.json | 4 +-- docs/source/index.html | 2 +- docs/static/script.js | 6 +++-- docs/static/style.css | 2 -- package.json | 10 ++++---- 22 files changed, 67 insertions(+), 33 deletions(-) rename docs/{SetUpEnvironment.html => DevelopmentEnvironment.html} (79%) rename docs/source/{SetUpEnvironment.html => DevelopmentEnvironment.html} (68%) diff --git a/docs/Camera.html b/docs/Camera.html index a658440..9d4dd38 100644 --- a/docs/Camera.html +++ b/docs/Camera.html @@ -30,7 +30,7 @@
-

Set Up the Development Environment

+

Development Environment

This document helps you setting up the developer environment. It is useful if you would like to contribute to the codebase of the engine or the website.

@@ -70,6 +70,15 @@ npm start

This will compile the development version of the code and start a web server. Now you can open http://localhost:8080 to check the result.

+

Environments

+ +

The solution is implemented as ES6 modules. It means that it must be bundled together to one file to make it usable on the website. The development and production environment is separated, see the Scripts section for more details.

+ +
    +
  • Development: The development bundle will be created in the build folder. The code of the website references this directly during development, so you can just open the website folder and try it out.
  • +
  • Production: The entire self-containing package will be created in the build folder. In this case all the required files are copied to this folder so you can just upload it to any web server to make it work.
  • +
+

Source Structure

The source contains the following folders.

@@ -118,9 +127,17 @@ npm start
  • npm run create_dist: Generates the production version of the engine and the website, and runs all the possible checks.
  • +

    Tools

    + +
      +
    • npm run generate_docs: Generates this documentation.
    • +
    • npm run generate_icon_font: Generates the icon font used on the website.
    • +
    • npm run update_libs: Updates the used external libraries.
    • +
    +
    - + diff --git a/docs/EdgeSettings.html b/docs/EdgeSettings.html index 7741a3e..a9e4827 100644 --- a/docs/EdgeSettings.html +++ b/docs/EdgeSettings.html @@ -30,7 +30,7 @@ diff --git a/docs/source/SetUpEnvironment.html b/docs/source/DevelopmentEnvironment.html similarity index 68% rename from docs/source/SetUpEnvironment.html rename to docs/source/DevelopmentEnvironment.html index 7361501..7c5763b 100644 --- a/docs/source/SetUpEnvironment.html +++ b/docs/source/DevelopmentEnvironment.html @@ -1,4 +1,4 @@ -

    Set Up the Development Environment

    +

    Development Environment

    This document helps you setting up the developer environment. It is useful if you would like to contribute to the codebase of the engine or the website.

    @@ -11,6 +11,15 @@ npm start

    This will compile the development version of the code and start a web server. Now you can open http://localhost:8080 to check the result.

    +

    Environments

    + +

    The solution is implemented as ES6 modules. It means that it must be bundled together to one file to make it usable on the website. The development and production environment is separated, see the Scripts section for more details.

    + + +

    Source Structure

    The source contains the following folders.

    @@ -58,3 +67,11 @@ npm start
  • npm run create_package: Generates the production version of the engine and the website.
  • npm run create_dist: Generates the production version of the engine and the website, and runs all the possible checks.
  • + +

    Tools

    + + diff --git a/docs/source/config.json b/docs/source/config.json index 52f319d..4fe0af4 100644 --- a/docs/source/config.json +++ b/docs/source/config.json @@ -30,8 +30,8 @@ "name" : "Contribution", "pages" : [ { - "name" : "Set Up Environment", - "url" : "SetUpEnvironment.html" + "name" : "Development Environment", + "url" : "DevelopmentEnvironment.html" } ] } diff --git a/docs/source/index.html b/docs/source/index.html index 26161ad..4c0a01a 100644 --- a/docs/source/index.html +++ b/docs/source/index.html @@ -21,5 +21,5 @@

    If you would like to contribute to the codebase, these documents help you to start.

    diff --git a/docs/static/script.js b/docs/static/script.js index 94ed9db..f4dbd7d 100644 --- a/docs/static/script.js +++ b/docs/static/script.js @@ -12,8 +12,10 @@ function Resize () navToggleDiv.style.display = 'block'; navDiv.style.display = 'none'; } else { - navDiv.style.width = '250px'; - mainDiv.style.marginLeft = '250px'; + let navWidth = '280px'; + + navDiv.style.width = navWidth; + mainDiv.style.marginLeft = navWidth; navToggleDiv.style.display = 'none'; navDiv.style.display = 'block'; diff --git a/docs/static/style.css b/docs/static/style.css index 5d7e680..aa2603c 100644 --- a/docs/static/style.css +++ b/docs/static/style.css @@ -96,7 +96,6 @@ li .navigation { background: #ffffff; - width: 250px; height: 100%; padding: 20px; position: absolute; @@ -153,7 +152,6 @@ li { height: 100%; padding: 20px; - margin-left: 300px; box-sizing: border-box; overflow: auto; } diff --git a/package.json b/package.json index 750c735..cb1f504 100644 --- a/package.json +++ b/package.json @@ -41,21 +41,21 @@ "test": "mocha test", "lint": "eslint source", "lint_fix": "eslint source --fix", - "docs": "run-python3 tools/generate_docs.py", "update_libs": "npm install && run-python3 tools/update_libs.py", "generate_icon_font": "run-python3 tools/generate_icon_font.py", - "update_engine_exports": "run-python3 tools/update_engine_exports.py", "create_dist": "npm run create_package && npm run lint && npm run test", "create_dist_test": "npm run create_package_test && npm run lint && npm run test", - "create_package": "npm run docs && npm run build_engine_prod && npm run build_engine_module && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py", - "create_package_test": "npm run docs && npm run build_engine_prod && npm run build_engine_module && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py test", + "create_package": "npm run generate_docs && npm run build_engine_prod && npm run build_engine_module && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py", + "create_package_test": "npm run generate_docs && npm run build_engine_prod && npm run build_engine_module && npm run build_website_prod && npm run build_css_prod && run-python3 tools/create_package.py test", + "generate_docs": "run-python3 tools/generate_docs.py", "build_css_prod": "cleancss -o build/o3dv.website.min.css website/css/*", "build_dev": "npm run build_engine_dev && npm run build_website_dev", "build_engine_dev": "npm run update_engine_exports && esbuild source/engine/main.js --bundle --minify --global-name=OV --sourcemap --outfile=build/o3dv.min-dev.js", "build_engine_prod": "npm run update_engine_exports && esbuild source/engine/main.js --bundle --minify --global-name=OV --outfile=build/o3dv.min.js", "build_engine_module": "npm run update_engine_exports && rollup --config tools/rollup.js", "build_website_dev": "esbuild source/website/index.js --bundle --minify --global-name=OV --sourcemap --outfile=build/o3dv.website.min-dev.js", - "build_website_prod": "esbuild source/website/index.js --bundle --minify --global-name=OV --outfile=build/o3dv.website.min.js" + "build_website_prod": "esbuild source/website/index.js --bundle --minify --global-name=OV --outfile=build/o3dv.website.min.js", + "update_engine_exports": "run-python3 tools/update_engine_exports.py" }, "devDependencies": { "clean-css-cli": "^5.6.1",