scaled everything by 5

This commit is contained in:
Dave Griffiths 2009-06-20 07:40:39 +01:00
parent e95d837813
commit 057656012d

View file

@ -8,8 +8,8 @@
(pdata-index-map! (pdata-index-map!
(lambda (i p) (lambda (i p)
(let ((a (* (/ (quotient i 2) n) (* 2 3.141))) (let ((a (* (/ (quotient i 2) n) (* 2 3.141)))
(s (if (odd? i) sr er))) (s (* (if (odd? i) sr er) 5)))
(vector (* (cos a) s) (* (sin a) s) (if (odd? i) 0 1)))) (vector (* (cos a) s) (* (sin a) s) (if (odd? i) 0 5 ))))
"p") "p")
(recalc-normals 1)) (recalc-normals 1))
@ -58,15 +58,15 @@
(let* ((s (- size age)) (let* ((s (- size age))
(sr (* radius (/ s size))) (sr (* radius (/ s size)))
(er (* radius (/ (- s 1) size)))) (er (* radius (/ (- s 1) size))))
(translate (vector 0 0 age)) (translate (vector 0 0 (* age 5)))
(when (zero? (random 3)) (when (zero? (random 3))
(with-state (with-state
(identity) (identity)
(set! child-twigs (cons (set! child-twigs (cons
(make-object twig% (/ size 2) sr speed) child-twigs)) (make-object twig% (/ size 2) sr speed) child-twigs))
(send (car child-twigs) build (vector 0 0 age) #f))) (send (car child-twigs) build (vector 0 0 (* age 5) ) #f)))
(build-ring 5 sr er))))) (build-ring 5 sr er)))))
(with-primitive camera (parent p))) (with-primitive camera (parent p)))
(set! age (+ age 1)))) (set! age (+ age 1))))
@ -83,7 +83,8 @@
(debounce #t) (debounce #t)
(debounce-time 0) (debounce-time 0)
(root (with-state (root (with-state
(translate (vector 0 -0.25 0)) (scale 5)
(translate (vector 0 0 0))
(texture (load-texture "textures/skin.png")) (texture (load-texture "textures/skin.png"))
(backfacecull 0) (backfacecull 0)
(opacity 0.6) (opacity 0.6)
@ -120,6 +121,10 @@
; build world ; build world
(with-state
(scale 5 )
(translate (vector 0 0 0))
(with-state (with-state
(texture (load-texture "textures/top.png")) (texture (load-texture "textures/top.png"))
(translate (vector 0 20 0)) (translate (vector 0 20 0))
@ -172,7 +177,6 @@
; soil ; soil
(with-state (with-state
(texture (load-texture "textures/sback.png")) (texture (load-texture "textures/sback.png"))
(translate (vector 0 -15 -19.99)) (translate (vector 0 -15 -19.99))
@ -203,7 +207,7 @@
(rotate (vector 0 90 0)) (rotate (vector 0 90 0))
(scale 40) (scale 40)
(hint-unlit) (hint-unlit)
(build-plane)) (build-plane)))
(lock-camera camera) (lock-camera camera)
(camera-lag 0.05) (camera-lag 0.05)
@ -215,7 +219,7 @@
(clear-colour (vector 0.1 0.3 0.2)) (clear-colour (vector 0.1 0.3 0.2))
(fog (vector 0.2 0.5 0.3) 0.03 1 100) (fog (vector 0.2 0.5 0.3) 0.01 1 100)
(define s (make-object seed%)) (define s (make-object seed%))
(every-frame (send s update)) (every-frame (send s update))