* Add a Renderer API to force skipping frames Renderer::skipNextFrames(size_t) can be used to force filament to pretend the next N frames must be skipped. This is mostly useful for debugging. * Add DebugOptions to Settings We still need to move the "Debug" features of gltf_viewer to this, but this give us a framework to do it. Currently there is one debug option that allows to set a number of frames to skip. ViewerGui propose a button to skip 10 frames using this framework * Update libs/viewer/src/Settings.cpp Co-authored-by: Powei Feng <powei@google.com> * Update libs/viewer/src/Settings.cpp Co-authored-by: Powei Feng <powei@google.com> --------- Co-authored-by: Powei Feng <powei@google.com>
Filament for Web
Filament is a mobile-first library for physically based rendering. It has a lightweight C++ core made available to web developers via a WebAssembly module. The WASM file is bundled with a first-class JavaScript API.
See the web docs for more information.
Publishing to npm
See Versioning.md for a description of Filament's three-tier versioning scheme.
By pushing Filament's WebAssembly build to the npm registry, we can simplify the workflow for web developers due to tools like yarn. This also has the benefit of making Filament available on CDN servers like unpkg and jsdelivr.
To publish a new package to npm, do the following.
- Follow the instructions in the toplevel README for installing Emscripten.
- Make sure you have an npm account and that your npm account belongs to the Google team.
- Edit the version number in
package.json. You cannot publish the same version more than once. - From the root folder in your Filament repo, do:
./build.sh -ap webgl release
./build.sh -ap all release
- Make a commit and a tag whose label is the 3-tiered version number prefixed with a
v:
git commit && git tag -a v{XX}.{YY}.{ZZ}
- Push your change to GitHub, then make a GitHub Release associated with your new tag.
- Perform a "dry run" of the npm packaging process:
| ‼️ | If there is a material change, be sure to update the live demos! |
|---|
cd out/cmake-webgl-release/web/filament-js
npm publish --dry-run
- If the output of the dry run looks okay to you (double check the version number!), then finally
do
npm publish.
-
Update the live drag-and-drop viewer as follows:
- Edit the pinned Filament version in the
<script>tag indocs/viewer/index.html. - Push the change to GitHub and test the site:
https://google.github.io/filament/viewer/.
- Edit the pinned Filament version in the