You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use: given a set of incoming changes, if we have their change messages (i.e. 'add op', 'add cable', 'update param value') then we can tell Patch.js to set the dirty flag(s) only for the associated part of the system. in other words, if a module's position or quaternion is changed, there's no reason to set the this.dirty.audio.param as true. (and it will cause unnecessary prcoessing of graph and/or audio graph changes if we are setting all the flags to true each time we receive an automerge sync message (which can be very often))
// possible pseudocode// after we receive a sync message and apply it to the doc in *Patch.js:receiveSyncMessages:case 'syncMessage'*letchanges=Automerge.getChanges(this.document,nextDoc)// note this is returns a Uint8Array// run a for..loop to process each change// write a switch statement on each change messageswitch(changeMsg){case'add op':
this.dirty.vr=truethis.dirty.audio.graph=truebreak;case'param':
this.dirty.vr=truethis.dirty.audio.param=truebreak;}
The text was updated successfully, but these errors were encountered:
michaelpalumbo
changed the title
can sync protocol messages contain the automerge.change message?
can we filter the sync protocol messages based on the automerge.change message?
Jul 10, 2023
use: given a set of incoming changes, if we have their change messages (i.e. 'add op', 'add cable', 'update param value') then we can tell Patch.js to set the dirty flag(s) only for the associated part of the system. in other words, if a module's position or quaternion is changed, there's no reason to set the this.dirty.audio.param as true. (and it will cause unnecessary prcoessing of graph and/or audio graph changes if we are setting all the flags to true each time we receive an automerge sync message (which can be very often))
follow this issue I posted here
The text was updated successfully, but these errors were encountered: