This adds a few new functions to the JavaScript bindings. It also adds
our JavaScript docs into the CMake build system for machines that meet
the Python requirements.
Before this CL, the web archive had two folders: "public" (which
contained web demos written in C++) and "filamentjs" (for the barebones
WASM).
After this CL, the web archive will instead have "dist" and "docs". The
dist folder will have the WASM and accompanying JS file, while the docs
folder has the tutorials and their accompanying demos.
If your machine has Python 3 installed, then "build -ap webgl" will
attempt to generate the JavaScript docs. If Python 3 isn't available,
this build step will be skipped. Note that our Kokoro macOS machines
already have Python 3 pre-installed.
Also removed the pipenv file to simplify the Kokoro Python environment.
Fixes#394.
This adds an archive step to `build.sh` and adds `build/web`.
The archive is a tgz that contains the contents of `public`, which only consists of the files needed for a simple static web server.
The files in `build/web` are almost identical to the mac build, except that they use the `/web/` path and install the emscripten SDK.
* Overhaul the image library, Phase I.
The preps for our upcoming mipgen command line tool by adding filtering
capabilities and unit tests for a new LinearImage class, which will
subsume Image (deprecated).
Filament's new image library is composed of three components:
- LinearImage....simple 3D tensor of floats
- ImageOps.......free functions for simple transforms
- ImageSampler...high quality filtering
The old Image class was a simple untyped data blob and is now
deprecated. The new LinearImage class is always float32, and always
stores pixels in packed scanline order. This makes it easier to
implement image-based algorithms because they can be agnostic of the
underlying format.
Remaining refactorings:
- Phase II will migrate imageio to LinearImage
- Phase III will migrate all downstream tools to LinearImage
- Phase IV will remove old the Image class
* Image library code review feedback.