jstrecker's picture

Jaymie (@jstrecker)

Groups

  • Vuo Founder
  • Team Vuo
jstrecker's picture

The different behavior is meant to streamline the most common usage for each node. For most nodes, the text input editors behave like other types of input editors, with Return accepting the input and dismissing the input editor. For Make Image with Shadertoy, obviously the Return key is essential to editing the text, so Return makes a linebreak and you have to click away to dismiss the input editor. (This comes from the "isCodeEditor":true in the node source code.)

jstrecker's picture

Welcome, @cosin :)

In your first screenshot (where the cable is already connected), the cable from Fire Periodically : Fired to Smooth with Duration : Set Position is a thin cable, called event-only. In your second screenshot (where you reconnected the cable), the cable is a thick cable, called data-and-event. The thick data-and-event cable carries more information than the thin event-only cable, namely the data from the Fire Periodically output port (the number of seconds since the composition started). This data overwrites the data in the Smooth with Duration input port. The thin cable, on the other hand, lets the input port keep its data.

To draw the thin event-only cable instead of the thick data-and-event cable, hold down Shift while dragging the cable.

The same thing is going on in your third screenshot. The cables from Receive Mouse Clicks to Select Latest are event-only, so they don't affect the data in the input ports.

If you want the Select Latest to select between 2D points instead of text, you can right-click on one of its ports and choose "Revert to Generic Data Type" (or drag a new Select Latest node from the Node Library), then drag cables from Receive Mouse Clicks to Select Latest. These will be the thick data-and-event cables, and connecting them will change the Select Latest ports to 2D points.

If you're not familiar yet with the concepts of data and events, there's a lot of information about them in the manual.

jstrecker's picture

Be able to set the initial value on an input port that has an incoming data+event cable

When you run the above composition and click on the window, the composition displays the coordinates of the point where you clicked.

What does it display before the first click? Perhaps surprisingly, it's Hello World! That's because Hello World! is the default value of the Text input port.

This feature request is to make the port's initial value visible somehow and to make it editable, so you can change it to something other than the default.

Currently, if you want to set an initial value, you have to add some extra nodes. For example, the below composition displays the text nothing yet until the first mouse press.

Component: 

jstrecker's picture
@jstrecker posted a new Answer, “Answer to Frame rate question

Most reliable is to look at the port popover for the trigger driving the rendering.

For a rate other than the refresh rate, you can use Fire Periodically. (The reason that the window nodes always fire at the refresh rate is to avoid screen tearing.)

Pages