diff --git a/js/core/MinimalStim.js b/js/core/MinimalStim.js index 83ea680..be3dbda 100644 --- a/js/core/MinimalStim.js +++ b/js/core/MinimalStim.js @@ -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. *