-
Notifications
You must be signed in to change notification settings - Fork 265
API Changes 7 Sep 2017
Oh no, more API changes! But not big ones.
In case you need the previous version of xeogl, I've tagged a pre-release here: https://github.com/xeolabs/xeogl/releases/tag/v0.5
I've removed these component classes and moved their properties into xeogl.Entity:
xeogl.Modes
xeogl.Visibility
xeogl.Cull
xeogl.Stationary
xeogl.Billboard
xeogl.Layer
My rationale is that its usually more useful for each Entity
to have its own separate copy of this sort of state, rather than share it with other Entities
via these components.
When sharing components, we never really knew if, for example, a Visibility
attached to a target Entity
is also attached to other Entities
as well, and that updating it will inadvertently show or hide those Entities
.
I finally rewrote the glTF parser to load glTF 2. It loads just what xeogl needs for visualizing static models:
- Geometries
- Transforms
- Standard metal-rough PBR material
- KHR_materials_pbrSpecularGlossiness
- KHR_materials_common
Try a demo!
While upgrading glTF support, I also improved the way materials specify transparency.
I took some cues from the glTF 2 spec and made these changes to xeogl.MetallicMaterial, xeogl.SpecularMaterial and xeogl.PhongMaterial:
- renamed
opacity
toalpha
, - added
alphaMode
, which gets a value of either "opaque", "blend" or "mask" to indicate how alpha is treated, and - added
alphaCutoff
, which specifies the alpha threshold for "mask".
The alphaMode
property now does what the xeogl.Modes
transparent
property used to do, where it enables transparency when its value is not "opaque".
Check out the API docs of those components for more info.
glTF-related things to do:
- Load completion on GLTFModel is firing a little too early - entities are not properly created until the next engine "tick". Need to track loading progress more cleanly.
- Make the image based lighting way better (eg. more precision, hemispherical lights?)
- Correct gamma and maybe tone mapping in shader?
- Support binary for glTF delivery
- Support compressed textures?