Giter Club home page Giter Club logo

Comments (4)

lawero avatar lawero commented on May 29, 2024

height: function() {return 1000;},

I solved this way:

            on_start: function(){
              jsPsych.currentTrial().stimuli[0].height=1000;
            }

But I don't know why stim_array is Undefined. Despite the fact that with console.log( jsPsych.currentTrial()) I can see it.

from jspsych-psychophysics.

kurokida avatar kurokida commented on May 29, 2024

Thank you for your valuable comments.

Now, I changed the jspsych-psychphysics code to work with a function which is specified as a parameter of a stimulus object.

Please download the latest file from the top page of this github repository. (Please be careful not to download from the release page)

Then, strictly speaking, jsPsych.currentTrial().stimuli is not the same as the jsPsych.currentTrial().stim_array. You should use jsPsych.currentTrial().stim_array.

from jspsych-psychophysics.

lawero avatar lawero commented on May 29, 2024

I know but the problem is that the same exact code with stim_array instead of stimuli doesn't work. :) The error reported is that stim_array is undefined.
This is because my code is inside on_start: function() . Inside on_load: function() stim_array exist.

from jspsych-psychophysics.

kurokida avatar kurokida commented on May 29, 2024

Thank you for your reply. Now, I understood what you mean.
As you said, the stim_array had not been made when the on_start function was called.
Please use the latest code using which you can write as follows:

height: function() {return 1000;},

from jspsych-psychophysics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.