From 5a84db226797bfd2e08ec1c060ee64d43d430eb9 Mon Sep 17 00:00:00 2001 From: devZoGok Date: Sat, 26 Mar 2022 12:51:42 +0200 Subject: [PATCH] comments --- particleEmitterSample.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/particleEmitterSample.cpp b/particleEmitterSample.cpp index f6eee28..c956c19 100644 --- a/particleEmitterSample.cpp +++ b/particleEmitterSample.cpp @@ -46,6 +46,11 @@ int main(){ Texture *texture = new Texture(images, 1, false); mat->addTexUniform("tex", texture, false); + /* + * Sets emitter properties, such as the color gradient of the + * grayscale particle image, particle lifetime in seconds and + * their speed + */ emitter->setMaterial(mat); emitter->setStartColor(Vector4(1, 1, 1, 1)); emitter->setEndColor(Vector4(1, 0, 1, 1)); @@ -84,6 +89,10 @@ int main(){ animation->addKeyframeChannel(startRedChan); animation->addKeyframeChannel(endRedChan); + /* + * The AnimationController plays the animations set in the AnimationChannel objects. + * AnimationChannel objects require an animation and animatable objects, e.g. textures to work. + */ AnimationController *controller = AnimationController::getSingleton(); controller->addAnimation(animation); AnimationChannel *animChan = new AnimationChannel();