Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const layerEditListener = cb => {
if (!seer.isReady()) {
return;
}
seer.listenFor('deck.gl', cb);
};
export const seerInitListener = cb => {
if (!seer.isReady()) {
return;
}
seer.listenFor('init', cb);
};
}
const overs = overrides.get(id);
if (!overs) {
return;
}
overs.forEach((value, valuePath) => {
recursiveSet(uniforms, valuePath, value);
});
};
/**
* Listen for luma.gl edit events
*/
seer.listenFor('luma.gl', payload => {
const model = models[payload.itemKey];
if (!model || payload.type !== 'edit' || payload.valuePath[0] !== 'uniforms') {
return;
}
const valuePath = payload.valuePath.slice(1);
setOverride(payload.itemKey, valuePath, payload.value);
const uniforms = model.getUniforms();
recursiveSet(uniforms, valuePath, payload.value);
model.setUniforms(uniforms);
});