Pianomatic's picture

Philip (@Pianomatic)

Groups

  • Vuo Founder
I made a donation to Vuo.
Pianomatic's picture
Philip commented on Philip's Feature Request, “More type conversions

Text to Layer/Image (automatically generated text layer)

This one seems limited to me, since it would always output a text layer with the same center, font, and color. How do you envision using it?

Fair enough. I think it would be most useful while a composition is still in development. It would give one more option for keeping track of a value without needing a console window, or even the Vuo Editor in view. I see it as a way to just get some text onto the screen without any fuss; just plug text into a layer input, and off you go.

What do you think, Jaymie?

Pianomatic's picture
Philip commented on Philip's Feature Request, “Nodes to convert from Text to most other types

I guess what I had in mind was that text could be converted to something like a 2D Point. The summarized version of a 2D Point looks like: 1.2, 3.4. Couldn't this be used instead of having to make another node to convert it to JSON?

Pianomatic's picture
Philip posted a new Feature Request, “Allow more data types in Calculate node

Allow more data types in Calculate node

Can the Calculate node be changed to allow for integer arithmetic? I know the automatic type converters kick in when it's hooked up to nodes that take Integers, but being able to set the type of the Calculate to Integer node would cause less clutter, less time selecting how to round the result, and less processing time in a loop.

Additionally, can it be changed to also allow 2/3/4D Points? In the event that a 3D Point is being used in a calculation, and the result is another 3D Point, right now three Calculate nodes need to be used, one per dimension. A point could be constructed within an expression using [these] brackets. A number could be used in an expression without any change, but perhaps a 2D Point could be written with _XY as a suffix, a 3D Point with _XYZ, etc. A dimension could be used from a point with just that dimension (instead of all dimensions) specified in the suffix.

The node could either take a single expression to calculate all dimensions in the point, or it could take an expression per dimension. Allowing for a bit of vector-style arithmetic could further open up some flexibility too, for example, by allowing adding two points, multiplying a point by a constant, multiplying dimensions (as in X1*X2, Y1*Y2, etc.), dot/cross products, a magnitude function (perhaps with |this| syntax...

Expressions might look like this:

radius * [cos(theta), sin(theta)] //Point on a circle at angle theta
deltaTime * velocity_XY + location_XY //New location after applying velocity
[velocity_X, deltaTime * gravity + velocity_Y] //New velocity after applying gravity

QC equivalent: 

Javascript (more or less)

Component: 

Notes from Team Vuo

Vuo Pro: 

No — available with both Vuo CE and Vuo Pro

Complexity: 

●●○○ — A few weeks of work

Potential: 

●○○ — Appeals to current community
Pianomatic's picture

If you're just after a way to type in a constant, couldn't you just type in the number? For example, for 2*PI, just input 6.2831853...

This feature request caught my eye, but I'm not sold on its necessity just yet. What's the value of being able to type in PI instead of an (more or less) equivalent numerical value?

Pianomatic's picture
Philip posted a new Feature Request, “Nodes to convert from Text to most other types

Nodes to convert from Text to most other types

[From More type conversions...]

It seems to me that if one can convert something to text (in the way that a 2D Point converts to text, not how an image does), one ought to be able to convert it back after.

Component: 

Notes from Team Vuo

Vuo Pro: 

No — available with both Vuo CE and Vuo Pro

Complexity: 

●○○○ — Up to a few days of work

Potential: 

●○○ — Appeals to current community

The existing anything-to-Text type converter, Summarize Value, outputs data in a format that is human-readable (in fact, the same as the description in port popovers) but not necessarily straightforward to convert from Text back to the original type.

For this feature request, we could provide a Convert Value to Text node that outputs the value in JSON format and a Convert Text to Value node that inputs a value of the same format or certain other type-specific formats.

For example, an Integer or Real would be just the number (99). A Color could have one of several formats including {"r":0.5, "g":1, "b":0, "a":1} and 0.5, 1, 0, 1 and #7fff00.

Pages