sync on
 
texsize=256
 
gosub getsomethingtexture
 
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
 
getsomethingtexture:
 
   for x=1 to texsize
      ink rgb(rnd(255),rnd(255),rnd(255)),0
      line texsize/2,texsize/2,x,1
   next i
   for y=1 to texsize
      ink rgb(rnd(255),rnd(255),rnd(255)),0
      line texsize/2,texsize/2,texsize,y
   next i
   for x=1 to texsize
      ink rgb(rnd(255),rnd(255),rnd(255)),0
      line texsize/2,texsize/2,x,texsize
   next i
   for y=1 to texsize
      ink rgb(rnd(255),rnd(255),rnd(255)),0
      line texsize/2,texsize/2,1,y
   next i
 
   get image 1,1,1,texsize,texsize
 
   `suspend for key
 
return