PostProcessGroup class
A special type of PostProcess that is used to group multiple post processes together. This is useful for applying multiple post processes at once.
Beware that all elements in postProcesses will be rendered with the same "subtree", sof if more than one item calls renderSubtree, the subtree will be rendered multiple times. If multiple post processes need to call rasterizeSubtree or renderSubtree, consider using PostProcessSequentialGroup.
In other words, the subtree of the group post process will be shared in parallel with all the post processes in the group.
See also:
- PostProcess for a single post process and more information on what is the "subtree" of a post process.
- PostProcessSequentialGroup for a group of post processes that will be applied in sequence where each post process will be considered part of the subtree of the next one.
- Inheritance
-
- Object
- PostProcess
- PostProcessGroup
- Implementers
Constructors
-
PostProcessGroup.new({required List<
PostProcess> postProcesses})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- pixelRatio ↔ double
-
The pixel ratio of the screen. This is used to scale the image generated
by rasterizeSubtree to the correct size.
getter/setter pairinherited
-
postProcesses
→ List<
PostProcess> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onLoad(
) → Future< void> -
Similarly to components, post processes can be loaded asynchronously.
override
-
postProcess(
Vector2 size, Canvas canvas) → void -
There the effects of the post process are applied. This is where you
should implement the logic of the post process. Including eventual calls
to rasterizeSubtree and renderSubtree.
inherited
-
rasterizeSubtree(
) → Image -
One of the two methods that subclasses should invoke to render the
what is considered the "subtree" of the post process.
inherited
-
render(
Canvas canvas, Vector2 size, ValueSetter< Canvas> renderTree, ValueSetter<PostProcess?> updateContext) → void -
This method is called to render the post process, to be called by the
"owner" of
the post process, like a CameraComponent or a PostProcessComponent.
override
-
renderSubtree(
Canvas canvas) → void -
One of the two methods that subclasses should invoke to render the
what is considered the "subtree" of the post process.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
double dt) → void -
This method is called every frame to update the post process.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited