MoI discussion forum
MoI discussion forum

Full Version: V5 Notes Feature - two scripts and 1st Step to Automation?

Show messages: All  1-8  9-11

From: stefano (LIGHTWAVE)
12 Aug 2024   [#9] In reply to [#8]

Hi Michael the code looks very compact / efficient
So I think when you say

moi.vectorMath.createTopFrame() );

That means xyz = 0 and that expression = default position.

But if I wanted it to be less efficient with the code or longhand and see where to change xyz the values by code, I guess it is:

var frame = moi.vectorMath.createTopFrame();
frame.origin.x = 0;
frame.origin.y = 0;
factory.setInput( 0, frame );.

[where’s the z though ? is it in the empty () after Top Frame or is it in the set input ( 0, frame );

or can we have -

var frame = moi.vectorMath.createTopFrame();
frame.origin.x = 0;
frame.origin.y = 0;
frame.origin.z = 0;
factory.setInput( 0, frame );.


From: Michael Gibson
12 Aug 2024   [#10] In reply to [#9]
Hi stefano, yes that last one should work:

var frame = moi.vectorMath.createTopFrame();
frame.origin.x = 0;
frame.origin.y = 0;
frame.origin.z = 0;
factory.setInput( 0, frame );

- Michael
From: stefano (LIGHTWAVE)
12 Aug 2024   [#11] In reply to [#10]
Thanks again Michael. I’ve just moved my level of coding upwards from zx81, y0; Moi.factory.setitlikeapun);



Show messages: All  1-8  9-11