diff --git a/docs/articles/stimuli-animating.md b/docs/articles/stimuli-animating.md index d7d1167..b28b05f 100644 --- a/docs/articles/stimuli-animating.md +++ b/docs/articles/stimuli-animating.md @@ -1,2 +1,42 @@ # Animating Stimuli -## Under Construction + +## Manipulating Parameters of Drawing Stimuli Nodes. +Basic animation in `BonVision` involves manipulating one or more properties in a `DrawX` node. For instance, to make a circle +move across the screen, you would vary the `LocationX` parameter in a `DrawCircle` node. + +To get started: +1) Right click on any `DrawX` node and externalize the property you want to manipulate. +2) `BonVision` provides a `RangeAnimation` operator to generate a linear range of values for a specified duration of time. Connect a `RangeAnimation` operator to the parameter you externalized and change the `RangeBegin`, `RangeEnd` and `Duration`. +3) Add a `Repeat` operator if you want the animation to repeat between the `RangeAnimation` and `DrawX` node. + +The workflow will look something like this (which shows a circle moving across the screen repeatedly) + +:::workflow +![Create Window](../workflows/animating-stimuli-circle-locationx.bonsai) +::: + +> [!Note] +> The `RangeBegin` and `RangeEnd` parameter depends on the [drawing region](drawing-region.md). For a `NormalizedView` -1 to 1 represents the edges of the screen. + +> [!Note] +> To vary more than 1 parameter at a time if they share the same `RangeAnimation` parameters, you can externalize more than 1 property at a time and they will be grouped together. +> To prevent parameters from being grouped together, connect a `RangeAnimation` operator to the first externalized property before externalizing a second property. + +
+ +
+ +For an additional example of this, see the `Looming/Sweeping` demo in the [Demo](/demos/VR-demo.md) page. + + +## Animating stimuli with moving viewing window/perspective view +- this sounds like it should be possible but I need to look at an example. + + + + + + + + + diff --git a/docs/articles/stimuli-multiple.md b/docs/articles/stimuli-multiple.md index 2062da2..37e0536 100644 --- a/docs/articles/stimuli-multiple.md +++ b/docs/articles/stimuli-multiple.md @@ -33,4 +33,4 @@ For a video walkthrough of this process, see this youtube video. ### Presenting multiple stimuli sequentially -To present multiple stimuli sequentially, we can use the same `PublishSubject` and `SubscribeSubject` operators but add timers to them. Timing will be covered in the [Timing Stimuli](stimuli-timing.bonsai) \ No newline at end of file +To present multiple stimuli sequentially, we can use the same `PublishSubject` and `SubscribeSubject` operators but add timers to them. Timing will be covered in the [Timing Stimuli](stimuli-timing.md) article, \ No newline at end of file diff --git a/docs/articles/stimuli-timing.md b/docs/articles/stimuli-timing.md index b9b408a..aaed746 100644 --- a/docs/articles/stimuli-timing.md +++ b/docs/articles/stimuli-timing.md @@ -95,7 +95,7 @@ subject movement (for instance when an animal crosses into an arena). ## Video Walkthrough For a video walkthrough of many of the steps covered in this article, check out this youtube video.
- +
diff --git a/docs/index.md b/docs/index.md index 68663ab..376fb0c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ BonVision’s key features include: -[!Video https://www.youtube.com/embed/e_5W503W1AI?si=QuYZu-T7V7G7mwXA]{width=500} +> [!Video https://www.youtube.com/embed/e_5W503W1AI?si=QuYZu-T7V7G7mwXA]{width=500} More Bonvision videos on specific topics can be found on our [youtube channel](https://www.youtube.com/channel/UCEg-3mfbvjIwbzDVvqYudAA). diff --git a/docs/workflows/animating-stimuli-circle-locationx.bonsai b/docs/workflows/animating-stimuli-circle-locationx.bonsai new file mode 100644 index 0000000..1f32d29 --- /dev/null +++ b/docs/workflows/animating-stimuli-circle-locationx.bonsai @@ -0,0 +1,89 @@ + + + + + + + 640 + 480 + On + false + Gray + DepthBufferBit ColorBufferBit + true + + Resizable + Normal + Primary + 60 + + + + + 8 + 8 + 8 + 8 + + 16 + 0 + 0 + + 0 + 0 + 0 + 0 + + 2 + false + + + + + + + + + + + + + 4 + -1 + 1 + + + + + + + + + + + 0.5 + -0.7916667 + 0 + 0 + 0 + 0 + 0 + 1 + + + + + + + + + + + + + \ No newline at end of file