hydra-synth / atom-hydra

78 stars 29 forks source link

Uncaught TypeError: arr.slice is not a function #33

Closed Etol1LC closed 2 years ago

Etol1LC commented 4 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.49.0 x64 Electron: 5.0.13 OS: Mac OS X 10.15.3 Thrown From: atom-hydra package 0.2.16

Stack Trace

Uncaught TypeError: arr.slice is not a function

At /Users/claudiodonaggio/.atom/packages/atom-hydra/node_modules/hydra-synth/src/glsl-utils.js:112

TypeError: arr.slice is not a function
    at fillArrayWithDefaults (/packages/atom-hydra/node_modules/hydra-synth/src/glsl-utils.js:112:14)
    at Output.typedArg.value (/packages/atom-hydra/node_modules/hydra-synth/src/glsl-utils.js:153:58)
    at Output.draw (/packages/atom-hydra/node_modules/regl/dist/regl.js:5826:25), <anonymous>:347:11)
    at /packages/atom-hydra/node_modules/regl/dist/regl.js:9837:21)
    at Output.tick (/packages/atom-hydra/node_modules/hydra-synth/src/output.js:119:8)
    at HydraRenderer.tick (/packages/atom-hydra/node_modules/hydra-synth/hydra-synth.js:394:19)
    at /packages/atom-hydra/lib/main.js:227:20)
    at Engine.emit (events.js:194:13)
    at Engine.tick (/packages/atom-hydra/node_modules/raf-loop/index.js:42:10)

Commands

     -0:48.5.0 core:backspace (input.hidden-input)
 13x -0:48.2.0 core:move-right (input.hidden-input)
     -0:44.5.0 atom-hydra:evalCode (input.hidden-input)
 13x -0:42 core:move-left (input.hidden-input)
  7x -0:38.3.0 core:move-right (input.hidden-input)
 13x -0:36.5.0 core:move-left (input.hidden-input)
  7x -0:34.4.0 core:backspace (input.hidden-input)
     -0:30.3.0 atom-hydra:evalCode (input.hidden-input)
     -0:27.9.0 core:move-down (input.hidden-input)
 16x -0:27.6.0 core:move-right (input.hidden-input)
  4x -0:23.1.0 core:move-up (input.hidden-input)
 16x -0:22.3.0 core:move-right (input.hidden-input)
  4x -0:19.7.0 core:backspace (input.hidden-input)
 14x -0:17.5.0 core:move-right (input.hidden-input)
     -0:13.7.0 core:backspace (input.hidden-input)
     -0:12.7.0 atom-hydra:evalCode (input.hidden-input)

Non-Core Packages

atom-hydra 0.2.16 
atom-marching 1.0.1 
supercollider 0.10.0 
supercollider-snippets 0.1.0 
tidalcycles 3.10.0 
ojack commented 2 years ago

Hi, this is seems to be an error with your hydra or javascript code, rather than the package. (atom suggests reporting by default) I will close the issue, but feel free to paste your code here for troubleshooting :)

hellocatfood commented 2 years ago

I just got the same error with the following code

speed=0.1
osc(80,0.11,2)
  .modulateKaleid(noise(0.1,0.2).rotate(1,0.2))
  .modulateRotate(noise(5, 0.2))
  .modulatePixelate(noise)
  .modulateRotate(osc(20,0.2,0))
.out()