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:
commit
4fea70f605
@ -282,7 +282,7 @@ export class FaceDetector extends VisualStim
|
|||||||
this._pixi.scale.x = 1;
|
this._pixi.scale.x = 1;
|
||||||
this._pixi.scale.y = -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.position = to_pixiPoint(this.pos, this.units, this.win);
|
||||||
|
|
||||||
this._pixi.alpha = this._opacity;
|
this._pixi.alpha = this._opacity;
|
||||||
|
@ -312,7 +312,7 @@ export class ImageStim extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
|
|
||||||
// set the position, rotation, and anchor (image centered on pos):
|
// set the position, rotation, and anchor (image centered on pos):
|
||||||
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
|
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.x = 0.5;
|
||||||
this._pixi.anchor.y = 0.5;
|
this._pixi.anchor.y = 0.5;
|
||||||
|
|
||||||
|
@ -401,7 +401,7 @@ export class MovieStim extends VisualStim
|
|||||||
|
|
||||||
// set the position, rotation, and anchor (movie centered on pos):
|
// set the position, rotation, and anchor (movie centered on pos):
|
||||||
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
|
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.x = 0.5;
|
||||||
this._pixi.anchor.y = 0.5;
|
this._pixi.anchor.y = 0.5;
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ export class ShapeStim extends util.mix(VisualStim).with(ColorMixin, WindowMixin
|
|||||||
|
|
||||||
// set polygon position and rotation:
|
// set polygon position and rotation:
|
||||||
this._pixi.position = to_pixiPoint(this.pos, this.units, this.win);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -668,7 +668,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
|||||||
this._pixi.scale.x = 1;
|
this._pixi.scale.x = 1;
|
||||||
this._pixi.scale.y = -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.position = this._getPosition_px();
|
||||||
|
|
||||||
this._pixi.alpha = this._opacity;
|
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);
|
const labelText = new PIXI.Text(this._labels[l], labelTextStyle);
|
||||||
labelText.position.x = this._labelPositions_px[l][0];
|
labelText.position.x = this._labelPositions_px[l][0];
|
||||||
labelText.position.y = this._labelPositions_px[l][1];
|
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.anchor = this._labelAnchor;
|
||||||
labelText.alpha = 1;
|
labelText.alpha = 1;
|
||||||
|
|
||||||
|
@ -485,7 +485,7 @@ export class TextBox extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
|
|
||||||
this._pixi.scale.x = this._flipHoriz ? -1 : 1;
|
this._pixi.scale.x = this._flipHoriz ? -1 : 1;
|
||||||
this._pixi.scale.y = this._flipVert ? 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.x, this._pixi.y] = util.to_px(this._pos, this._units, this._win);
|
||||||
|
|
||||||
this._pixi.alpha = this._opacity;
|
this._pixi.alpha = this._opacity;
|
||||||
|
@ -324,7 +324,7 @@ export class TextStim extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
this._pixi.scale.x = this._flipHoriz ? -1 : 1;
|
this._pixi.scale.x = this._flipHoriz ? -1 : 1;
|
||||||
this._pixi.scale.y = this._flipVert ? 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.position = to_pixiPoint(this.pos, this.units, this.win);
|
||||||
|
|
||||||
this._pixi.alpha = this._opacity;
|
this._pixi.alpha = this._opacity;
|
||||||
|
Loading…
Reference in New Issue
Block a user