export {BodyView} from './body-view'; import {PolygonShape} from './polygon'; export {PolygonShape}; import {RectangleShape} from './rectangle'; export {RectangleShape}; import {ShapeList} from './list'; export {ShapeList}; export {ShapeView} from './shape-view'; export function shapeFromJSON(json) { let shape; switch (json.type) { case 'list': shape = new ShapeList(); break; case 'polygon': shape = new PolygonShape(); break; case 'rectangle': shape = new RectangleShape(); break; } return shape.fromJSON(json); }