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 logModel = (model, uniforms) => {
if (!seer.isReady() || seer.throttle(`luma.gl:${model.id}`, 1e3)) {
return;
}
const attributesObject = model.geometry
? Object.assign({}, model.geometry.attributes, model.attributes)
: model.attributes;
const uniformsObject = Object.assign({}, model.uniforms, uniforms);
seer.multiUpdate('luma.gl', model.id, [
{path: 'objects.uniforms', data: uniformsObject},
{path: 'objects.attributes', data: attributesObject}
]);
};
export const updateLayerInSeer = layer => {
if (!seer.isReady() || seer.throttle(`deck.gl:${layer.id}`, 1e3)) {
return;
}
const data = logPayload(layer);
seer.multiUpdate('deck.gl', layer.id, data);
};