Skip to content

Releases: pissang/claygl

1.3.0

23 Jan 08:10
Compare
Choose a tag to compare

Features

  • Add clay.InstancedMesh. Usage:
var instancedMesh = new clay.InstancedMesh({
  geometry: geometry, material: material
});
for (var i = 0; i < 100; i++) {
    var instanceNode = new clay.Node();
    instanceNode.position.set(i - 50, 0, 0);
    instanceNode.update();
    instancedMesh.instances.push({ node: instanceNode });
}
scene.add(instancedMesh);

Enhancements

  • Support base64 decode of buffer in glTF loader.

  • Add transform decompose when creating OrbitControl

  • Better compatibility on weapp platform

Bugfixes

  • Fix skybox with orthographic camera

  • Fix uv repeat and uv offset in preZ pass and shadow pass.

fbx2gltf

1.2.2

23 Jun 10:46
Compare
Choose a tag to compare
  • Better support for other platforms like wechat.

  • Fix damping in OrbitControl not work.

1.2.1

02 May 10:53
Compare
Choose a tag to compare

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.

1.2.0

30 Mar 13:39
Compare
Choose a tag to compare

Enhancements

Bug fixes

  • Fix finger rotate bug on mobile.

1.1.4

29 Mar 03:22
Compare
Choose a tag to compare

This version is about to fix the build in 1.1.3

1.1.3

28 Mar 14:40
Compare
Choose a tag to compare

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.

1.1.2

26 Mar 12:15
Compare
Choose a tag to compare

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;
}

1.1.1

12 Mar 09:48
Compare
Choose a tag to compare

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.

1.1.0

28 Feb 06:12
Compare
Choose a tag to compare

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

1.0.4

02 Feb 07:30
Compare
Choose a tag to compare

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.