DelayPlugin
DelayPlugin<
PluginT
,ResultT
>(plugin
,delay
):PluginT
&object
Factory function adding delay to a plugin
In delayed plugin update() method is called with detection results from one of the previous iterations of the tracking engine. This way we achieve effect of object following its controller with some delay. Delay may be used in combination with various twin plugins to achieve less artificial behaviour of twins that will repeat user movements without absolute synchronization in time and thus look more natural.
Type Parameters
• PluginT extends Plugin
<ResultT
>
Type of plugin
• ResultT extends object
= object
Type of processing results
Parameters
• plugin: PluginT
Plugin to introduce delay to
• delay: number
= 0
Number of updates to delay
Returns
PluginT
& object
Plugin with delay added