How to use the seer.throttle function in seer

To help you get started, we’ve selected a few seer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber / luma.gl / modules / core / src / debug / seer-integration.js View on Github external
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}
  ]);
};
github uber / deck.gl / modules / core / src / lib / seer-integration.js View on Github external
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);
};

seer

A customizable devtool solution

MIT
Latest version published 8 months ago

Package Health Score

62 / 100
Full package analysis