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
Section titled “Type Parameters”PluginT
Section titled “PluginT”PluginT
extends Plugin
<ResultT
>
Type of plugin
ResultT
Section titled “ResultT”ResultT
extends object
= { }
Type of processing results
Parameters
Section titled “Parameters”plugin
Section titled “plugin”PluginT
Plugin to introduce delay to
number
= 0
Number of updates to delay
Returns
Section titled “Returns”PluginT
& object
Plugin with delay added