summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-06-19 01:50:01 -0700
committerLogan Hunt <loganhunt@simponic.xyz>2022-06-19 01:50:01 -0700
commita028e009d6a1db3c145fc970a293a68e78114f5d (patch)
tree53edc8aec7ed81420a99e3d1461ecba908e9dfff
parent982b863802bd64706ee4b30049288d58cfa37721 (diff)
downloadsimponic.xyz-a028e009d6a1db3c145fc970a293a68e78114f5d.tar.gz
simponic.xyz-a028e009d6a1db3c145fc970a293a68e78114f5d.zip
Fix that slider bug
-rw-r--r--julia/julia.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/julia/julia.js b/julia/julia.js
index 78e250c..3f31e4b 100644
--- a/julia/julia.js
+++ b/julia/julia.js
@@ -1,7 +1,7 @@
const MIN_ZOOM = 0.0001;
const MAX_ZOOM = 4;
const C_THRESHOLD = Math.sqrt(2)/2;
-const SLIDER_DIV = 1000*C_THRESHOLD;
+const SLIDER_DIV = 2000*C_THRESHOLD;
const gpu = new GPU();
const buildRender = (width, height) => gpu.createKernel(function (maxIterations, cr, ci, centerX, centerY, zoom, colorMultipliers) {
@@ -81,6 +81,7 @@ const startAnim = (sliderId, complexComponentName='ci') => {
};
const start = setInterval(() => {
if (state[complexComponentName] >= C_THRESHOLD) {
+ console.log("OVER", C_THRESHOLD);
restart(start);
}
@@ -90,12 +91,12 @@ const startAnim = (sliderId, complexComponentName='ci') => {
document.getElementById(sliderId).onclick = ()=>restart(start);
};
-document.getElementById('realSlider').oninput = function() {
- state.changes.cr = parseFloat(this.value) / SLIDER_DIV;
-};
document.getElementById('imaginarySlider').oninput = function() {
state.changes.ci = parseFloat(this.value) / SLIDER_DIV;
};
+document.getElementById('realSlider').oninput = function() {
+ state.changes.cr = parseFloat(this.value) / SLIDER_DIV;
+};
document.getElementById('imag-val').addEventListener('change', function (e) {
state.changes.ci = parseFloat(this.value);