cables-gl / cables

cables is a tool for creating beautiful interactive content
https://cables.gl
MIT License
333 stars 13 forks source link

ArrayGet3Numbers doesn't get updated array from VarTriggerArray / VarGetArray_v2 - is the array the problem? #2691

Closed tastez closed 2 years ago

tastez commented 2 years ago

Example patch to illustrate issue: https://cables.gl/edit/6176d9a64d174e59cc593046 Click to generate new color, then click the 2nd button to send the array to a variable. Works once. To get it to work again you have to change the index back and forth on ArrayGet3Numbers. Noticed this also when using ColorPalettes and chunking one color out of the 5 color array. Just seems like ArrayGet3Numbers assumes it is the same array somehow and doesn't update the values - if you inspect VarGetArray_v2, it gets new values from VarTriggerArray however.

This is strange since in this example it works fine - https://cables.gl/edit/YqcaUO An array is generated with RandomArrays and send via VarTriggerArray and then received and parsed by ArrayGet3Numbers. Array is updated and so is ArrayGet3Numbers.

pandrr commented 2 years ago

great example patch

fixed on dev