Commit Graph

230 Commits

Author SHA1 Message Date
Benjamin Doherty
65394f6301 Bump version to 1.9.7 2020-10-26 11:34:20 -06: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.
  - 185ed0cc68/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
Philip Rideout
59cf9e3b75 JS: Fix typo in bindings for bloom options. 2020-06-29 18:35:24 -07:00
Mingwei Samuel
0be094cd4f Update TypeScipt declarations
- Add missing LightManager$Builder methods.
- Fix IcoSphere.tangents type to be unsigned.
- Add missing IcoSphere.suvdivide() method.
2020-06-24 15:37:15 -07:00
Philip Rideout
8f4ffbc782 gltfio: various improvements to skinning normalization.
- Allow JavaScript and Java / Kotlin clients to configure this setting.
- Opt in by default (this was disabled in #2621)
- Optimize large assets like Bistro by iterating through prims only when
  the asset actually has skins.

Fixes #2714.
2020-06-23 13:30:45 -07:00
Mingwei Samuel
455bed917b Fix typescript missing options parameter for createTextureFromX 2020-06-23 09:25:44 -07:00
Philip Rideout
a5c49cc1b6 Improve JS API for Scene::addEntities.
This repairs the `animation.html` sample. Using a JS array is more
natural for web developers and more consistent with the latest
JavaScript bindings in gltfio.
2020-06-18 12:16:01 -07:00
Philip Rideout
ce995d021a Improve JS API for SurfaceOrientation helper. (#2706)
* Improve JS API for SurfaceOrientation helper.

Web developers should not be expected to call malloc on the emscripten
heap. This new API is better aligned with how we handle vertex buffers.

Fixes #2702.

* Update web/filament-js/extensions.js

Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>

Co-authored-by: Wojciech Czerniak <wojciech.czerniak@gmail.com>
2020-06-18 12:02:02 -07:00
Romain Guy
8c9cc988a6 Update references to master with references to main 2020-06-16 13:35:57 -07:00
Philip Rideout
242e8d1b56 Update live JS demos and tutorials.
At some point I should probably change the tutorials to use a versioned
NPM package rather than a checked-in prebuilt Filament WASM file.

Fixes #2686.
2020-06-15 11:34:59 -07:00
Ben Doherty
de3f757013 Add JS bindings to gltfio camera funcs (#2681) 2020-06-15 11:04:16 -07:00
Mingwei Samuel
ca6b1860be Fix typescript View set/getAmbientOcclusion wrong type 2020-06-02 16:40:50 -07:00