Difference between revisions of "TÖVE"

m (Poke1024 moved page Tove2D to TÖVE)
Line 1: Line 1:
TÖVE brings vector graphics to LÖVE. It supports:
+
TÖVE brings basic vector graphics to LÖVE. It supports:
  
 
* Loading SVGs
 
* Loading SVGs

Revision as of 20:30, 6 March 2019

TÖVE brings basic vector graphics to LÖVE. It supports:

  • Loading SVGs
  • Constructing vector graphics on the fly
  • Animating vector graphics
  • Gradients
  • Different Renderers

Example

local tove = require "tove"

-- load graphics from svg file. TÖVE also supports
-- constructing vector graphics on the fly.

svgData = love.filesystem.read("assets/rabbit.svg")
graphics = tove.newGraphics(svgData, 200)

-- for rendering, choose among three renderers:
-- "texture" will render into a bitmap
-- "mesh" will tesselate into a mesh
-- "gpux" will use a shader implementation

graphics:setDisplay("mesh", 200)

function love.draw()
	-- render svg at mouse position.

	x, y = love.mouse.getPosition()
	graphics:draw(x, y)
end

Links