1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 18:50:54 +00:00
psychojs/docs/module-visual.GratingStim.html
2022-05-23 12:31:01 +02:00

4450 lines
67 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: GratingStim</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: GratingStim</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>
<span class="ancestors"><a href="module-visual.html">visual</a>.</span>GratingStim<span class="signature">(options)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="GratingStim"><span class="type-signature"></span>new GratingStim<span class="signature">(options)</span><span class="type-signature"></span></h4>
<div class="description">
Grating Stimulus.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the name used when logging messages from this stimulus</td>
</tr>
<tr>
<td class="name"><code>win</code></td>
<td class="type">
<span class="param-type">Window</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last">the associated Window</td>
</tr>
<tr>
<td class="name"><code>tex</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type">HTMLImageElement</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
"sin"
</td>
<td class="description last">the name of the predefined grating texture or image resource or the HTMLImageElement corresponding to the texture</td>
</tr>
<tr>
<td class="name"><code>mask</code></td>
<td class="type">
<span class="param-type">String</span>
|
<span class="param-type">HTMLImageElement</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last">the name of the mask resource or HTMLImageElement corresponding to the mask</td>
</tr>
<tr>
<td class="name"><code>units</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
"norm"
</td>
<td class="description last">the units of the stimulus (e.g. for size, position, vertices)</td>
</tr>
<tr>
<td class="name"><code>sf</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1.0
</td>
<td class="description last">spatial frequency of the function used in grating stimulus</td>
</tr>
<tr>
<td class="name"><code>phase</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of the function used in grating stimulus, multiples of period of that function</td>
</tr>
<tr>
<td class="name"><code>pos</code></td>
<td class="type">
<span class="param-type">Array.&lt;number></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
[0, 0]
</td>
<td class="description last">the position of the center of the stimulus</td>
</tr>
<tr>
<td class="name"><code>ori</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0.0
</td>
<td class="description last">the orientation (in degrees)</td>
</tr>
<tr>
<td class="name"><code>size</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last">the size of the rendered image (DEFAULT_STIM_SIZE_PX will be used if size is not specified)</td>
</tr>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">Color</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
"white"
</td>
<td class="description last">Foreground color of the stimulus. Can be String like "red" or "#ff0000" or Number like 0xff0000.</td>
</tr>
<tr>
<td class="name"><code>opacity</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1.0
</td>
<td class="description last">Set the opacity of the stimulus. Determines how visible the stimulus is relative to background.</td>
</tr>
<tr>
<td class="name"><code>contrast</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1.0
</td>
<td class="description last">Set the contrast of the stimulus, i.e. scales how far the stimulus deviates from the middle grey. Ranges [-1, 1].</td>
</tr>
<tr>
<td class="name"><code>depth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last">the depth (i.e. the z order)</td>
</tr>
<tr>
<td class="name"><code>interpolate</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last">Whether to interpolate (linearly) the texture in the stimulus. Currently supports only image based gratings.</td>
</tr>
<tr>
<td class="name"><code>blendmode</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
"avg"
</td>
<td class="description last">blend mode of the stimulus, determines how the stimulus is blended with the background. Supported values: "avg", "add", "mul", "screen".</td>
</tr>
<tr>
<td class="name"><code>autoDraw</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last">whether or not the stimulus should be automatically drawn on every frame flip</td>
</tr>
<tr>
<td class="name"><code>autoLog</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last">whether or not to log</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line30">line 30</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li>VisualStim</li>
</ul>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".DEFAULT_STIM_SIZE_PX"><span class="type-signature">(static) </span>DEFAULT_STIM_SIZE_PX<span class="type-signature"> :Array</span></h4>
<div class="description">
Default size of the Grating Stimuli in pixels.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Array</span>
</li>
</ul>
<dl class="details">
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy">
<li>[256, 256]</li>
</ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line269">line 269</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".SHADERS"><span class="type-signature">(static) </span>SHADERS<span class="type-signature"> :Object</span></h4>
<div class="description">
An object that keeps shaders source code and default uniform values for them.
Shader source code is later used for construction of shader programs to create respective visual stimuli.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Object</span>
</li>
</ul>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>imageShader</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Renders provided image with applied effects (coloring, phase, frequency).
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the image based grating stimuli.</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for the image based shader.
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">how much times image repeated within grating stimuli.</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">offset of the image along X axis.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>sin</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates 2d sine wave image as if 1d sine graph was extended across Z axis and observed from above.
<a href="https://en.wikipedia.org/wiki/Sine_wave">https://en.wikipedia.org/wiki/Sine_wave</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the sine wave stimuli</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for sine wave shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">frequency of sine wave.</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of sine wave.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>sqr</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates 2d square wave image as if 1d square graph was extended across Z axis and observed from above.
<a href="https://en.wikipedia.org/wiki/Square_wave">https://en.wikipedia.org/wiki/Square_wave</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the square wave stimuli</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for square wave shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">frequency of square wave.</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of square wave.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>saw</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates 2d sawtooth wave image as if 1d sawtooth graph was extended across Z axis and observed from above.
<a href="https://en.wikipedia.org/wiki/Sawtooth_wave">https://en.wikipedia.org/wiki/Sawtooth_wave</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the sawtooth wave stimuli</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for sawtooth wave shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">frequency of sawtooth wave.</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of sawtooth wave.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>tri</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates 2d triangle wave image as if 1d triangle graph was extended across Z axis and observed from above.
<a href="https://en.wikipedia.org/wiki/Triangle_wave">https://en.wikipedia.org/wiki/Triangle_wave</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the triangle wave stimuli</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for triangle wave shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">frequency of triangle wave.</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of triangle wave.</td>
</tr>
<tr>
<td class="name"><code>uPeriod</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">period of triangle wave.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>sinXsin</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates an image of two 2d sine waves multiplied with each other.
<a href="https://en.wikipedia.org/wiki/Sine_wave">https://en.wikipedia.org/wiki/Sine_wave</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the two multiplied sine waves stimuli</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">frequency of sine wave (both of them).</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of sine wave (both of them).</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>sqrXsqr</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates an image of two 2d square waves multiplied with each other.
<a href="https://en.wikipedia.org/wiki/Square_wave">https://en.wikipedia.org/wiki/Square_wave</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for the two multiplied sine waves stimuli</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uFreq</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">frequency of sine wave (both of them).</td>
</tr>
<tr>
<td class="name"><code>uPhase</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">phase of sine wave (both of them).</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>circle</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates a filled circle shape with sharp edges.
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for filled circle.</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader.
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uRadius</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">Radius of the circle. Ranges [0.0, 1.0], where 0.0 is circle so tiny it results in empty stim
and 1.0 is circle that spans from edge to edge of the stim.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>gauss</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates a 2d Gaussian image as if 1d Gaussian graph was rotated arount Y axis and observed from above.
<a href="https://en.wikipedia.org/wiki/Gaussian_function">https://en.wikipedia.org/wiki/Gaussian_function</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for Gaussian shader</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uA</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">A constant for gaussian formula (see link).</td>
</tr>
<tr>
<td class="name"><code>uB</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.0
</td>
<td class="description last">B constant for gaussian formula (see link).</td>
</tr>
<tr>
<td class="name"><code>uC</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.16
</td>
<td class="description last">C constant for gaussian formula (see link).</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>cross</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates a filled cross shape with sharp edges.
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for cross shader</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uThickness</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.2
</td>
<td class="description last">Thickness of the cross. Ranges [0.0, 1.0], where 0.0 thickness makes a cross so thin it becomes
invisible and results in an empty stim and 1.0 makes it so thick it fills the entire stim.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>radRamp</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates 2d radial ramp image.
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for radial ramp shader</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uSqueeze</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">coefficient that helps to modify size of the ramp. Ranges [0.0, Infinity], where 0.0 results in ramp being so large
it fills the entire stim and Infinity makes it so tiny it's invisible.</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td class="name"><code>raisedCos</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Creates 2d raised-cosine image as if 1d raised-cosine graph was rotated around Y axis and observed from above.
<a href="https://en.wikipedia.org/wiki/Raised-cosine_filter">https://en.wikipedia.org/wiki/Raised-cosine_filter</a>
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shader</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">shader source code for raised-cosine shader</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">default uniforms for shader
<h6>Properties</h6>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>uBeta</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.25
</td>
<td class="description last">roll-off factor (see link).</td>
</tr>
<tr>
<td class="name"><code>uPeriod</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
0.625
</td>
<td class="description last">reciprocal of the symbol-rate (see link).</td>
</tr>
<tr>
<td class="name"><code>uAlpha</code></td>
<td class="type">
<span class="param-type">float</span>
</td>
<td class="default">
1.0
</td>
<td class="description last">value of the alpha channel.</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line59">line 59</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setBlendmode"><span class="type-signature"></span>setBlendmode<span class="type-signature"></span></h4>
<div class="description">
Set blend mode of the grating stimulus.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line621">line 621</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setColor"><span class="type-signature"></span>setColor<span class="type-signature"></span></h4>
<div class="description">
Set foreground color value for the grating stimulus.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line575">line 575</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setColorSpace"><span class="type-signature"></span>setColorSpace<span class="type-signature"></span></h4>
<div class="description">
Set color space value for the grating stimulus.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line556">line 556</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setInterpolate"><span class="type-signature"></span>setInterpolate<span class="type-signature"></span></h4>
<div class="description">
Whether to interpolate (linearly) the texture in the stimulus.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line644">line 644</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setMask"><span class="type-signature"></span>setMask<span class="type-signature"></span></h4>
<div class="description">
Setter for the mask attribute.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line402">line 402</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setOpacity"><span class="type-signature"></span>setOpacity<span class="type-signature"></span></h4>
<div class="description">
Determines how visible the stimulus is relative to background.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line591">line 591</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setPhase"><span class="type-signature"></span>setPhase<span class="type-signature"></span></h4>
<div class="description">
Set phase value for the function.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line541">line 541</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setSF"><span class="type-signature"></span>setSF<span class="type-signature"></span></h4>
<div class="description">
Set spatial frequency value for the function.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line606">line 606</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setTex"><span class="type-signature"></span>setTex<span class="type-signature"></span></h4>
<div class="description">
Setter for the tex attribute.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line338">line 338</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_estimateBoundingBox"><span class="type-signature">(protected) </span>_estimateBoundingBox<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Estimate the bounding box.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line482">line 482</a>
</li></ul></dd>
</dl>
<h4 class="name" id="_getPixiMeshFromPredefinedShaders"><span class="type-signature">(protected) </span>_getPixiMeshFromPredefinedShaders<span class="signature">(shaderName, uniforms)</span><span class="type-signature"> &rarr; {Pixi.Mesh}</span></h4>
<div class="description">
Generate PIXI.Mesh object based on provided shader function name and uniforms.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>shaderName</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">name of the shader. Must be one of the SHADERS</td>
</tr>
<tr>
<td class="name"><code>uniforms</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">a set of uniforms to supply to the shader. Mixed together with default uniform values.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="visual_GratingStim.js.html">visual/GratingStim.js</a>, <a href="visual_GratingStim.js.html#line506">line 506</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Pixi.Mesh object that represents shader and later added to the scene.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Pixi.Mesh</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-core.html">core</a></li><li><a href="module-data.html">data</a></li><li><a href="module-sound.html">sound</a></li><li><a href="module-util.html">util</a></li><li><a href="module-visual.html">visual</a></li></ul><h3>Classes</h3><ul><li><a href="FaceDetector_FaceDetector.html">FaceDetector</a></li><li><a href="module.data.MultiStairHandler.html">MultiStairHandler</a></li><li><a href="module.data.QuestHandler.html">QuestHandler</a></li><li><a href="module-core.BuilderKeyResponse.html">BuilderKeyResponse</a></li><li><a href="module-core.EventManager.html">EventManager</a></li><li><a href="module-core.GUI.html">GUI</a></li><li><a href="module-core.Keyboard.html">Keyboard</a></li><li><a href="module-core.KeyPress.html">KeyPress</a></li><li><a href="module-core.Logger.html">Logger</a></li><li><a href="module-core.MinimalStim.html">MinimalStim</a></li><li><a href="module-core.Mouse.html">Mouse</a></li><li><a href="module-core.PsychoJS.html">PsychoJS</a></li><li><a href="module-core.ServerManager.html">ServerManager</a></li><li><a href="module-core.Window.html">Window</a></li><li><a href="module-data.ExperimentHandler.html">ExperimentHandler</a></li><li><a href="module-data.MultiStairHandler.html">MultiStairHandler</a></li><li><a href="module-data.QuestHandler.html">QuestHandler</a></li><li><a href="module-data.Shelf.html">Shelf</a></li><li><a href="module-data.TrialHandler.html">TrialHandler</a></li><li><a href="module-sound.AudioClip.html">AudioClip</a></li><li><a href="module-sound.AudioClipPlayer.html">AudioClipPlayer</a></li><li><a href="module-sound.Microphone.html">Microphone</a></li><li><a href="module-sound.Sound.html">Sound</a></li><li><a href="module-sound.TonePlayer.html">TonePlayer</a></li><li><a href="module-sound.TrackPlayer.html">TrackPlayer</a></li><li><a href="module-sound.Transcriber.html">Transcriber</a></li><li><a href="module-sound.Transcript.html">Transcript</a></li><li><a href="module-util.Clock.html">Clock</a></li><li><a href="module-util.Color.html">Color</a></li><li><a href="module-util.CountdownTimer.html">CountdownTimer</a></li><li><a href="module-util.EventEmitter.html">EventEmitter</a></li><li><a href="module-util.MixinBuilder.html">MixinBuilder</a></li><li><a href="module-util.MonotonicClock.html">MonotonicClock</a></li><li><a href="module-util.PsychObject.html">PsychObject</a></li><li><a href="module-util.Scheduler.html">Scheduler</a></li><li><a href="module-visual.ButtonStim.html">ButtonStim</a></li><li><a href="module-visual.Camera.html">Camera</a></li><li><a href="module-visual.FaceDetector.html">FaceDetector</a></li><li><a href="module-visual.Form.html">Form</a></li><li><a href="module-visual.GratingStim.html">GratingStim</a></li><li><a href="module-visual.ImageStim.html">ImageStim</a></li><li><a href="module-visual.MovieStim.html">MovieStim</a></li><li><a href="module-visual.Polygon.html">Polygon</a></li><li><a href="module-visual.Rect.html">Rect</a></li><li><a href="module-visual.ShapeStim.html">ShapeStim</a></li><li><a href="module-visual.Slider.html">Slider</a></li><li><a href="module-visual.TextBox.html">TextBox</a></li><li><a href="module-visual.TextStim.html">TextStim</a></li><li><a href="module-visual.VisualStim.html">VisualStim</a></li></ul><h3>Interfaces</h3><ul><li><a href="module-sound.SoundPlayer.html">SoundPlayer</a></li></ul><h3>Mixins</h3><ul><li><a href="module-core.WindowMixin.html">WindowMixin</a></li><li><a href="module-util.ColorMixin.html">ColorMixin</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Mon May 23 2022 12:29:29 GMT+0200 (Central European Summer Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>