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:
parent
e0b7bc8d5b
commit
5b69621ffa
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user