diff --git a/apps/app/gallery-app/animations/css-keyframes.css b/apps/app/gallery-app/animations/css-keyframes.css new file mode 100644 index 000000000..b22f8c3aa --- /dev/null +++ b/apps/app/gallery-app/animations/css-keyframes.css @@ -0,0 +1,58 @@ +@keyframes intro { + 0% { + opacity: 0; + transform: translate(-100, 0); + } + 100% { + opacity: 1; + transform: translate(0, 0); + } +} +@keyframes outro { + 0% { + opacity: 1; + transform: translate(0, 0); + } + 100% { + opacity: 0; + transform: translate(-100, 0); + } +} + +.intro { + animation-name: intro; + animation-duration: 3.0; + animation-fill-mode: forwards; + animation-iteration-count: 1; + animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); +} +.outro { + animation-name: outro; + animation-duration: 3.0; + animation-fill-mode: forwards; + animation-iteration-count: 1; + animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); +} + +.gone { + opacity: 0; + transform: translate(-100, 0); +} + +@keyframes play { + 0% { transform: translate(0, 0); } + 33% { transform: translate(100, 0); } + 66% { transform: translate(100, 100); } + 100% { transform: translate(0, 100); } +} + +.idle { + transform: translate(0, 0); +} +.play { + animation-name: play; + animation-duration: 3.0; + animation-fill-mode: forwards; + animation-iteration-count: 1; + animation-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1); +} diff --git a/apps/app/gallery-app/animations/css-keyframes.ts b/apps/app/gallery-app/animations/css-keyframes.ts new file mode 100644 index 000000000..1abd4d8ed --- /dev/null +++ b/apps/app/gallery-app/animations/css-keyframes.ts @@ -0,0 +1,13 @@ +import { View, EventData } from "ui/core/view"; + +export function setClass(args: EventData) { + const btn = (args.object); + const img = btn.page.getViewById("img"); + img.className = btn.tag; +} + +export function setImg2Class(args: EventData) { + const btn = (args.object); + const img2 = btn.page.getViewById("img2"); + img2.className = btn.tag; +} diff --git a/apps/app/gallery-app/animations/css-keyframes.xml b/apps/app/gallery-app/animations/css-keyframes.xml new file mode 100644 index 000000000..bfe152bb6 --- /dev/null +++ b/apps/app/gallery-app/animations/css-keyframes.xml @@ -0,0 +1,18 @@ + + +