schertech_shapes
v1.1.1
Published
A short description.
Downloads
25
Readme
Schertech 2d
A short description.
Constrains:
- For each type div id must be unique.
Installation
npm i schertech_shapes
HTML
<div id="divid" class="svg-container"></div>
CSS
.svg-container {
width: 100em;
height: 40em;
resize: both;
overflow: auto;
border: 1px dashed #aaa;
}
svg {
width: 100%;
height: 100%;
}
Typescript/JavaScript
Type Bar
For type one height, weight and a div id is required.
import {ShapeFactory,ShapeType} from "schertech_shapes";
new ShapeFactory(ShapeType.One,"#divid", { height: 200, width: 600 });
Type Perforated Disk
For type one height, weight, a div and radius id is required.
import {ShapeFactory,ShapeType} from "schertech_shapes";
new ShapeFactory(ShapeType.Two,"#divid", { height: 600, width: 600,innerWidth: 200,radiusOne:10,radiusTwo:10,radiusThree:10,radiusFour:10});
Type Ring
For type one height, weight, inner width and a div id is required.
import {ShapeFactory,ShapeType} from "schertech_shapes";
new ShapeFactory(ShapeType.Three,"#divid", { height: 100, width: 600,innerWidth: 400,});
Type Disk
For type one height, weight and a div id is required.
import {ShapeFactory,ShapeType} from "schertech_shapes";
new ShapeFactory(ShapeType.Four,"#divid", { height: 100, width: 600});
Type Pipe
For type one height, weight, inner height and a div id is required.
import {ShapeFactory,ShapeType} from "schertech_shapes";
new ShapeFactory(ShapeType.Five,"#divid", { height: 200, width: 200,innerHeight:50});
Shapes
Type Bar
For type one height, weight and a div id is required.
Type Perforated Disk
For type one height, weight, a div and radius id is required.
Type Ring
For type one height, weight, inner width and a div id is required.
Type Disk
For type one height, weight and a div id is required.
Type Pipe
For type one height, weight, inner height and a div id is required.