Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

OSWeb: Offset of rotated visual stimuli

Hello everyone,


I am trying to rotate a visual stimulus in an experiment.

For the local version, it works totally fine. However for the online version, there is a clear offset from the center (this offset changes for each rotation). I tried to fix it through using a java inlinescript and manually setting x and y to 0 (and using center = 1). This also did not solve my problem (I ensured that width and height are equal).

So I was wondering if there is any possibility to "anchor" the stimulus in the sketchpad such that it is only rotated around the anchor point (without hardcoding x & y for each trial seperately).


Thanks in advance!

Best

Carla

Comments

  • Hi @CarlaC,

    Could you attach a stripped down version of your online task and explain how you achieved the rotation in the "local" version?

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab,

    thank you for your reply!

    I attached a stripped down demo version (tried the local version with PsychoPy backend).

    Best,

    Carla


  • Hi @CarlaC,

    I ran the task you sent me and it appears to work correctly with both the PsychoPy backend and OSWeb.

    I attach here a video screen capture of the task running in the browser (without making any change to the task you sent me). The image does appear to rotate around its center. So either I don't understand what the issue is or the issue is not showing when I run the task).

    Can you clarify whether what you see on the video is how the task should be doing? If not, can you clarify what the issue is exactly?

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab,

    thank you for the screen capture. That's exactly what it should look like.

    Here is a screenshot showing what it looks like when I run the task in the browser:

    I'm using the Google Chrome browser and OpenSesame 4.0. I'm using a laptop that was set up by the university's technical services department. I suspect that some of the settings might be causing the problems, as I encountered multiple issues with OSWeb that appeared to be resolved on other computers/laptops. Do you know which preferences might cause the problems?

    Thanks again!

    Best,

    Carla

  • Hi @CarlaC,

    This looks like a system or browser issue indeed. To be honnest, I'm not sure what the peific issue might be.

    There are some things you could perhaps try/check (I'm no expert on these issues but I gathered the information from the internet):

    Browser Hardware Acceleration

    • Symptom: Canvas behaves oddly; transforms (like rotation) don't render as expected.
    • Fix: Try toggling hardware acceleration in her browser:
      • Chrome: Settings → System → Use hardware acceleration when available → Toggle it off or on and restart the browser.

    Zoom Level or Display Scaling

    • Symptom: Canvas coordinates are offset, especially on high-DPI displays or if browser zoom ≠ 100%.
    • Fixes:
      • Set browser zoom to 100% (Ctrl+0 or Cmd+0).
      • On Windows/macOS, make sure the system display scaling is standard (e.g., 100% or 125%, not a custom scale).

    Operating System DPI or Display Settings

    • High-DPI monitors or display scaling (e.g. 150%) can cause canvas misalignment.
    • This affects how coordinate transformations are interpreted.

    Graphics Drivers or WebGL Issues

    • Some browsers fall back to software rendering if the GPU/driver isn't compatible.
    • Run chrome://gpu (in Chrome) on her computer to inspect GPU-related issues.
    • If WebGL is disabled or degraded, it could affect canvas rendering.

    Privacy or Security Extensions

    • Extensions like ad blockers, tracking blockers, or privacy guards (e.g., DuckDuckGo, uBlock) might interfere with HTML canvas rendering.
    • Try running the experiment in Incognito mode or Disabling extensions.

    You might want to talk to your IT staff to see if they can perhaps do a fresh reinstall of the browser and see if it helps fixing it, or if they can identify the issue.

    Best,

    Fabrice.

    Buy Me A Coffee

  • Hi Fabrice,

    Thanks a lot for all of these suggestions.

    I'll give them all a try when I get back to setting the respective experiment up; really appreciate it!

    Best,

    Carla

Sign In or Register to comment.