How to use the paraview-lite/src/modules/registerModules function in paraview-lite

To help you get started, we’ve selected a few paraview-lite 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 Kitware / light-viz / src / app.js View on Github external
export function createViewer(
  container,
  config = createConfigurationFromURLArgs()
) {
  const store = createStore();
  store.commit(Mutations.NETWORK_CONFIG_SET, config);
  registerModules(store);
  setInterval(() => store.dispatch(Actions.BUSY_UPDATE_PROGRESS, 1), 50);

  // Fetch preset images
  store.commit(Mutations.COLOR_PRESET_NAMES_SET, [
    'Cool to Warm',
    'Cool to Warm (Extended)',
    'Rainbow Desaturated',
    'Cold and Hot',
    'erdc_rainbow_bright',
    '2hot',
    'erdc_iceFire_H',
    'erdc_iceFire_L',
    'Inferno (matplotlib)',
  ]);

  /* eslint-disable no-new */
github Kitware / paraview-lite / src / main.js View on Github external
/**
 * Sets the active proxy configuration to be used by createViewer.
 *
 * Once createViewer() is called, setActiveProxyConfiguration will do nothing.
 * Proxy config precedence (decreasing order):
 *   createViewer param, active proxy config, Generic config
 */
function createConfigurationFromURLArgs(
  addOn = { application: 'paraview-lite' }
) {
  return Object.assign({}, vtkURLExtract.extractURLParameters(), addOn);
}

const store = createStore();
store.commit('PVL_NETWORK_CONFIG_SET', createConfigurationFromURLArgs());
registerModules(store);
setInterval(() => store.dispatch('PVL_BUSY_UPDATE_PROGRESS', 1), 50);

// Fetch preset images
store.commit('PVL_COLOR_PRESET_NAMES_SET', [
  'Cool to Warm',
  'Cool to Warm (Extended)',
  'Rainbow Desaturated',
  'Cold and Hot',
  'erdc_rainbow_bright',
  '2hot',
  'erdc_iceFire_H',
  'erdc_iceFire_L',
  'Inferno (matplotlib)',
]);

new Vue({