Ammunition.js
This library is currently a work in progress. Modern cartridges drawn to specifcations with D3v4. Dimensions are based on SAAMI with tolerances averaged. Only specifications for SAAMI pistol and rifle cartridges are presently available.
Installation
- Install package
npm install ammunition
- Include d3v4 and ammunition.js on your page.
Usage
To draw a cartridge:
element
: Specifies the element the cartridge SVG is to be drawn on.
name
: Specifies which cartridge to be drawn. Name is based on SAAMI nomenclature.
bullet
: type of bullet on cartridge. Currently only supports rifle and standard (round nose type). If left empty will default to value in specification.
stroke
Specifies the stroke color of cartridge. Defaults to #333 if left blank.
LICENSE
MIT