This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var av = new Avatar(Avatar.getName(5)); | |
var x = 140; | |
frameRate(10); | |
var nx = [0.25,3,1,-3,1,1,3.5,3,-3.5,-3]; | |
var ag = [0,-40,-90,90,-90,-30,20,-60,-20,-60]; | |
av.setLimits([ | |
[-5,5],[-40,90],[-90,5],[-40,90],[-90,5], | |
[30,90],[-60,60],[-5,80],[-60,60],[-5,80]]); | |
for (var i=0; i<av.joints(); i++) { | |
av.setNext(i,nx[i]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var av = new Avatar(1); | |
av.scale(0.75); | |
var x = 190; | |
var incx = true; | |
var pausa = false; | |
av.setLimit(0,-3,3); | |
av.setLimit(1,10,40); | |
av.setLimit(3,-30,0); | |
av.setLimit(5,-8,8); | |
av.setLimit(6,-10,10); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var av = new Avatar(2); | |
av.scale(0.5); | |
var inc = +1; | |
var inicio = true; | |
var pausa = false; | |
var draw = function() { | |
background(255, 255, 0); | |
if (av.getAngle(1)===180) { | |
inc = -inc; | |
inicio = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Juego Adivina (v4)</title> | |
<style> | |
body { | |
width:320px; font:bold large Helvetica; | |
background-color: grey; color: yellow; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bola = { | |
r:30, col:color(224, 85, 168), | |
x:190, y:50, | |
rep:0, sube:false | |
}; | |
var pantera = { | |
av: new Avatar(5), | |
x:150, y:180, | |
go: true, | |
rep:0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var av = new Avatar(5); | |
av.scale(0.75); | |
var pausa = false; | |
frameRate(25); | |
//println(av.getLimits()); | |
av.setLimit(6,-70,70); | |
av.setNext(6,5); | |
var draw = function() { | |
background(240, 232, 240); | |
av.next(6); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var av = new Avatar(5); | |
av.scale(0.75); | |
var pausa = false; | |
av.setLimit(6,-90,0); | |
av.setAngle(6,1); | |
av.setAngle(7,75); | |
var rep = 0; | |
var bola = {r:30, col:color(224, 85, 168), y:50, rep:0, sube:false}; | |
var draw = function() { | |
background(240, 232, 240); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Star = u"\u2605" | |
for s in [Star*i for i in range(1,5)]: print s | |
for s in [Star*i for i in reversed(range(1,10)) if i%2==1]: print s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Star = u"\u2605" | |
def getTuplas(msj, ini, fin): | |
salida = [] | |
for i in range(ini,fin+1): | |
tupla = (msj, i) | |
salida.append(tupla) | |
return salida | |
print "\nStarbucks score:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h1 = [25,25,25,0,0,0,0,0,0]; | |
var c1 = [0,0,0,0,25,25,-25,-25]; | |
var i = 0; | |
var avanza = +1; | |
frameRate(15); | |
var av = new Avatar(0); | |
av.scale(0.5); | |
var draw = function() { | |
background(255); | |
av.rotate(1,h1[i]*avanza); |