Introducing 

Prezi AI.

Your new presentation assistant.

Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.

Loading…
Transcript

speed = document.getElementById("speed").value;

z = speed * event.alpha; //z

x = speed * event.beta; // x

y = speed * event.gamma; //y

function isCatch() {

if (foxleft >= bx - size && foxleft <= bx + size)

if (foxtop >= by - size && foxtop <= by + size) {

domChicken = document.getElementById("chicken");

animflag = true;

if (domChicken.style.backgroundImage == 'url("/icons/hunter.gif")')

showEndPanel();

else {

document.getElementById("soundstop").play();

foxes++;

domChicken.style.display = "none";

setTimeout(nextFox, 1000);

} }}

if (Math.random() > 0.9)

document.getElementById("chicken").style.backgroundImage = 'url("/icons/hunter.gif")';

else

document.getElementById("chicken").style.backgroundImage = 'url("/icons/ChickenDancing.gif")';

setTimeout(timer, 1000);

}

Firefox OS

minta alkalmazás

Róka és a Kakas

Készítette:

Karóczkai Krisztián

Beállítások menü

Switches & input range

#size

#speed

<label class="pack-switch">

<input type="checkbox" checked>

<span></span>

</label>

#menu-vibra

<input type="range" min="24" value="64" max="64" />

#menu-volume

#menu-auto

#menu-down

<label class="pack-radio">

<input type="radio"

name="example" checked>

<span></span>

</label>

#orientport

Amikor fut a róka

Kijelző tájolása

#menu-up

#orientland

window.addEventListener('deviceorientation', function(event){}, true);

window.screen.mozLockOrientation("landscape-primary");

portrait-primary

window.screen.unlockOrientation()

landscape-primary

window.screen.mozLockOrientation("portrait-primary")

foxleft -= Math.round(x);

foxtop -= Math.round(y);

.style.left =

(screen.width - size)+ "px";

Találkozások: Róka + Kakas vagy Vadász

foxleft += Math.round(x);

foxtop += Math.round(y);

window.screen.mozLockOrientation("landscape-primary")

foxleft -= Math.round(x);

foxtop += Math.round(y);

foxleft += Math.round(x);

foxtop -= Math.round(y);

.style.top =

(screen.height - size) + "px";

portrait-secondary

foxleft -= Math.round(x);

foxtop = Math.round(y);

bx,by

landscape-secondary

foxleft += Math.round(x);

foxtop += Math.round(y);

foxleft += Math.round(x);

foxtop -= Math.round(y);

foxleft,foxtop

foxleft -= Math.round(x);

foxtop += Math.round(y);

screen.addEventListener("mozorientationchange", handleScreenOrientation, true);

Amivel elment az idő...

Hogyan működik?

size

Motiváció: ennyit evett a Róka

Rókának ennie kell

15 másodpercenként

mozorientationchange

Minél többet evett annál gyorsabb a mozgás és kissebbek a figurák

window.screen.mozLockOrientation("landscape-primary");

foxleft (-/+)= Math.round(x);

foxtop (-/+)= Math.round(y);

Mozog a telefon

mozog a Róka

Néha Vadász lesz

a Kakas... nem

lehet megenni...

A Kakas táncol

Learn more about creating dynamic, engaging presentations with Prezi