@thewtex/vtk.js-esm
Version:
Visualization Toolkit for the Web
41 lines (30 loc) • 1.43 kB
JavaScript
import macro from '../../macro.js';
import vtkMapper from './Mapper.js';
// vtkStickMapper methods
// ----------------------------------------------------------------------------
function vtkStickMapper(publicAPI, model) {
// Set our className
model.classHierarchy.push('vtkStickMapper');
} // ----------------------------------------------------------------------------
// Object factory
// ----------------------------------------------------------------------------
var DEFAULT_VALUES = {
scaleArray: null,
orientationArray: null,
radius: 0.025,
length: 0.1
}; // ----------------------------------------------------------------------------
function extend(publicAPI, model) {
var initialValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
Object.assign(model, DEFAULT_VALUES, initialValues); // Inheritance
vtkMapper.extend(publicAPI, model, initialValues);
macro.setGet(publicAPI, model, ['scaleArray', 'orientationArray', 'radius', 'length']); // Object methods
vtkStickMapper(publicAPI, model);
} // ----------------------------------------------------------------------------
var newInstance = macro.newInstance(extend, 'vtkStickMapper'); // ----------------------------------------------------------------------------
var vtkStickMapper$1 = {
newInstance: newInstance,
extend: extend
};
export default vtkStickMapper$1;
export { extend, newInstance };