Commit Graph

31 Commits

Author SHA1 Message Date
Philip Rideout
71e9c13b94 Add TypeScript annotations file (hand authored for now) 2018-12-06 15:43:11 -08:00
Philip Rideout
8bb68b3c55 Rename MeshIO class to MeshReader.
This makes the name symmetrical with MeshWriter.
2018-12-05 17:15:52 -08:00
Philip Rideout
beaf751604 filamesh: Compress attributes individually.
This further reduces compressed suzanne from 333489 bytes to 272761.

Tested with vk_hellopbr and tutorial_suzanne.html

Issue #558
2018-12-05 17:15:52 -08:00
Philip Rideout
6c55b3b989 filamesh: Add support for COMPRESSION.
Note that the WebGL build uses filameshio, but Android does not. Our
Android samples therefore do not yet understand the compressed format.
For web, I measured the before / after:

```
BEFORE: filament.wasm = 505796, suzanne.filamesh = 521476
 AFTER: filament.wasm = 510915, suzanne.filamesh = 333489
```

Issue #558
2018-12-05 13:20:55 -08:00
Philip Rideout
7366bdb500 More KtxUtility improvements.
This makes it easier for C++ clients to use KTX files and simplifies
the JavaScript bindings.
2018-11-30 13:16:47 -08:00
Philip Rideout
bcfe03c8e1 KtxUtility improvements.
This makes it easier for C++ clients to use KTX files and simplifies
the JavaScript bindings.
2018-11-29 16:39:30 -08:00
Philip Rideout
84d2fb222b Flesh out JS bindings a bit. 2018-11-16 17:21:44 -08:00
Philip Rideout
e652507315 Tutorial fixups per code review feedback. 2018-11-16 14:09:41 -08:00
Philip Rideout
ffff8437ba Add tutorial that describes compression and async loading. 2018-11-16 14:09:41 -08:00
Mathias Agopian
870d15b9ab Add MaterialInstance::setPolygonOffset()
The polygon offset can now be set through MaterialInstance. 
USE WITH CAUTION, this impacts performance negatively.
2018-11-13 19:27:52 -08:00
Ben Doherty
74573c7ce4 Fix undefined symbols issue with web builds (#482) 2018-11-13 18:11:03 -08:00
Philip Rideout
17003106d2 Prep for new JavaScript tutorial.
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.
2018-11-13 17:27:34 -08:00
Philip Rideout
73a2ef7944 Add favicon. 2018-11-13 12:07:57 -08:00
Philip Rideout
7c2c4f3b11 Fix parquet wrap mode. 2018-11-13 12:07:47 -08:00
Philip Rideout
3407302954 Minor suzanne cleanup. 2018-11-08 16:21:54 -08:00
Philip Rideout
f4806461ee Fix JavaScript leaks with BufferDescriptor.
Fixes #429
2018-11-08 16:17:29 -08:00
Philip Rideout
207d4ea4c1 Fix JS API leaks by auto-deleting builders, etc.
While this solves the builder leak, it does not solve the tiny leak
incurred every time you call `getInstance` on a component manager
without calling embind's `delete` method afterwards. Since there's no
way to auto-delete component instances, this CL fixes up our sample
code and docstrings.

Fixes #429
2018-11-08 16:17:29 -08:00
Philip Rideout
5fb0696fb7 Resurrect the JS memory leak test (#429) 2018-11-08 11:16:41 -08:00
Philip Rideout
75ffbe13be Fix typos. 2018-11-07 16:28:57 -08:00
Philip Rideout
bf77a33e1f Include filament-js README in npm package. 2018-11-07 16:14:39 -08:00
Philip Rideout
b9bfda5704 The JS API now supports compressed textures. 2018-11-07 16:12:55 -08:00
Philip Rideout
ee5b0268fd Introduce KtxUtility to make it easier to translate enum values. 2018-11-07 16:12:55 -08:00
Philip Rideout
a33c64c736 Update version doc and package per code review. 2018-11-06 12:48:56 -08:00
Philip Rideout
7ea04957d2 Introduce versioning scheme and npm package definition. 2018-11-06 12:48:56 -08:00
Philip Rideout
8d410af4b3 JS API: prepare for compressed textures.
Note that we need to allow clients to find out if compressed textures
are supported BEFORE the engine is created, so that they can start
downloading the correct set of texture files. To allow this, we now
expose a getSupportedFormats function that creates a throw-away canvas
in order to query extensions (creating a temporary canvas is a technique
that we also used in the old PNG decoder that we removed in 7b36ed4)
2018-11-03 13:07:02 -07:00
Philip Rideout
9de7ffaf84 Fix typo in title tag for suzanne. 2018-11-01 17:11:58 -07:00
Philip Rideout
e3e16fe28b Remove defunct web/tests folder.
These are broken and no longer necessary now that we have web/samples.

Despite the name, these weren't real tests; they were ignored by CMake
and did not run in an automated manner. Going forward we need a better
solution for automated testing.
2018-11-01 17:05:30 -07:00
Philip Rideout
bb0c21b8ea Rename filamentjs to filament-js to follow convention. 2018-11-01 17:05:30 -07:00
Philip Rideout
c46ecc6e05 Port the Suzanne demo to JavaScript. 2018-11-01 17:05:30 -07:00
Philip Rideout
fffb2c8c97 Add samples to the new web directory. 2018-11-01 17:05:30 -07:00
Philip Rideout
a42dcd2291 JavaScript code re-org (#443)
This removes the old CPP-based web samples in favor of the new JS API.

The `web/samples` folder will be added in a subsequent commit.
2018-11-01 17:05:30 -07:00