Nodebundle for playing with nodes
 1-2  …  1583-1602  1603-1622  1623-1642  1643-1662  1663-1682  …  1843-1859
Thread Split: Some posts in this thread have been moved here

Previous
Next
 From:  bemfarmer
7777.1623 
Question about writing a new node.

The scripts in MoI often have Functions{} in their code.

The node programs do not seem to use such Functions{} very much.
Instead they use ...prototype...function().
So to use a function from a script, in a node, should they be written as ...prototype...function()?

Or,
I see that in the Lib folder under nodeeditor\nodes\extensions, there is a file called basicFunctions.js,
which is full of miscellaneous functions.

So when writing a node which uses a MoI script with functions, can or should I put the needed functions in a new lib file called, for example, basicFunctions2.js?

- Brian

It seems that the functions in basicFunctions.js can be (re-)used in any new node?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
7777.1624 In reply to 7777.1623 
Hello, Brian,

the prototype function gives the objects created by using the nodeeditor a uniform interface for the processing. Same method names for the various
Knots. So every code of the node creates a type. Later by using the node editor you create objects of these types with a uniform interface of functions.
You can of course use the functions in basicFunctions.js and also create a basicFunctions2.js. You can also write your functions to the same file as your nodes.
For more frequently used functions, it makes sense to store them in a library.

Have a nice day
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
7777.1625 In reply to 7777.1624 
Thank you Karsten.

Two additional related questions:
1. Where would a function go in a node? Inside the .prototype.onExecute = function (), or
just before it?
I have not found any examples, as far as I know.

2. Is it necessary to "link" say basicFunctions2.js somewhere? Or is this already set up?
(I have not searched for an example useage of basicFunctions.js yet.)

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Karsten (KMRQUS)
7777.1626 In reply to 7777.1625 
Hello Brian,

you can find examples where to place "normal" functions in vector.js. If you want to create a lib of functions you can place it in the libs folder under extensions. Max has made an autoload for files placed in that folder. So no link.

Have a nice day
Karsten
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
7777.1627 In reply to 7777.1626 
That information is very helpful.
Thank you Karsten.

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7777.1628 
Maybe this can interest you! :)

https://nodevember.io
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
7777.1629 
Hi All,

Surface Tweening Animations: interpolating z values between 2 point Arrays with randomised z values.

Have a great weekend
James
https://www.instagram.com/nodeology/

EDITED: 8 Aug 2020 by JFH

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7777.1630 In reply to 7777.1629 
Cool!
Does exist a trick for see if the are Macros or not ?
And i see (1-a)*b how do you enter (1-a) ?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
7777.1631 In reply to 7777.1630 
Pilou,

>> Does exist a trick for see if the are Macros or not ? <<

Yes, the macros are darker, but there are no macros used in example above.

>> And i see (1-a)*b how do you enter (1-a) ? <<

As well as preset functions, you can type custom functions into Math node's F field.
See image below

>> Cool <<

Cheers
James
https://www.instagram.com/nodeology/

EDITED: 9 Nov 2019 by JFH

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7777.1632 In reply to 7777.1631 
I must retry because this F case return me nothing! :)
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
7777.1633 In reply to 7777.1632 
After typing in an equation in the F field, press enter, otherwise the entry goes away.
(Slightly annoying). When typing a more complex equation, save a partly correct entry, then re-edit,
otherwise partial work could be lost.
- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7777.1634 In reply to 7777.1633 
Good to know!
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
7777.1635 
Recursive subdivisions in NE

Have a great weekend
James
https://www.instagram.com/nodeology/

EDITED: 15 Nov 2019 by JFH

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 7777.1636 deleted 29 Dec 2019 by JFH

Previous
Next
 From:  mkdm
7777.1637 In reply to 7777.1636 
WOW! Congrats!

- Marco (mkdm)
My Procreate portfolio
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 7777.1638 deleted 29 Dec 2019 by JFH

Previous
Next
 From:  James (JFH)
7777.1639 
Now with Wayne's latest update to ImgSampler node ( https://moi3d.com/forum/index.php?webtag=MOI&msg=9581.57 ) it's possible to have 3 images of RGB channels (separated in photoshop) output to interleaving dot screens as shown.

James
https://www.instagram.com/nodeology/

EDITED: 29 Dec 2019 by JFH

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
7777.1640 In reply to 7777.1639 
Klaus Nomi ? (but i have not my glasses...

Happy new year!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Message 7777.1641 deleted 20 Jan 2020 by JFH

Previous
Next
 From:  James (JFH)
7777.1642 
Alex

In answer to your query :
http://moi3d.com/forum/index.php?webtag=MOI&msg=9581.106

please find .nod file for ImgSample to Hex Pattern.
A series of images showing node circuitry can be found here:
https://www.instagram.com/p/B7HZl5NJ_hp/

Let me know if this is not what you meant
James
https://www.instagram.com/nodeology/

EDITED: 10 Jan 2020 by JFH

Attachments:

Image Attachments:
Size: 89.3 KB, Downloaded: 100 times, Dimensions: 800x852px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-2  …  1563-1582  1583-1602  1603-1622  1623-1642  1643-1662  1663-1682  1683-1702  …  1843-1859