Example
Optimizing images
Example 0015: Optimizing images
  1. -- Example: Optimizing images 
  2.  
  3. angle = 0 
  4.  
  5. function load() 
  6.     image = love.graphics.newImage("images/love-ball.png", love.image_optimize) 
  7. end 
  8.  
  9. function update(dt) 
  10.     angle = angle + dt 
  11.     x, y = 400 + math.cos(angle)*100300 + math.sin(angle)*100 
  12. end 
  13.  
  14. function draw() 
  15.     love.graphics.draw(image, x, y) 
  16. end 
  17.  
  18.  
Copyright © 2006-2008 LÖVE Development Team.