hydra-synth
Advanced tools
Comparing version 1.3.4 to 1.3.5
# Changelog | ||
## [1.3.5] - 2020-11-06 | ||
- Fixed divide by 0 on smoothstep | ||
@@ -3,0 +5,0 @@ ## [1.3.2] - 2020-11-04 |
@@ -30,3 +30,3 @@ const Hydra = require('./../index.js') | ||
exampleVideo() | ||
exampleSmoothstep() | ||
@@ -95,2 +95,10 @@ // shape().modulateScrollX(osc()).out() | ||
// fixing smoothstep issue so that 0 is not passed as a parameter | ||
function exampleSmoothstep() { | ||
shape(4, 0.3, 0.01).out() | ||
shape(4, 0.5, 0).out() | ||
osc(89, 0.01, 1.8).luma(0.5, 0).out() | ||
osc(89, 0.01, 1.8).thresh(0.5, 0).out() | ||
} | ||
function exampleVideo() { | ||
@@ -97,0 +105,0 @@ s0.initVideo("https://media.giphy.com/media/AS9LIFttYzkc0/giphy.mp4") |
{ | ||
"name": "hydra-synth", | ||
"version": "1.3.4", | ||
"version": "1.3.5", | ||
"description": "base synth for hydra-editor", | ||
@@ -44,2 +44,3 @@ "main": "index.js", | ||
"babelify": "^8.0.0", | ||
"browserify": "^16.2.3", | ||
"chai": "^4.2.0", | ||
@@ -46,0 +47,0 @@ "codemirror": "^5.36.0", |
@@ -191,3 +191,3 @@ /* | ||
float d = cos(floor(.5+a/r)*r-a)*length(st); | ||
return vec4(vec3(1.0-smoothstep(radius,radius + smoothing,d)), 1.0);` | ||
return vec4(vec3(1.0-smoothstep(radius,radius + smoothing + 0.0000001,d)), 1.0);` | ||
}, | ||
@@ -634,3 +634,3 @@ { | ||
glsl: | ||
` _st.x += _c0.r*amount + time*speed; | ||
` _st.x += _c0.r*scrollX + time*speed; | ||
return fract(_st);` | ||
@@ -901,3 +901,3 @@ }, | ||
glsl: | ||
` float a = smoothstep(threshold-tolerance, threshold+tolerance, _luminance(_c0.rgb)); | ||
` float a = smoothstep(threshold-(tolerance+0.0000001), threshold+(tolerance+0.0000001), _luminance(_c0.rgb)); | ||
return vec4(_c0.rgb*a, a);` | ||
@@ -921,3 +921,3 @@ }, | ||
glsl: | ||
` return vec4(vec3(smoothstep(threshold-tolerance, threshold+tolerance, _luminance(_c0.rgb))), _c0.a);` | ||
` return vec4(vec3(smoothstep(threshold-(tolerance+0.0000001), threshold+(tolerance+0.0000001), _luminance(_c0.rgb))), _c0.a);` | ||
}, | ||
@@ -924,0 +924,0 @@ { |
389233
9670
15