sync on
 
texsize=256
 
gosub getsnowtexture
 
paste image 1,1,1
 
sleep 1
 
cls
backdrop on
color backdrop 1
 
make object cube 1,100
texture object 1,1
 
while mouseclick()=0
 
   xangle#=wrapvalue(object angle x(1)+1.0)
   yangle#=wrapvalue(object angle y(1)+1.0)
   zangle#=wrapvalue(object angle z(1)+1.0)
   rotate object 1,xangle#,yangle#,zangle#
 
   sync
 
endwhile
 
end
 
getsnowtexture:
 
   ink rgb(120,200,255),0
   box 1,1,texsize,texsize
 
   for i=1 to 500
      c1=rnd(255)
      ink rgb(c1,c1,255),0
      x=rnd(texsize)
      y=rnd(texsize)
      for j=1 to 200
         dot (rnd(40)-20)+x,(rnd(40)-20)+y
      next j
   next i
 
   for i=1 to 500
      ink rgb(rnd(155)+100,255,255),0
      x=rnd(texsize)
      y=rnd(texsize)
      for j=1 to 200
         dot (rnd(40)-20)+x,(rnd(40)-20)+y
      next j
   next i
 
   get image 1,1,1,texsize,texsize
 
return