Background class, and 5 examples.#1197
Background class, and 5 examples.#1197einarf merged 16 commits intopythonarcade:2.7from DragonMoffon:backgrounds
Conversation
…elopment # Conflicts: # doc/tutorials/shader_toy_particles/index.rst
…stationary.py is complete.
|
Some quick intial comments. This actually looks really solid, but I am not 100% sure about the details around what properties should be on the texture and the background itself to give the most flexbility. Also there are missing some type annotations here, but I think fixing the more obvious things and just merging it is a better approach here. Play around with the feature and tweak things instead. Adding a RGBA color multiplier can also add a lot of flexiblity here instead of just blend. We can really merge this as it is now to be honest. Knitpicking on smaller things that are subject to change around a little bit won't move us forward. |
|
For the colour should, do you think I should apply via multiply or addition? Currently, have it as multiply, but if someone wanted to fade in the color, it would be easier if it was added. Also, I have it supporting both normalised and not, but I decide if the colour is normalised by seeing if the sum of the colour is less than or equal to 3, which may cause some confusing bugs. Is there a better way of deciding? |
|
…tation. made backgrounds in BackgroundGroup and ParallaxGroup 'private'. Gave them __get_item__, __set_item__, and __iter__. The color was added as RGB with blending separate. Mainly because it makes the purpose of the variable clearer. It is meant to be used for blending between backgrounds, as such I think it should stay as it is. This can be changed if people disagree.
|
Some of the functions are still missing docstrings. Which will need to be fixed before 2.7 is out. But otherwise, it should be mergeable. |
The push Implements a background class, and BackgroundTexture, BackgroundGroup, and ParallaxGroup. Plus five examples: static Background, scrolling Background, BackgroundGroup, ParallaxGroup, and Blending between Backgrounds.
These close #1152 and #991