Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed the sampler functions

  • Loading branch information...
commit 75acf319fa01e14233e018675193a07328d5f87e 1 parent a2b9df9
Matt Lantz mlantz authored
Showing with 155 additions and 76 deletions.
  1. +155 −76 docs/demos/sampler.html
231 docs/demos/sampler.html
View
@@ -227,98 +227,158 @@
}, false);
document.getElementById("effect-spinLeft").addEventListener("click", function () {
- a.spin(elems, "left", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.spin({
+ elems: elems,
+ move: "left",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-spinRight").addEventListener("click", function () {
- a.spin(elems, "right", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.spin({
+ elems: elems,
+ move: "right",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-spinUp").addEventListener("click", function () {
- a.spin(elems, "up", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.spin({
+ elems: elems,
+ move: "up",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-spinDown").addEventListener("click", function () {
- a.spin(elems, "down", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.spin({
+ elems: elems,
+ move: "down",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-tossLeft").addEventListener("click", function () {
- a.toss(elems, "left", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.toss({
+ elems: elems,
+ move: "left",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-tossRight").addEventListener("click", function () {
- a.toss(elems, "right", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.toss({
+ elems: elems,
+ move: "right",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-tossUp").addEventListener("click", function () {
- a.toss(elems, "up", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.toss({
+ elems: elems,
+ move: "up",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-tossDown").addEventListener("click", function () {
- a.toss(elems, "down", "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.toss({
+ elems: elems,
+ move: "down",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-twirlFromLeft").addEventListener("click", function () {
- a.twirl(elems, "left", {
- "value": "2000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.twirl({
+ elems: elems,
+ move: "left",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-twirlFromRight").addEventListener("click", function () {
- a.twirl(elems, "right", {
- "value": "2000ms",
- "randomness": "0%",
- "offset": "150ms"
+ alicejs.twirl({
+ elems: elems,
+ move: "right",
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-zoomForward").addEventListener("click", function () {
- a.zoom(elems, {from: "100%", to: "125%"}, true, "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "750ms"
+ alicejs.zoom({
+ elems: elems,
+ scale: {from: "100%", to: "125%"},
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-zoomBackward").addEventListener("click", function () {
- a.zoom(elems, {from: "100%", to: "75%"}, false, "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "750ms"
+ alicejs.zoom({
+ elems: elems,
+ scale: {from: "100%", to: "75%"},
+ iteration: 1,
+ duration:{
+ "value": "1000ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
@@ -354,54 +414,73 @@
//---[ Continuous ]---------------------------------------------------
document.getElementById("effect-bounce").addEventListener("click", function () {
- a.bounce(elems, "", true, {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "1ms"
+ alicejs.bounce({
+ elems: elems,
+ duration:{
+ "value": "250ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-bounce-delay").addEventListener("click", function () {
- a.bounce(elems, "", true, {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "1ms"
- }, "", {
- "value": "2500ms",
- "randomness": "10%",
- "offset": "250ms"
+ alicejs.bounce({
+ elems: elems,
+ duration:{
+ "value": "250ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ },
+ delay: {
+ "value": "250ms",
+ "randomness": "10%",
+ "offset": "250ms"
+ }
});
}, false);
document.getElementById("effect-dance").addEventListener("click", function () {
- a.dance(elems, "", {
- "value": "750ms",
- "randomness": "0%",
- "offset": "1ms"
+ alicejs.dance({
+ elems: elems,
+ duration:{
+ "value": "250ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-hinge").addEventListener("click", function () {
- a.hinge(elems, "", "", {
- "value": "750ms",
- "randomness": "0%",
- "offset": "1ms"
+ alicejs.hinge({
+ elems: elems,
+ duration:{
+ "value": "250ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-pendulum").addEventListener("click", function () {
- a.pendulum(elems, "", "", {
- "value": "1000ms",
- "randomness": "0%",
- "offset": "1ms"
+ alicejs.pendulum({
+ elems: elems,
+ duration:{
+ "value": "250ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
document.getElementById("effect-wobble").addEventListener("click", function () {
- a.wobble(elems, "", "", {
- "value": "150ms",
- "randomness": "0%",
- "offset": "1ms"
+ alicejs.wobble({
+ elems: elems,
+ duration:{
+ "value": "250ms",
+ "randomness": "0%",
+ "offset": "150ms"
+ }
});
}, false);
Please sign in to comment.
Something went wrong with that request. Please try again.