Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | 123x 123x 123x 123x 123x 123x 1x | import macro from '@kitware/vtk.js/macros';
import vtkOpenGLRenderWindow from '@kitware/vtk.js/Rendering/OpenGL/RenderWindow';
import vtkStreamingOpenGLViewNodeFactory, {
registerOverride,
} from './vtkStreamingOpenGLViewNodeFactory';
/**
* vtkStreamingOpenGLRenderWindow - A derived class of the core vtkOpenGLRenderWindow class.
* The main purpose for this class extension is to add in our own node factory, so we can use
* our extended "streaming" classes for progressive texture loading.
*
*
* @param {*} publicAPI The public API to extend
* @param {*} model The private model to extend.
*/
function vtkStreamingOpenGLRenderWindow(publicAPI, model) {
model.classHierarchy.push('vtkStreamingOpenGLRenderWindow');
}
// ----------------------------------------------------------------------------
// Object factory
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
export function extend(publicAPI, model, initialValues = {}) {
Object.assign(model, initialValues);
vtkOpenGLRenderWindow.extend(publicAPI, model, initialValues);
model.myFactory = vtkStreamingOpenGLViewNodeFactory.newInstance();
registerOverride('vtkRenderWindow', newInstance);
// Object methods
vtkStreamingOpenGLRenderWindow(publicAPI, model);
}
// ----------------------------------------------------------------------------
export const newInstance = macro.newInstance(
extend,
'vtkStreamingOpenGLRenderWindow'
);
// ----------------------------------------------------------------------------
export default { newInstance, extend };
|