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

Merge pull request #472 from peircej/bf-orientation-convention

BF: _pixi.rotation should be set to -this._ori to match PsychoPy (clock) ori
This commit is contained in:
Alain Pitiot 2022-01-25 11:26:25 +01:00 committed by GitHub
commit 4fea70f605
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 8 additions and 8 deletions

View File

@ -282,7 +282,7 @@ export class FaceDetector extends VisualStim
this._pixi.scale.x = 1;
this._pixi.scale.y = -1;
this._pixi.rotation = this.ori * Math.PI / 180;
this._pixi.rotation = -this.ori * Math.PI / 180;
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
this._pixi.alpha = this._opacity;

View File

@ -312,7 +312,7 @@ export class ImageStim extends util.mix(VisualStim).with(ColorMixin)
// set the position, rotation, and anchor (image centered on pos):
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
this._pixi.rotation = this.ori * Math.PI / 180;
this._pixi.rotation = -this.ori * Math.PI / 180;
this._pixi.anchor.x = 0.5;
this._pixi.anchor.y = 0.5;

View File

@ -401,7 +401,7 @@ export class MovieStim extends VisualStim
// set the position, rotation, and anchor (movie centered on pos):
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
this._pixi.rotation = this.ori * Math.PI / 180;
this._pixi.rotation = -this.ori * Math.PI / 180;
this._pixi.anchor.x = 0.5;
this._pixi.anchor.y = 0.5;

View File

@ -260,7 +260,7 @@ export class ShapeStim extends util.mix(VisualStim).with(ColorMixin, WindowMixin
// set polygon position and rotation:
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
this._pixi.rotation = this.ori * Math.PI / 180.0;
this._pixi.rotation = -this.ori * Math.PI / 180.0;
}
/**

View File

@ -668,7 +668,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
this._pixi.scale.x = 1;
this._pixi.scale.y = -1;
this._pixi.rotation = this._ori * Math.PI / 180;
this._pixi.rotation = -this._ori * Math.PI / 180;
this._pixi.position = this._getPosition_px();
this._pixi.alpha = this._opacity;
@ -1095,7 +1095,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
const labelText = new PIXI.Text(this._labels[l], labelTextStyle);
labelText.position.x = this._labelPositions_px[l][0];
labelText.position.y = this._labelPositions_px[l][1];
labelText.rotation = (this._ori + this._labelOri) * Math.PI / 180;
labelText.rotation = -(this._ori + this._labelOri) * Math.PI / 180;
labelText.anchor = this._labelAnchor;
labelText.alpha = 1;

View File

@ -485,7 +485,7 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
this._pixi.scale.x = this._flipHoriz ? -1 : 1;
this._pixi.scale.y = this._flipVert ? 1 : -1;
this._pixi.rotation = this._ori * Math.PI / 180;
this._pixi.rotation = -this._ori * Math.PI / 180;
[this._pixi.x, this._pixi.y] = util.to_px(this._pos, this._units, this._win);
this._pixi.alpha = this._opacity;

View File

@ -324,7 +324,7 @@ export class TextStim extends util.mix(VisualStim).with(ColorMixin)
this._pixi.scale.x = this._flipHoriz ? -1 : 1;
this._pixi.scale.y = this._flipVert ? 1 : -1;
this._pixi.rotation = this._ori * Math.PI / 180;
this._pixi.rotation = -this._ori * Math.PI / 180;
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
this._pixi.alpha = this._opacity;