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!
(lambda (i p)
(let ((a (* (/ (quotient i 2) n) (* 2 3.141)))
(s (if (odd? i) sr er)))
(vector (* (cos a) s) (* (sin a) s) (if (odd? i) 0 1))))
(s (* (if (odd? i) sr er) 5)))
(vector (* (cos a) s) (* (sin a) s) (if (odd? i) 0 5 ))))
"p")
(recalc-normals 1))
@ -36,10 +36,10 @@
(cond (dir
(concat (maim dir (vector 0 0 1)))
(rotate (vector 0 -90 0)))
(else (rotate (vmul (crndvec) 20))))))
(else (rotate (vmul (crndvec) 20))))))
(define/public (update)
(for-each
(lambda (child)
(send child update))
@ -58,15 +58,15 @@
(let* ((s (- size age))
(sr (* radius (/ s size)))
(er (* radius (/ (- s 1) size))))
(translate (vector 0 0 age))
(translate (vector 0 0 (* age 5)))
(when (zero? (random 3))
(with-state
(identity)
(set! child-twigs (cons
(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)))
(set! age (+ age 1))))
@ -83,7 +83,8 @@
(debounce #t)
(debounce-time 0)
(root (with-state
(translate (vector 0 -0.25 0))
(scale 5)
(translate (vector 0 0 0))
(texture (load-texture "textures/skin.png"))
(backfacecull 0)
(opacity 0.6)
@ -120,6 +121,10 @@
; build world
(with-state
(scale 5 )
(translate (vector 0 0 0))
(with-state
(texture (load-texture "textures/top.png"))
(translate (vector 0 20 0))
@ -172,7 +177,6 @@
; soil
(with-state
(texture (load-texture "textures/sback.png"))
(translate (vector 0 -15 -19.99))
@ -203,7 +207,7 @@
(rotate (vector 0 90 0))
(scale 40)
(hint-unlit)
(build-plane))
(build-plane)))
(lock-camera camera)
(camera-lag 0.05)
@ -215,7 +219,7 @@
(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%))
(every-frame (send s update))