1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-11 16:18:10 +00:00

core/MinimalStim: add release method

This commit is contained in:
Sotiri Bakagiannis 2020-07-24 17:11:40 +01:00
parent e0b7bc8d5b
commit 5b69621ffa

View File

@ -160,6 +160,26 @@ export class MinimalStim extends PsychObject
}
/**
* Release the PIXI representation, if there is one.
*
* @name module:core.MinimalStim#release
* @function
* @public
*/
release()
{
this._setAttribute('autoDraw', false, log);
this.status = PsychoJS.Status.STOPPED;
if (typeof this._pixi !== 'undefined')
{
this._pixi.destroy(true);
this._pixi = undefined;
}
}
/**
* Update the stimulus, if necessary.
*