Closed TodePond closed 1 year ago
we can't know that without having more information about source + target.
I propose a refactor of source type to nod type. and we need to define the relationships between them. Like... what happens when a specific source goes to a specific target? We could define the callbacks for each relationship, with varying degrees of specifity.
eg: Creation to Destruction eg: Creation to magnet eg: Creation to (anything)
Like a big switch statement
EDIT: instead of having a config for this, I'm just gonna do it in one big function
added data to pulse
some more notes:
notes:
pulses need to be able to store a nod in their data. we can't get it from reference because it might not exist anymore. the nod doesn't need to contain a pulse - because it's just a template. maybe NodTemplate.
currently there's some logic for choosing if pulses should transform or not. replace that with this kinda thing.
btw there's a magnet type. but there's also a slot type, which represents the end of an arrow of time. it's what we replace stuff with when a magnet attaches to something. if we delete something, we're really just replacing it with a slot. if we create something, we're really just replacing a slot with the created thing. in the UI, when we move an unattached arrow of time's end and magnet, we're really moving the slot.
pulseBehave(nod, data, nexts)
if pulse is creation if nod is slot replace slot with template data
as a back up to most things we could... just continue the pulse? just revert the pulse back to any? just change the pulse to whatever nod we're on? maybe we could just fine tune it. giving+throwing an error for anything we haven't accounted for and implemented yet
removed source from pulse, because we're replacing that use-case with data now
added a note on pulse data, suggesting we could add more to it over time
removed tests for pulse type transform, gonna refactor that now
we now have a behave
function! lets start building it, adding any extra api stuff we need
it's now ready! Moved pulse data to peak data, as that's the data type that we want to be dealing with (just pure data).
pulse to peak nod to template
gonna need to add more stuff to template for sure!
behave functions now return a Behaviour object, which include...
a Peak (which can be transformed from the original) and an array of Operations (which should instruct NOGAN how to change)
ok NO.
operations should just be part of peak lol
refactored operations to peak
it's done!
we need to know when it happens.