Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/core/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ export class Window extends PsychObject
}

this._frameCount++;
// update the stimuli (including pixi stuff) before rendering
this._refresh();

// render the PIXI container:
this._renderer.render(this._rootContainer);
Expand All @@ -368,9 +370,6 @@ export class Window extends PsychObject

// log:
this._writeLogOnFlip();

// prepare the scene for the next animation frame:
this._refresh();
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/util/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ export class Scheduler

// self._psychoJS.window._writeLogOnFlip();

// update stimuli and render the scene in the window:
self._psychoJS.window.render();

// run the next scheduled tasks until a scene render is requested:
const state = await self._runNextTasks();
if (state === Scheduler.Event.QUIT)
Expand All @@ -157,9 +160,6 @@ export class Scheduler
self._lastDelta = timestamp - lastTimestamp;
self._lastTimestamp = timestamp;

// render the scene in the window:
self._psychoJS.window.render();

// request a new frame:
requestAnimationFrame(update);
};
Expand Down