import macro from 'vtk.js/Sources/macros'; import vtkSkybox from 'vtk.js/Sources/Rendering/Core/Skybox';
import vtkAbstractRepresentationProxy from 'vtk.js/Sources/Proxy/Core/AbstractRepresentationProxy';
function vtkSkyboxRepresentationProxy(publicAPI, model) { model.classHierarchy.push('vtkSkyboxRepresentationProxy'); model.actor = vtkSkybox.newInstance(); model.actors.push(model.actor);
function updateTexture(texture) { model.actor.removeAllTextures(); model.actor.addTexture(texture);
const values = model.input.getAlgo().getPositions(); publicAPI.updateProxyProperty('position', { values }); }
model.sourceDependencies.push({ setInputData: updateTexture });
publicAPI.setColorBy = () => {}; publicAPI.getColorBy = () => []; publicAPI.listDataArrays = () => [];
publicAPI.setPosition = (value) => { model.input.getAlgo().setPosition(value); };
publicAPI.getPosition = () => model.input.getAlgo().getPosition(); }
const DEFAULT_VALUES = {};
export function extend(publicAPI, model, initialValues = {}) { Object.assign(model, DEFAULT_VALUES, initialValues);
vtkAbstractRepresentationProxy.extend(publicAPI, model, initialValues);
vtkSkyboxRepresentationProxy(publicAPI, model); }
export const newInstance = macro.newInstance( extend, 'vtkSkyboxRepresentationProxy' );
export default { newInstance, extend };
|