0.8.0 • Published 2 years ago

webgl-operate v0.8.0

Weekly downloads
4
License
MIT
Repository
github
Last release
2 years ago

webgl-operate (or gloperate for WebGL) is a TypeScript based WebGL rendering framework.

npm Version Examples Documentation Travis CodeFactor

webgl-operate encapsulates WebGL and provides various rendering capabilities such as common rendering controllers for single-frame and multi-frame rendering, raycasting, or progressive path-tracing as well as a multitude of common rendering processes and shaders. In contrast to most other rendering engines, neither a specific rendering approach/pipeline or style is favored nor a specific use-case is assumed. Instead, it features a basis for arbitrary rendering implementations and facilitates common rendering processes in an atomic manner. It can be used for, e.g., complex charting, volume rendering, point-cloud rendering, product visualization, learning webgl, raymarching or pathtracing, rendering implicit or procedural geometry, as well as modern rendering of 3D models and complex scenes.

How to Install

webgl-operate can be used as JavaScript or TypeScript library (types included) via npm:

npm install --save-dev webgl-operate

Alternatively, webgl-operate can be integrated as bundled JavaScript in your HTML:

<script src="https://cdn.jsdelivr.net/npm/webgl-operate@latest/dist/webgl-operate.min.js"></script>

Features

Implemented

Cross-browser Compatible, Desktop and Mobile, Object-oriented WebGL2 Facade, WebGL and WebGL2 Backend, Extension Querying and Masquerade, Progressive Rendering Controller, Programs and Shaders with Includes and Replacements, GPU Allocation Registry, Dynamic Resolution, Frame Buffers, Vertex Buffers, Vertex Arrays, 2D and 3D Textures, Drawables, Camera and Camera Modifiers, Text Rendering, ..., and, finally, Professional Customer Support and Integration Service

In Progress

glTF Support, PBR Rendering, XR Rendering Controller, Rendering Controller (single frame + continuous capable), Post-processing Library, ...

Planned

Observable Rendering Stats, Default Viewer UI/Overlay, Volume Rendering Basics, LUT Color Grading, Ray Tracing Utils, Progressive Path Tracing Utils, ...

Getting Started

The canvas can be integrated into HTML5 as follows:

<canvas id="multiframe">
    <!-- fallback -->
    Your browser does <strong>not support</strong> the <code>&lt;canvas&gt;</code> element.
</canvas>

This canvas can then be setup by associating the canvas element with a single-frame or multi-frame controller and attaching a renderer using JavaScript as follows:

ToDo

Source Structure

directorydescription
sourcemost of webgl-operate's rendering and operational logic
source/datacontains, e.g., pre-built sampling patterns or other data
source/shaderson build, shaders are packed into the dist as well (and includes are resolved)
source/debugoptional: various tools for run-time debugging
source/vieweroptional: generic viewer overlay and controller for webgl-operate based rendering
websitewebsite demonstrating webgl-operate features (referencing examples)
testtests of sources located in source

NPM Configuration and Project Setup

package.json specifies the following scripts that can be run by npm run-script <command>.

commanddescription
buildbuild for local development to ./build, creates a bundle with all facilities and a test website
startstarts a local start on port 4000 on the ./build directory
start-watchruns build tasks concurrently in watch mode and starts start
build-disttranspile sources and declarations to ./dist for distribution via, e.g., CDN
build-libtranspile sources and declarations to ./lib/ for distribution via npm
cleanupremoves all build directories, i.e., ./build, ./dist, and ./lib
lintcode quality lint TSLint Rules: tslint.json
docbuild html documentation in dist/docs using TypeDoc
testrun unit tests using mocha and chai

The above commands can be triggered directly from within a console (e.g., from within the Visual Studio Code terminal) or by using visual studio tasks. When first working on webgl-operate, use npm install to install dependencies. For development use npm run-script build and, e.g., npm run-script start to access the test website locally.

  • For deployment npm update and subsequent npm run-script prepack should be run.
  • For publishing the package to npm login to npm via npm login, then update the package version using npm version {major,minor,patch}, and, finally, run npm publish.

Please note that deployment of documentation and examples is managed by CG Internals manually for now.

Visual Studio Code configuration

Please not that the workspace configuration .vscode/settings.json has automatic format on save enabled.

All the above scripts, namely build, build-lib, build-dist, lint, cleanup, start, start-watch, doc, as well as test can be triggered from within Visual Studio Code. The intended workflow is to bind a key (e.g., ctrl+alt+t) to open the task selection and trigger the desired task. The tasks are configured in .vscode/tasks.json.

Related Work

0.8.0

2 years ago

0.7.5

3 years ago

0.7.3

3 years ago

0.7.2

3 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

5 years ago

0.5.0

5 years ago

0.4.2-beta

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.20

6 years ago

0.3.19

6 years ago

0.3.18

6 years ago

0.3.17

6 years ago

0.3.16

6 years ago

0.3.15

6 years ago

0.3.14

6 years ago

0.3.13

6 years ago

0.3.12

6 years ago

0.3.11

6 years ago

0.3.10

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.18

6 years ago

0.2.17

6 years ago

0.2.16

6 years ago

0.2.15

6 years ago

0.2.14

6 years ago

0.2.13

6 years ago

0.2.12

6 years ago

0.2.11

6 years ago

0.2.10

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago