How to use the seer.listenFor 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 / deck.gl / modules / core / src / lib / seer-integration.js View on Github external
export const layerEditListener = cb => {
  if (!seer.isReady()) {
    return;
  }

  seer.listenFor('deck.gl', cb);
};
github uber / deck.gl / modules / core / src / lib / seer-integration.js View on Github external
export const seerInitListener = cb => {
  if (!seer.isReady()) {
    return;
  }

  seer.listenFor('init', cb);
};
github uber / luma.gl / modules / core / src / debug / seer-integration.js View on Github external
}

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

seer

A customizable devtool solution

MIT
Latest version published 10 months ago

Package Health Score

62 / 100
Full package analysis