Remove unnecessary function since I changed how some stuff worked

This commit is contained in:
Logan Hunt 2022-04-26 17:55:35 -06:00
parent a2e493f142
commit 9caedf1aac
Signed by untrusted user who does not match committer: simponic
GPG Key ID: 52B3774857EB24B1

View File

@ -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);