|
libscratchcpp
A library for C++ based Scratch project players
|
libscratchcpp provides API for adding custom graphics effects. No effects are included with libscratchcpp and must be implemented by the project player.
To add a graphics effect that libscratchcpp doesn't support, subclass IGraphicsEffect and override all of the methods.
It's recommended to use the libscratchcpp namespace like this in your class:
The name() method should return the name of the effect which is used by the set and change effect blocks, for example ghost or fisheye.
To register the graphics effect, use ScratchConfiguration::registerGraphicsEffect() .
Effects in Scratch are usually identified by their name (ghost, brightness, etc.), but this isn't effective when it comes to running projects. Those "names" are therefore replaced by IGraphicsEffect pointers which makes working with effects faster.