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 initLayerInSeer = layer => {
if (!seer.isReady() || !layer) {
return;
}
const badges = [layer.constructor.layerName];
seer.listItem('deck.gl', layer.id, {
badges,
// TODO: Seer currently only handles single model layers
links: layer.state && layer.state.model ? [`luma.gl:${layer.state.model.id}`] : undefined,
parent: layer.parent ? layer.parent.id : undefined
});
};
finalize() {
seer.removeListener(this._initSeer);
seer.removeListener(this._editSeer);
}
finalize() {
seer.removeListener(this._initSeer);
seer.removeListener(this._editSeer);
}
finalize() {
seer.removeListener(this._initSeer);
seer.removeListener(this._editSeer);
}
finalize() {
seer.removeListener(this._initSeer);
seer.removeListener(this._editSeer);
}
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);
});
export const removeModel = id => {
delete models[id];
seer.deleteItem('luma.gl', id);
};
export const removeLayerInSeer = id => {
if (!seer.isReady() || !id) {
return;
}
seer.deleteItem('deck.gl', id);
};