tag:support.nodebox.net,2012-11-01:/discussions/nodebox-2-3/5399-snap-nodeNodeBox: Discussion 2015-02-28T10:03:46Ztag:support.nodebox.net,2012-11-01:Comment/361351942015-02-25T12:16:48Z2015-02-25T12:16:49Zsnap node<div><p>hæ—</p>
<p>is it possible to modify the snap node or access the grid it
uses, to change it ?</p></div>flametag:support.nodebox.net,2012-11-01:Comment/361351942015-02-25T19:45:01Z2015-02-25T19:45:01Zsnap node<div><p>Hmm, the snap's node functionality is written in Java. Currently
it is impossible to change the implementation easily.</p>
<p>You can examine the code by looking at the Java source <a href=
"https://github.com/nodebox/nodebox/blob/d0aa24f09db0c1d02f5bf2d7249cbe9063210c4a/src/main/java/nodebox/function/CoreVectorFunctions.java#L487">
here</a>, and the math implementation <a href=
"https://github.com/nodebox/nodebox/blob/d0aa24f09db0c1d02f5bf2d7249cbe9063210c4a/src/main/java/nodebox/graphics/MathUtils.java#L79">
here</a>.</p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/361351942015-02-25T20:00:49Z2015-02-25T20:00:49Zsnap node<div><p>Couldn't resist, and re-implemented the snap functionality in
Python. That allows you to look at the implementation and change
it.</p>
<p>There's no built-in text editor, but you can use an external
editor, then press Command-R in NodeBox to reload the
implementation.</p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/361351942015-02-25T20:01:20Z2015-02-25T20:01:20Zsnap node<div><p>Obligatory screenshot:</p></div>Frederik De Blesertag:support.nodebox.net,2012-11-01:Comment/361351942015-02-27T01:30:21Z2015-02-27T01:30:21Zsnap node<div><p>hæ—</p>
<p>I think I missed part of this but how do you get custom
implementations/nodes into the system ?</p></div>flametag:support.nodebox.net,2012-11-01:Comment/361351942015-02-28T10:03:46Z2015-02-28T10:03:46Zsnap node<div><p>The example .ndbx file already has this link. </p>
<p>The trick is to write a Python file, then in your NodeBox file,
link to the code using File > Code Libraries…</p>
<p>Check out the example I sent you. It should work.</p>
<p>Grtz,</p>
<p>F</p></div>Frederik De Bleser