web reimplementation of Sigmar's Garden https://bits.ondrovo.com/sigmar/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
sigmar/svg.js

13 lines
284 B

export default class Svg {
static makeNode(n, v=null) {
n = document.createElementNS("http://www.w3.org/2000/svg", n);
if (v) {
for (let p in v) {
if (v.hasOwnProperty(p)) {
n.setAttributeNS(null, p, v[p]);
}
}
}
return n
}
}