mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
perf: set text-rendering to optimizeSpeed, v1.108.1
This commit is contained in:
parent
764993b680
commit
d98ef5717e
13 changed files with 40 additions and 16 deletions
24
index.html
24
index.html
|
|
@ -11,8 +11,8 @@
|
|||
name="description"
|
||||
content="Free web app that helps fantasy writers, game masters, and cartographers create and edit fantasy maps"
|
||||
/>
|
||||
|
||||
<meta property="og:url" content="https://azgaar.github.io/Fantasy-Map-Generator" />
|
||||
|
||||
<meta property="og:title" content="Azgaar's Fantasy Map Generator" />
|
||||
<meta
|
||||
property="og:description"
|
||||
|
|
@ -8088,7 +8088,7 @@
|
|||
<script src="config/precreated-heightmaps.js"></script>
|
||||
<script src="modules/heightmap-generator.js?v=1.99.00"></script>
|
||||
<script src="modules/features.js?v=1.104.0"></script>
|
||||
<script src="modules/ocean-layers.js?v=1.104.8"></script>
|
||||
<script src="modules/ocean-layers.js?v=1.108.1"></script>
|
||||
<script src="modules/river-generator.js?v=1.106.7"></script>
|
||||
<script src="modules/lakes.js?v=1.99.00"></script>
|
||||
<script src="modules/biomes.js?v=1.99.00"></script>
|
||||
|
|
@ -8108,20 +8108,20 @@
|
|||
<script src="libs/lineclip.min.js?v1.105.0"></script>
|
||||
<script src="libs/simplify.js?v1.105.6"></script>
|
||||
<script src="modules/fonts.js?v=1.99.03"></script>
|
||||
<script src="modules/ui/layers.js?v=1.106.0"></script>
|
||||
<script src="modules/ui/layers.js?v=1.108.1"></script>
|
||||
<script src="modules/ui/measurers.js?v=1.99.00"></script>
|
||||
<script src="modules/ui/style-presets.js?v=1.100.00"></script>
|
||||
<script src="modules/ui/general.js?v=1.100.00"></script>
|
||||
<script src="modules/ui/options.js?v=1.106.2"></script>
|
||||
<script src="main.js?v=1.106.0"></script>
|
||||
<script src="main.js?v=1.108.1"></script>
|
||||
|
||||
<script defer src="modules/relief-icons.js?v=1.99.05"></script>
|
||||
<script defer src="modules/ui/style.js?v=1.104.0"></script>
|
||||
<script defer src="modules/ui/editors.js?v=1.107.0"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.107.0"></script>
|
||||
<script defer src="modules/ui/editors.js?v=1.108.1"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.108.1"></script>
|
||||
<script defer src="modules/ui/world-configurator.js?v=1.105.4"></script>
|
||||
<script defer src="modules/ui/heightmap-editor.js?v=1.105.2"></script>
|
||||
<script defer src="modules/ui/provinces-editor.js?v=1.106.1"></script>
|
||||
<script defer src="modules/ui/provinces-editor.js?v=1.108.1"></script>
|
||||
<script defer src="modules/ui/biomes-editor.js?v=1.99.05"></script>
|
||||
<script defer src="modules/ui/namesbase-editor.js?v=1.105.11"></script>
|
||||
<script defer src="modules/ui/elevation-profile.js?v=1.99.00"></script>
|
||||
|
|
@ -8148,7 +8148,7 @@
|
|||
<script defer src="modules/ui/military-overview.js?v=1.107.0"></script>
|
||||
<script defer src="modules/ui/regiments-overview.js?v=1.107.0"></script>
|
||||
<script defer src="modules/ui/markers-overview.js?v=1.107.0"></script>
|
||||
<script defer src="modules/ui/regiment-editor.js?v=1.107.0"></script>
|
||||
<script defer src="modules/ui/regiment-editor.js?v=1.108.1"></script>
|
||||
<script defer src="modules/ui/battle-screen.js?v=1.107.2"></script>
|
||||
<script defer src="modules/ui/emblems-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/markers-editor.js?v=1.107.0"></script>
|
||||
|
|
@ -8168,12 +8168,12 @@
|
|||
<script defer src="modules/renderers/draw-borders.js?v=1.104.0"></script>
|
||||
<script defer src="modules/renderers/draw-heightmap.js?v=1.104.0"></script>
|
||||
<script defer src="modules/renderers/draw-markers.js?v=1.107.0"></script>
|
||||
<script defer src="modules/renderers/draw-scalebar.js?v=1.104.0"></script>
|
||||
<script defer src="modules/renderers/draw-scalebar.js?v=1.108.1"></script>
|
||||
<script defer src="modules/renderers/draw-temperature.js?v=1.104.0"></script>
|
||||
<script defer src="modules/renderers/draw-emblems.js?v=1.104.0"></script>
|
||||
<script defer src="modules/renderers/draw-military.js?v=1.107.0"></script>
|
||||
<script defer src="modules/renderers/draw-state-labels.js?v=1.106.0"></script>
|
||||
<script defer src="modules/renderers/draw-burg-labels.js?v=1.104.0"></script>
|
||||
<script defer src="modules/renderers/draw-military.js?v=1.108.1"></script>
|
||||
<script defer src="modules/renderers/draw-state-labels.js?v=1.108.1"></script>
|
||||
<script defer src="modules/renderers/draw-burg-labels.js?v=1.108.1"></script>
|
||||
<script defer src="modules/renderers/draw-burg-icons.js?v=1.104.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
5
main.js
5
main.js
|
|
@ -1067,7 +1067,7 @@ function generatePrecipitation() {
|
|||
const from = west[0][0],
|
||||
to = west[west.length - 1][0];
|
||||
const y = (grid.points[from][1] + grid.points[to][1]) / 2;
|
||||
wind.append("text").attr("x", 20).attr("y", y).text("\u21C9");
|
||||
wind.append("text").attr("text-rendering", "optimizeSpeed").attr("x", 20).attr("y", y).text("\u21C9");
|
||||
}
|
||||
}
|
||||
if (easterly.length > 1) {
|
||||
|
|
@ -1078,6 +1078,7 @@ function generatePrecipitation() {
|
|||
const y = (grid.points[from][1] + grid.points[to][1]) / 2;
|
||||
wind
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", graphWidth - 52)
|
||||
.attr("y", y)
|
||||
.text("\u21C7");
|
||||
|
|
@ -1088,12 +1089,14 @@ function generatePrecipitation() {
|
|||
if (northerly)
|
||||
wind
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", graphWidth / 2)
|
||||
.attr("y", 42)
|
||||
.text("\u21CA");
|
||||
if (southerly)
|
||||
wind
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", graphWidth / 2)
|
||||
.attr("y", graphHeight - 20)
|
||||
.text("\u21C8");
|
||||
|
|
|
|||
|
|
@ -743,6 +743,7 @@ function showStatesChart() {
|
|||
|
||||
node
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.style("font-size", d => rn((d.r ** 0.97 * 4) / lp(d.data.name), 2) + "px")
|
||||
.selectAll("tspan")
|
||||
.data(d => d.data.name.split(exp))
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ function drawBurgLabels() {
|
|||
.data(capitals)
|
||||
.enter()
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("id", d => "burgLabel" + d.i)
|
||||
.attr("data-id", d => d.i)
|
||||
.attr("x", d => d.x)
|
||||
|
|
@ -28,6 +29,7 @@ function drawBurgLabels() {
|
|||
.data(towns)
|
||||
.enter()
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("id", d => "burgLabel" + d.i)
|
||||
.attr("data-id", d => d.i)
|
||||
.attr("x", d => d.x)
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ const drawRegiments = function (regiments, s) {
|
|||
g.append("text")
|
||||
.attr("x", d => d.x)
|
||||
.attr("y", d => d.y)
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.text(d => Military.getTotal(d));
|
||||
g.append("rect")
|
||||
.attr("fill", "currentColor")
|
||||
|
|
@ -52,6 +53,7 @@ const drawRegiments = function (regiments, s) {
|
|||
.attr("height", h);
|
||||
g.append("text")
|
||||
.attr("class", "regimentIcon")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", d => x(d) - size)
|
||||
.attr("y", d => d.y)
|
||||
.text(d => (d.icon.startsWith("http") ? "" : d.icon));
|
||||
|
|
@ -91,7 +93,11 @@ const drawRegiment = function (reg, stateId) {
|
|||
.attr("transform", `rotate(${reg.angle || 0})`)
|
||||
.attr("transform-origin", `${reg.x}px ${reg.y}px`);
|
||||
g.append("rect").attr("x", x1).attr("y", y1).attr("width", w).attr("height", h);
|
||||
g.append("text").attr("x", reg.x).attr("y", reg.y).text(Military.getTotal(reg));
|
||||
g.append("text")
|
||||
.attr("x", reg.x)
|
||||
.attr("y", reg.y)
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.text(Military.getTotal(reg));
|
||||
g.append("rect")
|
||||
.attr("fill", "currentColor")
|
||||
.attr("x", x1 - h)
|
||||
|
|
@ -100,6 +106,7 @@ const drawRegiment = function (reg, stateId) {
|
|||
.attr("height", h);
|
||||
g.append("text")
|
||||
.attr("class", "regimentIcon")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", x1 - size)
|
||||
.attr("y", reg.y)
|
||||
.text(reg.icon.startsWith("http") ? "" : reg.icon);
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ function drawScaleBar(scaleBar, scaleLevel) {
|
|||
.data(d3.range(0, 6))
|
||||
.enter()
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", d => rn((d * length) / 5, 2))
|
||||
.attr("y", 0)
|
||||
.attr("dy", "-.6em")
|
||||
|
|
@ -52,6 +53,7 @@ function drawScaleBar(scaleBar, scaleLevel) {
|
|||
if (label) {
|
||||
texts
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", (length + 1) / 2)
|
||||
.attr("dy", ".6em")
|
||||
.attr("dominant-baseline", "text-before-edge")
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ function drawStateLabels(list) {
|
|||
|
||||
const textElement = textGroup
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("id", "stateLabel" + stateId)
|
||||
.append("textPath")
|
||||
.attr("startOffset", "50%")
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ function addBurg(point) {
|
|||
burgLabels
|
||||
.select("#towns")
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("id", "burgLabel" + i)
|
||||
.attr("data-id", i)
|
||||
.attr("x", x)
|
||||
|
|
@ -464,6 +465,7 @@ function drawLegend(name, data) {
|
|||
|
||||
labels
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.text(data[i][2])
|
||||
.attr("x", offset + colorBoxSize * 1.6)
|
||||
.attr("y", fontSize / 1.6 + lineHeight + l * lineHeight + vOffset);
|
||||
|
|
@ -474,6 +476,7 @@ function drawLegend(name, data) {
|
|||
const offset = colOffset + legend.node().getBBox().width / 2;
|
||||
labels
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("text-anchor", "middle")
|
||||
.attr("font-weight", "bold")
|
||||
.attr("font-size", "1.2em")
|
||||
|
|
@ -1290,7 +1293,7 @@ function refreshAllEditors() {
|
|||
// dynamically loaded editors
|
||||
async function editStates() {
|
||||
if (customization) return;
|
||||
const Editor = await import("../dynamic/editors/states-editor.js?v=1.106.1");
|
||||
const Editor = await import("../dynamic/editors/states-editor.js?v=1.108.1");
|
||||
Editor.open();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -723,6 +723,7 @@ function drawCoordinates() {
|
|||
.data(data)
|
||||
.enter()
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", d => d.x)
|
||||
.attr("y", d => d.y)
|
||||
.text(d => d.text);
|
||||
|
|
|
|||
|
|
@ -706,6 +706,7 @@ function editProvinces() {
|
|||
|
||||
node
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("dx", ".2em")
|
||||
.attr("dy", "1em")
|
||||
.attr("x", d => d.x0)
|
||||
|
|
|
|||
|
|
@ -309,6 +309,7 @@ function editRegiment(selector) {
|
|||
.on("end", () => new Battle(attacker, defender));
|
||||
svg
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("x", window.innerWidth / 2)
|
||||
.attr("y", window.innerHeight / 2)
|
||||
.text("⚔️")
|
||||
|
|
|
|||
|
|
@ -618,8 +618,10 @@ function addLabelOnClick() {
|
|||
group.classed("hidden", false);
|
||||
group
|
||||
.append("text")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("id", id)
|
||||
.append("textPath")
|
||||
.attr("text-rendering", "optimizeSpeed")
|
||||
.attr("xlink:href", "#textPath_" + id)
|
||||
.attr("startOffset", "50%")
|
||||
.attr("font-size", "100%")
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2
|
||||
*/
|
||||
|
||||
const VERSION = "1.108.0";
|
||||
const VERSION = "1.108.1";
|
||||
if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function");
|
||||
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue