molstar
Version:
A comprehensive macromolecular library.
33 lines (32 loc) • 1.49 kB
JavaScript
/**
* Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { __extends } from "tslib";
import { RepresentationRegistry } from '../representation';
import { IsosurfaceRepresentationProvider } from './isosurface';
import { objectForEach } from '../../mol-util/object';
import { SliceRepresentationProvider } from './slice';
import { DirectVolumeRepresentationProvider } from './direct-volume';
var VolumeRepresentationRegistry = /** @class */ (function (_super) {
__extends(VolumeRepresentationRegistry, _super);
function VolumeRepresentationRegistry() {
var _this = _super.call(this) || this;
objectForEach(VolumeRepresentationRegistry.BuiltIn, function (p, k) {
if (p.name !== k)
throw new Error("Fix BuiltInVolumeRepresentations to have matching names. ".concat(p.name, " ").concat(k));
_this.add(p);
});
return _this;
}
return VolumeRepresentationRegistry;
}(RepresentationRegistry));
export { VolumeRepresentationRegistry };
(function (VolumeRepresentationRegistry) {
VolumeRepresentationRegistry.BuiltIn = {
'isosurface': IsosurfaceRepresentationProvider,
'slice': SliceRepresentationProvider,
'direct-volume': DirectVolumeRepresentationProvider,
};
})(VolumeRepresentationRegistry || (VolumeRepresentationRegistry = {}));