Posted: 10th Dec 2002 2:36
Another silly text snippet I was playing with, actualy I was experimenting with a couple of those mysterious 3D math commands.

+ Code Snippet
sync on : sync rate 60

txt$ = "Scretching text thingumajig with help from 2D vectors"

v = make vector2(0)
v = make vector2(1)
v = make vector2(2)

set vector2 2, bitmap width()/2, bitmap height()/2
spacing# = 2.0 / len(txt$)

repeat
  cls
  set vector2 1, mousex(), mousey()

  for i = 1 to len(txt$)
    linear interpolate vector2 0, 1, 2, i * spacing#
    text x vector2(0), y vector2(0), mid$(txt$,i)
  next i

  sync
until spacekey()

v = delete vector2(2)
v = delete vector2(1)
v = delete vector2(0)

end