@pissang pissang released this Jun 23, 2018 · 24 commits to master since this release

Assets 2
  • Better support for other platforms like wechat.

  • Fix damping in OrbitControl not work.

@pissang pissang released this May 2, 2018 · 36 commits to master since this release

Assets 2

Features

  • Add normalScale in clay.standard shader. by @SamuelTS

  • Implement plugin.GamepadControl. by @SamuelTS

  • App3D#createMaterial add textureLoaded and texturesReady callback in parameter object.

Enhancements

  • More robust #define parsing in shader.

  • [fbx2gltf] works in python2.7 by @fmmoret . See #80

  • Improve velocity buffer of skinned mesh.

@pissang pissang released this Mar 30, 2018 · 64 commits to master since this release

Assets 2

Enhancements

Bug fixes

  • Fix finger rotate bug on mobile.

@pissang pissang released this Mar 29, 2018 · 72 commits to master since this release

Assets 2

This version is about to fix the build in 1.1.3

@pissang pissang released this Mar 28, 2018 · 74 commits to master since this release

Assets 2

Enhancements

  • Reduced the minimum bundled size from 38k to 28k. Here is a minimum example code:
import { Renderer, Geometry, Shader, Material } from 'claygl';
const renderer = new Renderer({
    canvas: document.getElementById('main')
});
const geometry = new Geometry();
// Add triangle vertices to position attribute.
geometry.attributes.position.fromArray([
    [-0.5, -0.5, 0],
    [0.5, -0.5, 0],
    [0, 0.5, 0]
]);
const material = new Material({
    shader: new Shader(vsCode, fsCode)
});
renderer.renderPass([{ geometry, material }]);
  • Skybox support 2D panorama environment map. Skydome is DEPCRATED.

  • Add occlusionMap in clay.standard shader. Also support occlusionTexture in glTF Loader.

  • Use vertex texture to store skin matrices to support devices with limited uniforms number.

  • Compatible with browsers don't support EXT_shader_texture_lod extension.

Bug Fixes

  • Fix tree shaking in webpack 4.0 may cause builtin shader lost.

  • Fix velocity buffer may be wrong.

@pissang pissang released this Mar 26, 2018 · 88 commits to master since this release

Assets 2

New Features

  • [GBuffer] Add velocity buffer for usage of motion blur and temporal reprojection. Use GBuffer#enableTargetTexture4 to enable rendering of velocity buffer, use GBuffer#getTargetTexture4 to get the buffer. In the shader code velocity can be extracted like following:
vec4 texel = texture2D(velocityTex, v_Texcoord); 
// If texel has valid velocity info
if (texel.a > 0.0) {
  vec2 vel = texel.rg * 2.0 - 1.0;
}

@pissang pissang released this Mar 12, 2018 · 98 commits to master since this release

Assets 2

Enhancements

Bug Fixes

  • Fix image based lighting wrong when roughness is near to 1.

  • Fix lighting bug in deferred rendering.

  • Fix GBuffer#dispose does not work bug.

  • Use blank texture when texture value is not renderable or is null. Remove the warnings.

@pissang pissang released this Feb 28, 2018 · 141 commits to master since this release

Assets 2

Breaking Changes

  • All the modules under math have been moved to root for more short reference. For example, clay.math.Vector3 now is clay.Vector3. For now clay.math.Vector can still work but not suggested.

  • Move clay.animation.Timeline to clay.Timeline. For now clay.animation.Timeline can still work but not suggested.

  • Move clay.compositor.createCompositor to clay.createCompositor. For now clay.compositor.createCompositor can still work but not suggested.

  • clay.util.mesh.splitJoints will use the material of input mesh. Not clone a new one for each new-created mesh.

  • Remove Renderable#lineWidth

New Features

Bug Fixes

  • Fix disposeTexture parameter not work in Scene#disposeNode

  • [OrbitControl] Fix dragging will not be stopped when the mouse is out of the viewport.

  • [OrbitControl] Disable the right mouse button.

Enhancements

  • Improve shader parser, support uniform initialization value and multiple declaration in one line. Now code like following can be parsed and extrated uniforms correctly
uniform vec3 color = vec3(0.0, 0.0, 0.0), opacity = 1.0;
  • Performance improvements for the large scenes. Can be up to 50% in the scene of 10k objects.

  • [OrbitControl] Optimize the dragging when mouse events are triggered more frequently than animation frame.

  • [PBR] 4x faster cubemap prefiltering

@pissang pissang released this Feb 2, 2018 · 203 commits to master since this release

Assets 2

Enhancements

  • App3D#createCamera add extent parameter when camera type is orthographic

  • Add App3D#cloneNode for cloning skinned models with proper skeleton handling. See example Dancing Group

  • Use indices type instead of vertex count to determine if use OES_element_index_uint extension

Bugfixes

  • Fix scene light numbers can't change bug

  • Fix directional light with shadowCascade will throw error.

@pissang pissang released this Jan 30, 2018 · 210 commits to master since this release

Assets 2

Bug fixes

  • Fix clay.prePass.ShadowMap#dispose may have error bug.