Permalink
Browse files

Added demos page and merge options.

  • Loading branch information...
psiborg committed Jan 18, 2012
1 parent 6a8ebf5 commit a0df32237867ae128f6dd9f4ef4b7b739b9db187
View
127 app.js
@@ -1,6 +1,21 @@
/*jslint devel: true, browser: true, white: true, nomen: true */
/*global alice: false */
+/* Copyright 2011-2012 Research In Motion Limited.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
var a = alice.init();
a.slideLeft({
@@ -18,9 +33,7 @@ if (typeof jWorkflow !== "undefined") {
//----------------------------------------------------------------------------
-var app = {
-
-};
+var app = {};
/**
*
@@ -178,95 +191,203 @@ app.applyEffect = function (param) {
switch (param.value) {
case "slideLeft":
+ p.move = "left";
ret = a.slideLeft(p);
break;
case "slideRight":
+ p.move = "right";
ret = a.slideRight(p);
break;
case "slideUp":
+ p.move = "up";
ret = a.slideUp(p);
break;
case "slideDown":
+ p.move = "down";
ret = a.slideDown(p);
break;
+
case "tossLeft":
+ p.move = "left";
+ p.rotate = 720;
+ p.fade = "in";
ret = a.tossLeft(p);
break;
case "tossRight":
+ p.move = "right";
+ p.rotate = -720;
+ p.fade = "in";
ret = a.tossRight(p);
break;
case "tossUp":
+ p.move = "up";
+ p.rotate = -720;
+ p.fade = "in";
ret = a.tossUp(p);
break;
case "tossDown":
+ p.move = "down";
+ p.rotate = 720;
+ p.fade = "in";
ret = a.tossDown(p);
break;
+
case "spinLeft":
+ p.flip = "left";
ret = a.spinLeft(p);
break;
case "spinRight":
+ p.flip = "right";
ret = a.spinRight(p);
break;
case "spinUp":
+ p.flip = "up";
ret = a.spinUp(p);
break;
case "spinDown":
+ p.flip = "down";
ret = a.spinDown(p);
break;
+
case "pushForward":
+ p.scale = "150%";
ret = a.pushForward(p);
break;
case "pushBackward":
+ p.scale = "50%";
ret = a.pushBackward(p);
break;
+
case "fadeIn":
+ p.move = "none";
+ p.fade = "in";
ret = a.fadeIn(p);
break;
case "fadeOut":
+ p.move = "none";
+ p.fade = "out";
ret = a.fadeOut(p);
break;
+
case "drain":
+ p.move = "none";
+ p.rotate = -720;
+ p.fade = "out";
+ p.scale = 1;
ret = a.drain(p);
break;
+
case "phantomZone":
+ p.move = "none";
+ p.rotate = -720;
+ p.flip = "left";
+ p.fade = "out";
+ p.scale = 1;
ret = a.phantomZone(p);
break;
+
case "pageFlipLeft":
+ p.flip = "left";
+ p.perspectiveOrigin = "left";
ret = a.pageFlipLeft(p);
break;
case "pageFlipRight":
+ p.flip = "right";
+ p.perspectiveOrigin = "right";
ret = a.pageFlipRight(p);
break;
case "pageFlipUp":
+ p.flip = "up";
+ p.perspectiveOrigin = "top";
ret = a.pageFlipUp(p);
break;
case "pageFlipDown":
+ p.flip = "down";
+ p.perspectiveOrigin = "bottom";
ret = a.pageFlipDown(p);
break;
+
case "twirlFromLeft":
+ p.move = "none";
+ p.rotate = -135;
+ p.flip = "left";
+ p.perspectiveOrigin = "left";
ret = a.twirlFromLeft(p);
break;
case "twirlFromRight":
+ p.move = "none";
+ p.rotate = 135;
+ p.flip = "right";
+ p.perspectiveOrigin = "right";
ret = a.twirlFromRight(p);
break;
+
case "raceFlag":
+ p.move = "up";
+ p.rotate = -720;
+ p.flip = "down";
+ p.perspectiveOrigin = "top-right";
ret = a.raceFlag(p);
break;
+
case "hinge":
+ p.duration = "1000ms";
+ p.timing = "linear";
+ p.iteration = "infinite";
+ p.direction = "alternate";
+ p.move = "none";
+ p.rotate = 45;
+ p.overshoot = 0;
+ p.perspectiveOrigin = "top-left";
ret = a.hinge(p);
break;
+
case "wobble":
+ p.duration = "200ms";
+ p.timing = "linear";
+ p.iteration = "infinite";
+ p.direction = "alternate";
+ p.move = "none";
+ p.rotate = 5;
+ p.overshoot = 0;
+ p.perspectiveOrigin = "center";
ret = a.wobble(p);
break;
+
case "dance":
+ p.duration = "500ms";
+ p.timing = "easeInOutBack";
+ p.iteration = "infinite";
+ p.direction = "alternate";
+ p.move = "none";
+ p.rotate = 45;
+ p.overshoot = 0;
+ p.perspectiveOrigin = "center";
ret = a.dance(p);
break;
+
case "pendulum":
+ p.duration = "1000ms";
+ p.timing = "ease-in-out";
+ p.iteration = "infinite";
+ p.direction = "alternate";
+ p.move = "none";
+ p.rotate = 45;
+ p.overshoot = 0;
+ p.perspectiveOrigin = "top";
ret = a.pendulum(p);
break;
+
case "bounce":
+ p.scale = "125%";
+ p.duration = "500ms";
+ p.timing = "easeOutSine";
+ p.iteration = "infinite";
+ p.direction = "alternate";
+ p.move = "none";
ret = a.bounce(p);
break;
+
default:
ret = a.slide(p);
break;
View
@@ -1,4 +1,19 @@
<!DOCTYPE html>
+<!--
+ Copyright 2011-2012 Research In Motion Limited.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
@@ -7,7 +22,7 @@
<style type="text/css">
body, select {
font: 8pt Arial, sans-serif;
- overflow: hidden;
+ /*overflow: hidden;*/
}
.card {
View
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="0.2.0" rim:header="RIM-Widget:rim/widget">
+ <name>AliceJS</name>
+ <description>AliceJS (A Lightweight Independent CSS Engine)</description>
+ <author rim:copyright="2012">Research In Motion Limited</author>
+ <icon rim:hover="false" src="images/app_icon.png"/>
+ <icon rim:hover="true" src="images/app_icon.png"/>
+ <content src="sample.html"/>
+</widget>
Oops, something went wrong.

0 comments on commit a0df322

Please sign in to comment.