Remove unnecessary function since I changed how some stuff worked
This commit is contained in:
parent
a2e493f142
commit
9caedf1aac
@ -46,18 +46,13 @@ const doRender = (renderF, state) => {
|
|||||||
renderF(state.maxIterations, state.cr, state.ci, state.centerX, state.centerY, state.zoom, state.colorMultipliers);
|
renderF(state.maxIterations, state.cr, state.ci, state.centerX, state.centerY, state.zoom, state.colorMultipliers);
|
||||||
};
|
};
|
||||||
|
|
||||||
const attachCanvasWithDimension = () => {
|
|
||||||
render = buildRender(state.width, state.height);
|
|
||||||
doRender(render, state);
|
|
||||||
canvasHolder.appendChild(render.canvas);
|
|
||||||
};
|
|
||||||
|
|
||||||
const loop = () => {
|
const loop = () => {
|
||||||
const stateChanges = Object.keys(state.changes);
|
const stateChanges = Object.keys(state.changes);
|
||||||
if (stateChanges.length > 0) {
|
if (stateChanges.length > 0) {
|
||||||
state = {...state, ...state.changes};
|
state = {...state, ...state.changes};
|
||||||
if (state.changes.width || state.changes.height) {
|
if (state.changes.width || state.changes.height) {
|
||||||
attachCanvasWithDimension();
|
render = buildRender(state.width, state.height);
|
||||||
|
canvasHolder.appendChild(render.canvas);
|
||||||
}
|
}
|
||||||
if (state.changes.ci !== undefined) {
|
if (state.changes.ci !== undefined) {
|
||||||
document.getElementById("imag-val").innerHTML = state.ci.toFixed(4);
|
document.getElementById("imag-val").innerHTML = state.ci.toFixed(4);
|
||||||
|
Loading…
Reference in New Issue
Block a user