MoI discussion forum
MoI discussion forum

Full Version: Node Wish List

Show messages:  1-2  …  163-182  183-202  203-222  223-242  243-262  263-282  283-302  …  423-425

From: bemfarmer
30 Dec 2020   [#223] In reply to [#222]
Thank you Wayne.
I'll look at those other programs.
I have been puzzling over how to do add-on libraries, and how they are "linked", or accessed.
There seems to be multiple ways to write code.
It seems like nodeeditor/Javascript scans all the addons.
Would having ES6, (or ES11?), be of any benefit?

-Brian
From: wayne hill (WAYNEHILL5202)
30 Dec 2020   [#224] In reply to [#223]
Brian,

MoI's WebKit interface determines what resources are available for the Node Editor uses to ensure stability. My Javascript version is 1.7. ES6 or ES11 would more likely be on a different environment like a backend server Node box. The Node Editor startup scans the scripts and begins the background services. The scripts are scanned and linked in their filename order.

loadScripts('core', 'lang, compatibility, colors, geometry, main, editor');
loadScripts('nodes', 'macros, basic, logic, points, curves, solids, construct, transform, objects, interface');
loadScripts('nodes/extensions/libs', '*');
loadScripts('nodes/extensions', '*');
loadScripts('core', 'init, ext.*');

If you want to build a library calling other Javascript files, they have to be scanned (note filename order) before they are available for the other libraries to use.

Example directory:
1test.js
2test.js
3test.js (uses 1test.js and 2test.js and 4test.js)
4test.js

3test.js can use 1test.js and 2test.js libraries but not 4test.js library because it has not been scanned. Error will trigger on a missing script. It is not missing.

4test.js will have to be renamed to 0test.js in both 3test.js and it's filename.

New listing:
0test.js
1test.js
2test.js
3test.js (uses 1test.js and 2test.js and 0test.js)


Wayne
From: bemfarmer
30 Dec 2020   [#225] In reply to [#224]
Thank you Wayne.
It is very useful information.
- Brian

Message 9581.226 was deleted


From: bemfarmer
12 Jan 2021   [#227] In reply to [#221]
Note, I edited the post on PVector, because it works differently from Vector3d.
It almost works in the opposite way, which caused much confusion.
If object types do not match, javascript shows an error.
The way a class is programmed determines the way it works.
Other programmers have written vector classes, and complex number classes, with instance methods, and static methods, which behave very differently from what other programmers have written. I am not aware of any standard.

So I have been doing my own complex number class, cPlex, adapting the available conflicting code.
It has to be ES5 compatible as well, to be compatible with the javascript used by MoI4.
(A complex number class is very similar to a vector2d class.)
(mathJS has the needed functions, but is extremely complicated, ES11(+/-), BigInt, etc.
Then I can finish my script.

- Brian

Mixing real numbers with complex numbers makes it even more complicated.
From: wayne hill (WAYNEHILL5202)
13 Jan 2021   [#228] In reply to [#227]
Brian,

Learning both Javascript and Node Editor programming is confusing and complicated. Javascript code would work on the web browsers, but not in the Node Editor environment. That is when the version type the Node Editor uses make a difference. The scripting format of the Node Editor is very different from Javascript code. My Delaunay conversion script project changed a higher version of Javascript to a lower version to be compatible with the Node Editor. The Vector3D.js is a compilation of code from different sources. There are no documented standards to reference from for Node Editor programming. Learning from other users code, including your examples.

Wayne
From: bemfarmer
13 Jan 2021   [#229] In reply to [#228]
Thank you Wayne, for the clarifications.
I see that Max initiated a vector, before making the vector equal a vector subtraction.

Arrays and objecLists get initiated before use...

Now have a better understanding of why objects do not match, in my test code.

- Brian
From: Psygorn (DRILLBIT)
17 Dec 2021   [#230] In reply to [#217]
Where can I find the qhull3d.nod?
From: bemfarmer
17 Dec 2021   [#231] In reply to [#230]
qhull3d node seems to have been deleted(?)
Not yet integrated into Nodeeditor1.1.zip(?)
Will be located in the Objects2 menu.
(Place node in the nodeeditor extensions folder.)

Attachments:
qhull3d.js

Image Attachments:
qhull3dCropped.png 


From: Psygorn (DRILLBIT)
17 Dec 2021   [#232] In reply to [#231]
Thank you bemfarmer :-)
From: Psygorn (DRILLBIT)
17 Dec 2021   [#233] In reply to [#171]
Where is "ExtendSrf.js" to be found?
From: WN
17 Dec 2021   [#234] In reply to [#233]
Hi Psygorn.

Attachments:
ExtendSrf.js


From: Psygorn (DRILLBIT)
17 Dec 2021   [#235] In reply to [#234]
Hi WN,

Thank you.

I cannot find "Loft2.js" as well. Where can I find it?
From: bemfarmer
17 Dec 2021   [#236] In reply to [#235]
Maybe try a search for +mLoft2 ?
From: Psygorn (DRILLBIT)
18 Dec 2021   [#237] In reply to [#236]
Hello bemfarmer,

I am sorry I thought mLoft2 is different from Loft2, my bad!

your reply helped me :-) thank you.
From: Psygorn (DRILLBIT)
18 Dec 2021   [#238] In reply to [#231]
Helloo bemfarmer,

I ran into a problem:



What should I do now?

I looked for vector3D.js and I did not find it!
From: bemfarmer
18 Dec 2021   [#239] In reply to [#238]
Vector3d.js should be in the extension folder (?)

https://moi3d.com/forum/index.php?webtag=MOI&msg=9581.217
Program of WayneHill.

- Brian

Attachments:
Vector3d.js


From: Psygorn (DRILLBIT)
18 Dec 2021   [#240] In reply to [#239]
Thank you,

But I ran into a new error!



Which makes me confused! I thought it should be working by now!

I have qhull3d.js in extensions folder of nodeeditor.

What should I do now?
From: bemfarmer
18 Dec 2021   [#241] In reply to [#240]
Strange results...

Note that the number of points input to the qhull need to be 3 or more, and should be an integer, (not
having a decimal point.) Otherwise, on two computer systems, home and work, the slider behaved weirdly, with mouse motion above or below the slider,
the slider would move, and weird exceptions occured. With 3+ integer number of points, the slider works fine.
So set the slider minimum to 3, and have no decimals, in its info box.

Getting your error sounds strange.

- Brian
From: Psygorn (DRILLBIT)
18 Dec 2021   [#242] In reply to [#241]
Hi Brian,

I asked James directly about the problem however, I'd be happy if you take a look at it too.

you can find the .nod file here: https://moi3d.com/forum/index.php?webtag=MOI&msg=9476.466

Show messages:  1-2  …  163-182  183-202  203-222  223-242  243-262  263-282  283-302  …  423-425