just in case, adding scaling factor to make it easy to shrink

This commit is contained in:
Danny Yoo 2011-07-23 00:57:58 -04:00
parent 57466a81ac
commit 52eaf29993
6 changed files with 16 additions and 14 deletions

BIN
racketcon/bootstrap.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@ -6,6 +6,3 @@
1]
[else
(* x (fact (sub1 x)))]))
;;(printf "test: ~s\n" (fact 4))

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="utf-8"/>
<title>Example</title>
<title>Hello</title>
</head>
<script>
<![CDATA[(function(window, undefined) {
@ -41924,4 +41924,4 @@ var invokeMainModule = function() {
]]>
</script>
<body></body>
</html>
</html>

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="utf-8"/>
<title>Example</title>
<title>Pacman</title>
</head>
<script>
<![CDATA[(function(window, undefined) {
@ -56733,4 +56733,4 @@ var invokeMainModule = function() {
]]>
</script>
<body></body>
</html>
</html>

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta charset="utf-8"/>
<title>Example</title>
<title>Rain</title>
</head>
<script>
<![CDATA[(function(window, undefined) {
@ -43030,4 +43030,4 @@ var invokeMainModule = function() {
]]>
</script>
<body></body>
</html>
</html>

View File

@ -3,6 +3,8 @@
(require (planet dyoo/whalesong/js))
(require (planet dyoo/whalesong/world))
(define scaling-factor .75)
;; A slide is either a simple string or an image.
(define font-size 50)
@ -19,14 +21,16 @@
(scale 2 (image-url "file:///home/dyoo/work/whalesong/racketcon/plt-logo.png"))
(square 20 "solid" "white")
(text "Danny Yoo (dyoo@hashcollision.org)" 50 "darkblue"))
"Why Whalesong?"
(above (text "Why Whalesong?" font-size "black")
(square 20 "solid" "white")
(scale 2 (image-url "file:///home/dyoo/work/whalesong/racketcon/bootstrap.gif")))
"World programs on the web"
(above (text "Reusing Racket's compiler..." font-size "black")
(square 20 "solid" "white")
(text "Hello world?" (floor (* font-size 2/3)) "black"))
"Web programs can use Racket"
"What's missing?"
"http://hashcollision.org/whalesong"))
"Web programs can use Racket too!"
"What's next?"
(text "http://hashcollision.org/whalesong" 80 "black")))
@ -51,6 +55,7 @@
(define (draw w)
(scale scaling-factor
(let ([a-slide (list-ref slides w)]
[bg (BACKGROUND)])
(cond
@ -64,7 +69,7 @@
(place-image a-slide
(quotient (image-width bg) 2)
(quotient (image-height bg) 2)
bg)])))
bg)]))))
(define (tick w)
w)