It looks like you're new here. If you want to get involved, click one of these buttons!
Tiled_Flow = Core.class(Sprite) function Tiled_Flow:init() local tex = Texture.new("mytex.png", false, {wrap = TextureBase.REPEAT}) self.img = Pixel.new(tex, 64, 64) self:addChild(self.img) self.flowx, self.flowy = 0, 0 self.flowspeedx, self.flowspeedy = 1, 1 self:addEventListener(Event.ENTER_FRAME, self.onEnterFrame, self) end function Tiled_Flow:onEnterFrame(e) self.flowx += self.flowspeedx or 0 self.flowy += self.flowspeedy or 0 self.img:setTexturePosition(self.flowx, self.flowy) -- this moves the texture on x and y -- is it possible to rotate the texture as well? end |
Comments
I tried to use lua shaders, but I have no idea how to get/set mat4 elements in vertex shader.
@SinisterSoft can you help with that?)
Or something like that:
Oh I will also try your Viewport solution
Likes: MoKaLux, SinisterSoft
Thank you for fixing it (and having updated reactPhysics3d )
Likes: SinisterSoft, rrraptor
Likes: MoKaLux
https://deluxepixel.com