Commit Graph
240 Commits
Author SHA1 Message Date
Benjamin Doherty cb7f81ccd6 Release Filament 1.9.14 2021-03-01 11:10:46 -08:00
Benjamin Doherty ce2c49217f Release Filament 1.9.13 2021-02-22 10:29:02 -08:00
Benjamin Doherty 939f3b975c Release Filament 1.9.12 2021-02-16 10:43:06 -08:00
Philip Rideout 0f9cee0b83 Update WebGL demos on website.
This includes an important fix for Chrome on Windows, which does not
support RGB16F.
2021-02-09 11:41:09 -08:00
Benjamin Doherty ad90fa1183 Release Filament 1.9.11 2021-02-08 09:54:27 -08:00
Benjamin Doherty 6eec2cde81 Release Filament 1.9.10 2021-02-01 11:44:33 -08:00
Philip Rideout c84036c8c4 Update JavaScript bindings and demo to prep for Bloom workaround. 2021-01-26 13:18:03 -08:00
Benjamin Doherty 1e501eb00b Release Filament 1.9.9 2020-11-16 12:32:38 -08:00
Benjamin Doherty bd9aba35f6 Release Filament 1.9.8 2020-11-09 09:27:06 -08:00
Benjamin Doherty 8b8d563b0f Bump version to 1.9.7 2020-11-02 11:00:09 -07:00
Philip Rideout 70dba2398e gltfio: add createInstance() to AssetLoader.
Note that this API is on the loader rather than the asset. This is
because the loader knows how to create Filament entities by traversing
a cgltf node hierarchy.

Animation on dynamically added instances is not yet supported.

We did not add destroyInstance() because gltfio favors flat arrays for
long term storage of entity lists and instance lists, which would be
slow to shift. We also wish to discourage create/destroy churn since it
is more efficient to pre-allocate instances and selectively add them
into the scene.

Fixes #3137.
2020-11-02 09:47:14 -08:00
Benjamin Doherty 4270384661 Bump version to 1.9.6 2020-10-26 11:27:08 -06:00
Philip Rideout 7260bab7b3 Fix TypeScript binding for TextureUsage. 2020-10-20 14:09:05 -07:00
Benjamin Doherty de75b9d125 Bump version to 1.9.5 2020-10-19 11:49:57 -06:00
Benjamin Doherty 40e10817dd Bump version to 1.9.4 2020-10-12 11:52:49 -06:00
Benjamin Doherty d72d3533e6 Bump version to 1.9.3 2020-10-05 11:34:19 -06:00
Benjamin Doherty 42733c10b7 Bump version to 1.9.2 2020-09-28 11:34:32 -06:00
Philip Rideout 5549adc020 JavaScript bindings: fix TextureUsage bitmask.
There's no really good solution, so this just keeps it simple and makes
is so that embind consumes an integer rather than an embind enum object.

Tested by hacking _createTextureFromImageFile.

Fixes #3028.
2020-09-24 15:53:20 -07:00
Benjamin Doherty 35ace36b7d Bump version to 1.9.1 2020-09-21 11:02:11 -06:00
Pixelflinger dc16eb04f8 rename .blurScale to .cocScale in dof options
.blurScale was in fact a scale factor applied to the circle of
confusion (which makes it indeed a "blur scale", but let's use
a more precise language here). 

