1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

Merge pull request #522 from TEParsons/main-shape-arrow

NF: Add "arrow" to named shapes in ShapeStim
This commit is contained in:
Alain Pitiot 2023-07-19 10:58:44 +02:00 committed by GitHub
commit 0aa0f41067
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,4 +385,29 @@ ShapeStim.KnownShapes = {
[-0.39, 0.31],
[-0.09, 0.18],
],
triangle: [
[+0.0, 0.5], // Point
[-0.5, -0.5], // Bottom left
[+0.5, -0.5], // Bottom right
],
rectangle: [
[-.5, .5], // Top left
[ .5, .5], // Top right
[ .5, -.5], // Bottom left
[-.5, -.5], // Bottom right
],
arrow: [
[0.0, 0.5],
[-0.5, 0.0],
[-1/6, 0.0],
[-1/6, -0.5],
[1/6, -0.5],
[1/6, 0.0],
[0.5, 0.0],
],
};
// Alias some names for convenience
ShapeStim.KnownShapes['star'] = ShapeStim.KnownShapes['star7']