move WebGL atlases into resources/atlases/, route through assetUrl()
src/client/render/gl/assets/ held 11 atlas files (PNGs + JSON metadata)
that bypassed the asset-manifest pipeline — they were imported via
Vite's ?url query, bundled, and served same-origin instead of going
through the CDN like every other game asset. Moved them to
resources/atlases/, switched the PNG imports to assetUrl("atlases/...")
so they flow through the manifest, and updated the JSON metadata
imports to "resources/atlases/..." paths. Also dropped an orphan copy
of MissileSiloIconWhite.svg (no callers; resources/images/ already had
the canonical version).
render-settings.json stays in src/ — it's renderer tuning config
consumed at bundle time, not a URL-served asset.
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 995 KiB After Width: | Height: | Size: 995 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 510 KiB After Width: | Height: | Size: 510 KiB |
|
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
|
Before Width: | Height: | Size: 322 B After Width: | Height: | Size: 322 B |
@@ -1,72 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
fill="#fff"
|
||||
viewBox="0 0 32 32"
|
||||
version="1.1"
|
||||
id="svg3"
|
||||
sodipodi:docname="MissileSiloIconWhite.svg"
|
||||
inkscape:version="1.4.3 (0d15f75, 2025-12-25)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
id="namedview3"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
inkscape:zoom="36.78125"
|
||||
inkscape:cx="15.986406"
|
||||
inkscape:cy="16"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1369"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg3"
|
||||
showguides="true">
|
||||
<sodipodi:guide
|
||||
position="6.144435,8.9447749"
|
||||
orientation="0,-1"
|
||||
id="guide3"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<!-- Nose cone -->
|
||||
<path
|
||||
d="m 16,1.592183 c 0,0 -3,6 -3,8.999997 h 6 C 19,7.592183 16,1.592183 16,1.592183 Z"
|
||||
id="path1" />
|
||||
<!-- Body tube -->
|
||||
<rect
|
||||
x="13"
|
||||
y="11"
|
||||
width="6"
|
||||
height="14.322554"
|
||||
rx="0.5"
|
||||
id="rect1"
|
||||
style="stroke-width:1.04964" />
|
||||
<!-- Left fin — swept-back old-school style -->
|
||||
<path
|
||||
d="M 13,19 9.0390824,23.079014 9,28 13,24 Z"
|
||||
id="path2"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<!-- Right fin -->
|
||||
<path
|
||||
d="M 19,19 23.015293,23.106202 23,28 19,24 Z"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="ccccc" />
|
||||
<!-- Nozzle -->
|
||||
<rect
|
||||
x="14"
|
||||
y="25.322554"
|
||||
width="4"
|
||||
height="2.7543371"
|
||||
rx="0.5"
|
||||
id="rect3"
|
||||
style="stroke-width:1.04964" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -15,10 +15,12 @@ import { buildGlyphMetricsTex } from "./name-pass/data-textures";
|
||||
import { layoutString } from "./name-pass/text-layout";
|
||||
import { CHAR_RANGE, MAX_CHARS } from "./name-pass/types";
|
||||
|
||||
import atlasUrl from "../assets/msdf-atlas.png?url";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import fragSrc from "../shaders/conquest-popup/conquest-popup.frag.glsl?raw";
|
||||
import vertSrc from "../shaders/conquest-popup/conquest-popup.vert.glsl?raw";
|
||||
|
||||
const atlasUrl = assetUrl("atlases/msdf-atlas.png");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constants
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -18,12 +18,14 @@ import { DynamicInstanceBuffer } from "../../dynamic-buffer";
|
||||
import type { RenderSettings } from "../../render-settings";
|
||||
import { createProgram, shaderSrc } from "../../utils/gl-utils";
|
||||
|
||||
import fxAtlasMeta from "../../assets/fx-atlas-meta.json";
|
||||
import fxAtlasUrl from "../../assets/fx-atlas.png?url";
|
||||
import fxAtlasMeta from "resources/atlases/fx-atlas-meta.json";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
|
||||
import spriteFragSrc from "../../shaders/fx/sprite.frag.glsl?raw";
|
||||
import spriteVertSrc from "../../shaders/fx/sprite.vert.glsl?raw";
|
||||
|
||||
const fxAtlasUrl = assetUrl("atlases/fx-atlas.png");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// FX type indices (atlas row)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* kerning data, and icon atlas index maps from static JSON assets.
|
||||
*/
|
||||
|
||||
import emojiAtlasMeta from "../../assets/emoji-atlas-meta.json";
|
||||
import flagAtlasMeta from "../../assets/flag-atlas-meta.json";
|
||||
import atlasData from "../../assets/msdf-atlas.json";
|
||||
import emojiAtlasMeta from "resources/atlases/emoji-atlas-meta.json";
|
||||
import flagAtlasMeta from "resources/atlases/flag-atlas-meta.json";
|
||||
import atlasData from "resources/atlases/msdf-atlas.json";
|
||||
import type { BMChar, BMKerning, ParsedAtlas } from "./types";
|
||||
import { CHAR_RANGE } from "./types";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* The shared playerDataTex is passed in but not owned/deleted.
|
||||
*/
|
||||
|
||||
import flagAtlasMeta from "../../assets/flag-atlas-meta.json";
|
||||
import flagAtlasMeta from "resources/atlases/flag-atlas-meta.json";
|
||||
import type { RenderSettings } from "../../render-settings";
|
||||
import debugBoxFragSrc from "../../shaders/name/debug-box.frag.glsl?raw";
|
||||
import debugBoxVertSrc from "../../shaders/name/debug-box.vert.glsl?raw";
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
* The shared playerDataTex is passed in but not owned/deleted.
|
||||
*/
|
||||
|
||||
import emojiAtlasMeta from "../../assets/emoji-atlas-meta.json";
|
||||
import emojiAtlasUrl from "../../assets/emoji-atlas.png?url";
|
||||
import flagAtlasMeta from "../../assets/flag-atlas-meta.json";
|
||||
import flagAtlasUrl from "../../assets/flag-atlas.png?url";
|
||||
import emojiAtlasMeta from "resources/atlases/emoji-atlas-meta.json";
|
||||
import flagAtlasMeta from "resources/atlases/flag-atlas-meta.json";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import type { RenderSettings } from "../../render-settings";
|
||||
import iconFragSrc from "../../shaders/name/icon.frag.glsl?raw";
|
||||
import iconVertSrc from "../../shaders/name/icon.vert.glsl?raw";
|
||||
import { createProgram } from "../../utils/gl-utils";
|
||||
import type { ParsedAtlas } from "./types";
|
||||
|
||||
const emojiAtlasUrl = assetUrl("atlases/emoji-atlas.png");
|
||||
const flagAtlasUrl = assetUrl("atlases/flag-atlas.png");
|
||||
|
||||
export class IconProgram {
|
||||
private gl: WebGL2RenderingContext;
|
||||
private program: WebGLProgram;
|
||||
|
||||
@@ -9,14 +9,16 @@
|
||||
* The shared playerDataTex is passed in but not owned/deleted.
|
||||
*/
|
||||
|
||||
import statusAtlasMeta from "../../assets/status-atlas-meta.json";
|
||||
import statusAtlasUrl from "../../assets/status-atlas.png?url";
|
||||
import statusAtlasMeta from "resources/atlases/status-atlas-meta.json";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import type { RenderSettings } from "../../render-settings";
|
||||
import statusFragSrc from "../../shaders/name/status-icon.frag.glsl?raw";
|
||||
import statusVertSrc from "../../shaders/name/status-icon.vert.glsl?raw";
|
||||
import { createProgram } from "../../utils/gl-utils";
|
||||
import type { ParsedAtlas } from "./types";
|
||||
|
||||
const statusAtlasUrl = assetUrl("atlases/status-atlas.png");
|
||||
|
||||
const MAX_STATUS_ICONS = 8;
|
||||
|
||||
export class StatusIconProgram {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* and bound at draw time but not owned/deleted by this class.
|
||||
*/
|
||||
|
||||
import atlasUrl from "../../assets/msdf-atlas.png?url";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import type { RenderSettings } from "../../render-settings";
|
||||
import nameFragSrc from "../../shaders/name/name.frag.glsl?raw";
|
||||
import nameVertSrc from "../../shaders/name/name.vert.glsl?raw";
|
||||
@@ -14,6 +14,8 @@ import { createProgram, shaderSrc } from "../../utils/gl-utils";
|
||||
import type { ParsedAtlas } from "./types";
|
||||
import { LINES_PER_PLAYER, MAX_CHARS } from "./types";
|
||||
|
||||
const atlasUrl = assetUrl("atlases/msdf-atlas.png");
|
||||
|
||||
export interface TextProgramTextures {
|
||||
glyphMetrics: WebGLTexture;
|
||||
cursor: WebGLTexture;
|
||||
|
||||
@@ -20,8 +20,10 @@ import arcVertSrc from "../shaders/radial-menu/arcs.vert.glsl?raw";
|
||||
import iconFragSrc from "../shaders/radial-menu/icon.frag.glsl?raw";
|
||||
import iconVertSrc from "../shaders/radial-menu/icon.vert.glsl?raw";
|
||||
|
||||
import emojiAtlasMeta from "../assets/emoji-atlas-meta.json";
|
||||
import emojiAtlasUrl from "../assets/emoji-atlas.png?url";
|
||||
import emojiAtlasMeta from "resources/atlases/emoji-atlas-meta.json";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
|
||||
const emojiAtlasUrl = assetUrl("atlases/emoji-atlas.png");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Ring layout configs (CSS pixels)
|
||||
|
||||
@@ -26,10 +26,12 @@ import { buildGlyphMetricsTex } from "./name-pass/data-textures";
|
||||
import { layoutString } from "./name-pass/text-layout";
|
||||
import { CHAR_RANGE, MAX_CHARS } from "./name-pass/types";
|
||||
|
||||
import atlasUrl from "../assets/msdf-atlas.png?url";
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import fragSrc from "../shaders/structure-level/structure-level.frag.glsl?raw";
|
||||
import vertSrc from "../shaders/structure-level/structure-level.vert.glsl?raw";
|
||||
|
||||
const atlasUrl = assetUrl("atlases/msdf-atlas.png");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constants
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -28,11 +28,11 @@ import type { RenderSettings } from "../render-settings";
|
||||
import { getPaletteSize } from "../utils/color-utils";
|
||||
import { createProgram, shaderSrc } from "../utils/gl-utils";
|
||||
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import structureFragSrc from "../shaders/structure/structure.frag.glsl?raw";
|
||||
import structureVertSrc from "../shaders/structure/structure.vert.glsl?raw";
|
||||
|
||||
// Pre-built icon atlas (generated by scripts/generate-sprite-atlases.mjs)
|
||||
import iconAtlasUrl from "../assets/icon-atlas.png?url";
|
||||
const iconAtlasUrl = assetUrl("atlases/icon-atlas.png");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constants
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
* Shells emit 2 instances (pos + lastPos) to match live game's 2-pixel trail.
|
||||
*/
|
||||
|
||||
import { assetUrl } from "src/core/AssetUrls";
|
||||
import type { RendererConfig, UnitState } from "../../types";
|
||||
import {
|
||||
TrainType,
|
||||
@@ -53,8 +54,7 @@ import unitVertSrc from "../shaders/unit/unit.vert.glsl?raw";
|
||||
import { getPaletteSize } from "../utils/color-utils";
|
||||
import { createProgram, shaderSrc } from "../utils/gl-utils";
|
||||
|
||||
// Pre-built sprite atlas (generated by scripts/generate-sprite-atlases.mjs)
|
||||
import unitAtlasUrl from "../assets/unit-atlas.png?url";
|
||||
const unitAtlasUrl = assetUrl("atlases/unit-atlas.png");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constants
|
||||
|
||||