Update comments to show how to  use .cocScale to control the DoF
effect independently from the camera aperture, which can be useful for
artistic reasons.
2020-09-14 22:22:52 -07:00
Benjamin Doherty 38d37d0d59 Bump version to 1.9.0 2020-09-14 11:07:22 -07:00
Yadikaer Yasheng c529a511f5 typescript defs for Texture & RenderTarget APIs (#3008)
* typescript defs for Texture &   RenderTarget APIs

* suggest to use helper functions to create textures
2020-08-26 18:52:07 -07:00
Philip Rideout 3258972e0e WebGL: repair beginFrame() bindings.
This regressed when we added a callback argument, because the callback
cannot be bound.

This commit also modifies the helmet example to use the low-level API
for testing purposes.

Note that this omits the optional nanoseconds argument. JavaScript
does not support overloading and this argument probably cannot be
accurately provided anyway in a web environment.

Fixes #3002.
2020-08-25 17:24:04 -07:00
Philip Rideout 7ca281d2b9 Expose ShadowOptions to JS, fix #2958. 2020-08-18 09:44:55 -07:00
Ben Doherty faa785f3f6 Switch to C++17 (#2940) 2020-08-12 15:21:39 -07:00
Philip Rideout 732a6c08de Add Texture getters to IndirectLight and Skybox.
Fixes #2851.
2020-08-07 11:49:24 -07:00
Philip Rideout c7c1c01a0e JavaScript: fix typo in clearAssetCache. 2020-08-06 16:47:29 -07:00
Philip Rideout 827e73b682 JavaScript: add clearAssetCache helper. 2020-08-06 16:41:35 -07:00
Philip Rideout 749a4d01af gltfio: fix some small memory leaks.
This fixes two oversights in the FilamentAsset destructor:

- Destroy the faux root Entity.
- If it exists, remove the name component from each Entity.
2020-08-06 15:12:53 -07:00
Philip Rideout f4004cf047 JavaScript bindings: fix a frequent 4-byte memory leak.
In retrospect, I should've exposed ints to JS instead of entities.
Making this fix is already a TODO, but it will be a tedious change. For
now, this PR fixes two issues that were causing tiny but frequent memory
leaks, according to the emscripten memory leak widget.

(1) Do not include Entity in the list of classes that should only be
passed around by pointer.

(2) Clients should always call delete() on returned Entities.
2020-08-06 14:45:28 -07:00
Philip Rideout 4bf0d0c0a8 Web: Remove broken webpack example.
This example has fallen out of date, I tried to resurrect it but it
turned out to be non-trivial, given the special nature of emscripten's
generated JavaScript wrappers.

It might be better to provide an example that uses rollup, since that's
the bundler that model-viewer uses, or a simple TypeScript example.

For now, I think our simple HTML + raw JS samples are sufficient.
2020-08-05 11:19:08 -07:00
Romain Guy a120e0a4bb Filament 1.8.1 2020-07-30 12:25:53 -07:00
Philip Rideout b4623c9afc Add lightroom IBL, enable ColorGrading by default in gltf_viewer.
The non-legacy ACES is now default, it looks much better.

I also tested this IBL with WebGL and Android.
2020-07-30 11:39:36 -07:00
Philip Rideout 440687e05a Add JavaScript bindings for Fog and Vignette. 2020-07-29 15:01:05 -07:00
Philip Rideout 7584a7bebe Merge pull request #2885 from google/pr/jscolorgrading
WebGL: use color grading in demo, expose destroy.
2020-07-29 12:22:11 -07:00
Philip Rideout 664e7b8a8d ColorGrading: add JavaScript and TypeScript bindings.
This is not tested but seems fairly straightforward.
2020-07-28 14:45:51 -07:00
Philip Rideout cd168148d8 gltfio for web: add and use destroyAsset.
Fixes #2839.
2020-07-22 13:40:08 -07:00
Philip Rideout 0da20cccdc Introduce removeEntities API / fix leak in ModelViewer (!)
For testing purposes, sample-gltf-viewer reloads the model when the
user double-taps the screen. This operation was causing a buildup of
blank entities in the Scene, because we were merely destroying the
components, not removing them from the Scene.
2020-07-22 13:38:38 -07:00
Mingwei Samuel 36b3cc7bf0 Filament.d.ts: add Vector<T> interface, vectorToArray<T> fn, fix getResourceUris() return vec 2020-07-18 10:50:44 -07:00
Mingwei Samuel a2e5cacee0 Filament.d.ts: Add BufferReference type alias, update to accept typed arrays
- buffers processed by getBufferDescriptor can be an asset string or JS typed array.
  - https://github.com/google/filament/blob/185ed0cc68cf5e2a148ff36bd817acc6b5c2b811/web/filament-js/extensions.js#L17-L27
2020-07-13 20:56:12 -07:00
Philip Rideout 6eac638fd2 Remove old method for JS doc generation.
The new way is to follow the instructions at the top of
`web/docs/build.py`.

The option in build.sh has been unused for a while. Invoking Python from
CMake was pointless, especially since I don't want to force other
developers to install a specific version of Python etc.
2020-07-13 16:07:49 -07:00
Philip Rideout 4fa987c698 WebGL: Upgrade emsdk and refactor initialization.
Since postRun can no longer be set from within the extern post JS, we
now use the promise rather than postRun.

This upgrades emsdk to 1.39.19 (see note in #2800).
2020-07-13 13:02:26 -07:00
Philip Rideout ec533e6047 DriverEnums: add usage flag for SUBPASS_INPUT 2020-07-11 09:22:28 -07:00
Philip Rideout 38d2509aaf Web tutorials now use a CDN for the npm package.
This makes the tutorials more consistent with the live demos and lets us
more easily ensure that the tutorials are kept up to date without
errors. In fact it caught an error in the Suzanne tutorial.

Since this affects source rather than served files, this PR is intended
for main.  The master branch will be updated in a subsequent PR.
2020-07-09 14:56:05 -07:00
Romain Guy 77aec40a56 Prepare Filament v.1.8.0 (#2787) 2020-07-09 11:44:15 -07:00
Philip Rideout 07e4d1c148 Fix TypeScript error for the Render Fidelity folks. 2020-07-09 07:49:22 -07:00
Mingwei Samuel e03c663bc3 filament.d.ts make init, fetch callbacks optional 2020-07-04 09:20:51 -07:00
Ben Doherty a6872c840c Silence more deprecation warnings (#2750) 2020-06-30 10:14:57 -07:00
Philip Rideout c0452b5e9d JS: Update API for Camera construction / destruction. 2020-06-29 18:35:24 -07:00
Philip Rideout b136b4aca5 JS: Temp workaround for bloom binding error. 2020-06-29 18:35:24 -07:00