Docs

API

useOnStop method

loopic.useOnStop([middlewareFunction])

  • middlewareFunction Function
    • next Function

Description

Method used for adding additional middleware functions to the stop pipeline. Middleware functions will be called in the same order as they were added to the pipeline.

Middleware function receives the reference to the next middleware function in the pipeline. Next function must be called if you want to execute all other middlewares left for that dynamic id. If you do not want to execute left middlewares, skip adding next() call.

Example

loopic.useOnStop((next) => {
  goto(30);
  playAnimation({ backwards:true });
});