How to draw vector image with mesh?
When I set the texture as vector image, it blurred.
function setup() m = mesh() m.texture = readImage("Space Art:Red Ship") m:addRect(WIDTH/2,HEIGHT/2,300,300) end function draw() background(40, 40, 50) m:draw() end
Hello @wave. Specify the size of the image when you read it in:
function setup() m = mesh() m.texture = readImage("Space Art:Red Ship", 300, 300) -- Changed m:addRect(WIDTH / 2, HEIGHT / 2, 300, 300) end function draw() background(40, 40, 50) m:draw() end
As indicated in the Sprite Pack dialogue, ‘Red Ship’ is only 100 x 80 pixels in size, by default.
(Update) The ‘readImage’ entry in the ‘Storage’ chapter of Codea’s in-app reference may be of help.
@mpilgrem
Oops, I didn’t read the reference carefully.
Thank you for the help.