Releases: pissang/claygl
1.3.0
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
- Add vertex color support by @xAlien95
1.2.2
1.2.1
1.2.0
Enhancements
-
Separate submodules in g-lmatrix. Abstraction of GeometryBase. Reduced core bundled size to 22k(gzipped). See https://github.com/pissang/claygl#minimum-bundle-example
-
Adjust panorama texture orient.
Bug fixes
- Fix finger rotate bug on mobile.
1.1.4
1.1.3
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
inclay.standard
shader. Also supportocclusionTexture
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
New Features
- [GBuffer] Add velocity buffer for usage of motion blur and temporal reprojection. Use
GBuffer#enableTargetTexture4
to enable rendering of velocity buffer, useGBuffer#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
Enhancements
-
Support alphaCutoff in prez pass and shadow map pass.
-
App3D#loadModel and App3D#createMaterial add
textureConvertToPOT
property in the config. -
application.create add
autoRender
config. -
application.create add
methods
config. And these methods can be called outside usingapp.methods.xxxx
. -
Add App3D#render method.
-
Add App3D#height and App3D#width
-
Vector3 builtin values like
Vector3.ZERO
will always create a new value.
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
Breaking Changes
-
All the modules under
math
have been moved to root for more short reference. For example,clay.math.Vector3
now isclay.Vector3
. For nowclay.math.Vector
can still work but not suggested. -
Move
clay.animation.Timeline
toclay.Timeline
. For nowclay.animation.Timeline
can still work but not suggested. -
Move
clay.compositor.createCompositor
toclay.createCompositor
. For nowclay.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
-
Add typescript declarations. See https://github.com/pissang/claygl/tree/master/typescript
-
[Texture2D] Add convertToPOT property.
-
Add
sideEffects
in package.json to support tree shaking in webpack4.0
Bug Fixes
-
Fix
disposeTexture
parameter not work inScene#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
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.