mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
v1.5.05 - optimization, partial d3 removal
This commit is contained in:
parent
a8cf4c04d4
commit
24d2efe8b6
11 changed files with 86 additions and 67 deletions
|
|
@ -126,11 +126,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
// drawRivers
|
||||
rivers.selectAll("path").remove();
|
||||
rivers.selectAll("path").data(riverPaths).enter()
|
||||
.append("path").attr("d", d => d[1]).attr("id", d => "river"+d[0])
|
||||
.attr("data-width", d => d[2]).attr("data-increment", d => d[3]);
|
||||
const html = riverPaths.map(r =>`<path id="river${r[0]}" d="${r[1]}" data-width="${r[2]}" data-increment="${r[3]}"/>`).join("");
|
||||
rivers.html(html);
|
||||
}()
|
||||
|
||||
// apply change heights as basic one
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue