Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Jan 15, 2018
1 parent 71c6212 commit 3ac02f9
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Circle CI](https://circleci.com/gh/pissang/claygl.svg?style=shield)](https://circleci.com/gh/pissang/claygl)

ClayGL is a WebGL graphic library helping you to build scalable Web3D applications.
ClayGL is a WebGL graphic library for building scalable Web3D applications.

It's easy to use, configurable for high-quality graphics. Benefit from the modularity and tree shaking, it can be scaled down to 40k(gzipped) for a basic 3D application.

Expand Down
2 changes: 1 addition & 1 deletion example/cubeanim.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
var current = crossPosArr;
setInterval(function() {
var another = current == crossPosArr ? checkPosArr: crossPosArr;
animation.animate(obj)
timeline.animate(obj)
.when(1000, {
position: another
}).start("CubicInOut");
Expand Down
2 changes: 1 addition & 1 deletion example/deferred_shadow.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
debugMesh.scale.set(0.1, 0.1, 0.1);
pointLight.add(debugMesh);

var animator = animation.animate(pointLight.position, { loop: true });
var animator = timeline.animate(pointLight.position, { loop: true });
for (var k = 0; k < 10; k++) {
animator.when(k * 4000 + i * 1000, {
x: randomInSquare(5),
Expand Down
6 changes: 3 additions & 3 deletions example/deferred_skinning.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
updates.push(function() {
sphere.localTransform.copy(joint.node.worldTransform);
if (parentJoint) {
lineGeoVertices.set(0, joint.node.getWorldPosition()._array);
lineGeoVertices.set(1, parentJoint.node.getWorldPosition()._array);
lineGeoVertices.set(0, joint.node.getWorldPosition().array);
lineGeoVertices.set(1, parentJoint.node.getWorldPosition().array);
}
lineGeo.dirty();
});
Expand Down Expand Up @@ -118,7 +118,7 @@

var timeline = new clay.animation.Timeline();
timeline.start();
animation.addClip(clip);
timeline.addClip(clip);

var skeletonDebugScene = createSkeletonDebugScene(skeleton, clay);
skeletonDebugScene.position.x = -10;
Expand Down
6 changes: 3 additions & 3 deletions example/js/AlchemyAOPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ define(function (require) {
var viewInverseTranspose = new Matrix4();
Matrix4.transpose(viewInverseTranspose, camera.worldTransform);

ssaoPass.setUniform('projection', camera.projectionMatrix._array);
ssaoPass.setUniform('projectionInv', camera.invProjectionMatrix._array);
ssaoPass.setUniform('viewInverseTranspose', viewInverseTranspose._array);
ssaoPass.setUniform('projection', camera.projectionMatrix.array);
ssaoPass.setUniform('projectionInv', camera.invProjectionMatrix.array);
ssaoPass.setUniform('viewInverseTranspose', viewInverseTranspose.array);

var ssaoTexture = this._ssaoPass.getTargetTexture();
if (width !== ssaoTexture.width || height !== ssaoTexture.height) {
Expand Down
6 changes: 3 additions & 3 deletions example/js/SSAOPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ define(function (require) {
var viewInverseTranspose = new Matrix4();
Matrix4.transpose(viewInverseTranspose, camera.worldTransform);

ssaoPass.setUniform('projection', camera.projectionMatrix._array);
ssaoPass.setUniform('projectionInv', camera.invProjectionMatrix._array);
ssaoPass.setUniform('viewInverseTranspose', viewInverseTranspose._array);
ssaoPass.setUniform('projection', camera.projectionMatrix.array);
ssaoPass.setUniform('projectionInv', camera.invProjectionMatrix.array);
ssaoPass.setUniform('viewInverseTranspose', viewInverseTranspose.array);

var ssaoTexture = this._ssaoTexture;
if (width !== ssaoTexture.width || height !== ssaoTexture.height) {
Expand Down
6 changes: 3 additions & 3 deletions example/js/SSRPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ define(function (require) {
clay.math.Matrix4.transpose(viewInverseTranspose, camera.worldTransform);

ssrPass.setUniform('colorTex', colorTex);
ssrPass.setUniform('projection', camera.projectionMatrix._array);
ssrPass.setUniform('projectionInv', camera.invProjectionMatrix._array);
ssrPass.setUniform('viewInverseTranspose', viewInverseTranspose._array);
ssrPass.setUniform('projection', camera.projectionMatrix.array);
ssrPass.setUniform('projectionInv', camera.invProjectionMatrix.array);
ssrPass.setUniform('viewInverseTranspose', viewInverseTranspose.array);

ssrPass.setUniform('nearZ', camera.near);

Expand Down

0 comments on commit 3ac02f9

Please sign in to comment.