Hi @Chenxu_Hao,
OK after looking into this more this project should fix both issues you were asking about https://gitlab.pavlovia.org/lpxrh6/test_opacity/tree/master
The solutions are as follows:
- Setting opacity on every frame. This is a known issue and a fix will be pulled into the next release of PsychoJS, @sotiri outlined the solution here Opacity of Visual Stimuli not updating, but exiting full-screen updates them which is to make yourself a ‘custom-lib’ directory, make the fix there (implemented already in this version on line 48 and described in the linked post) and import the ‘custom-lib’ instead of ‘lib’ at the start of your experiment. Note, that until this fix is implemented in the main psychoJS release, you will need to change your experiment settings to be online> export html> manually (rather than on sync). Then you will make edits you your builder, build the html using file>export html, manually edit the import lines of you JS code to use 'custom-lib/ ’ and THEN sync (I am aware this is a fair few steps, but whilst not in the release this will fix the issue).
- saving mouse coordinates on every frame. To use this online you will also need ‘force end routine’ to be never. You can then add a second mouse component to end the routine (see project link).
Hope this helps
Becca