Complete and add a minimal BackgroundTexture class
Having a BackgroundTexture class solves quite a few use cases that are difficult for most users to implement without having to use shaders. The name can still be debated. It's pretty close to a RenderTargetTexture currently in experimental, so maybe we should look into that relation. The BackgroundTexture is just a wrapper over an arcade.gl.Texture.
Some ponts:
- It should not use the texture atlas because using this type is a good way to avoid flooding the atlas with large images
- Default initializer can take a width and height
-
BackgroundTexure.from_file(path)would load an image from file. Possibly using the texture cache - Support scrolling texture coordiantes in pixels
- Support rotating texture coordiantes with preserved aspect ratio
- Support enabling and disabling texture repeat
- Support enabling mipmaps (useful if zooming)
- Support setting a
Mat3directly for finer control over texture coordinate transformations - It can also work as a render target, so it also needs to be a framebuffer.
with bg.enabled() - Should it have the same pixel scale as the window framebuffer?
- Create a default texture shader users can load. It should be compatible with the vertex format in
arcade.gl.geometry.
More thinking is needed.
This might be a dupe of #991
I don't think it's a direct dupe, but it's good to get them linked up to provide the most information. It might be a sub-issue of this one.
#1152 is the original / related issue
This is still in experimental and is subject to change. We can move this to 3.x