home projects git about
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
class PointNode { constructor(x, y, attributes) { this.setPosition(x, y); this.attributes = attributes; } setPosition(x, y) { this.x = x; this.y = y; } setAttribute(key, value) { this.attributes[key] = value; } }