dev/glyph-bank-alignment (#3)
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 60.67% (15274/25176)
* Branch Coverage: 53.64% (5782/10779)
* Lines of Code: 25176
* Cyclomatic Complexity: 9960
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 11, passed: 545
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 60.67% (15274/25176)
* Branch Coverage: 53.64% (5782/10779)
* Lines of Code: 25176
* Cyclomatic Complexity: 9960
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 11, passed: 545
Intrepid/Prometeu/Studio/pipeline/head This commit looks good
Reviewed-on: #3 Co-authored-by: bQUARKz <bquarkz@gmail.com> Co-committed-by: bQUARKz <bquarkz@gmail.com>
This commit was merged in pull request #3.
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ package p.packer.messages.assets;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum AssetFamilyCatalog {
|
||||
TILE_BANK("tile_bank"),
|
||||
GLYPH_BANK("glyph_bank"),
|
||||
SOUND_BANK("sound_bank"),
|
||||
UNKNOWN("unknown");
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum OutputFormatCatalog {
|
||||
TILES_INDEXED_V1(AssetFamilyCatalog.TILE_BANK, "TILES/indexed_v1", "TILES/indexed_v1"),
|
||||
GLYPH_INDEXED_V1(AssetFamilyCatalog.GLYPH_BANK, "GLYPH/indexed_v1", "GLYPH/indexed_v1"),
|
||||
SOUND_V1(AssetFamilyCatalog.SOUND_BANK, "SOUND/v1", "SOUND/v1"),
|
||||
UNKNOWN(AssetFamilyCatalog.UNKNOWN, "unknown", "Unknown");
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package p.packer.models;
|
||||
|
||||
public record PackerGlyphBankRequirements(int tileSize) {
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
package p.packer.models;
|
||||
|
||||
public record PackerTileBankRequirements(int tileSize) {
|
||||
}
|
||||
+28
-28
@@ -17,21 +17,21 @@ import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
public class PackerAssetWalker {
|
||||
private static final int TILE_BANK_EMITTED_SHEET_SIZE = 256;
|
||||
private static final int TILE_BANK_MAX_PALETTES = 64;
|
||||
private static final Set<OutputFormatCatalog> TILE_BANK_SUPPORTED_FORMATS = Set.of(
|
||||
OutputFormatCatalog.TILES_INDEXED_V1
|
||||
private static final int GLYPH_BANK_EMITTED_SHEET_SIZE = 256;
|
||||
private static final int GLYPH_BANK_MAX_PALETTES = 64;
|
||||
private static final Set<OutputFormatCatalog> GLYPH_BANK_SUPPORTED_FORMATS = Set.of(
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1
|
||||
);
|
||||
|
||||
private static final Set<OutputFormatCatalog> SOUND_BANK_SUPPORTED_FORMATS = Set.of(
|
||||
OutputFormatCatalog.SOUND_V1
|
||||
);
|
||||
|
||||
private final PackerTileBankWalker tileBankWalker;
|
||||
private final PackerGlyphBankWalker glyphBankWalker;
|
||||
private final PackerSoundBankWalker soundBankWalker;
|
||||
|
||||
public PackerAssetWalker(final ObjectMapper mapper) {
|
||||
this.tileBankWalker = new PackerTileBankWalker(mapper);
|
||||
this.glyphBankWalker = new PackerGlyphBankWalker(mapper);
|
||||
this.soundBankWalker = new PackerSoundBankWalker(mapper);
|
||||
}
|
||||
|
||||
@@ -47,18 +47,18 @@ public class PackerAssetWalker {
|
||||
final Optional<PackerAssetCacheEntry> priorAssetCache) {
|
||||
final List<PackerDiagnostic> diagnostics = new ArrayList<>();
|
||||
switch (declaration.assetFamily()) {
|
||||
case TILE_BANK -> {
|
||||
case GLYPH_BANK -> {
|
||||
var metadata = declaration.outputMetadata();
|
||||
if (MapUtils.isEmpty(metadata)) {
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.WARNING,
|
||||
PackerDiagnosticCategory.HYGIENE,
|
||||
"Output metadata for tile bank cannot be empty, using default values",
|
||||
"Output metadata for glyph bank cannot be empty, using default values",
|
||||
assetRoot,
|
||||
false));
|
||||
metadata = Map.of("tile_size", "16x16");
|
||||
}
|
||||
final var requirementBuildResult = buildTileBankRequirements(declaration, metadata);
|
||||
final var requirementBuildResult = buildGlyphBankRequirements(declaration, metadata);
|
||||
if (requirementBuildResult.hasError()) {
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.ERROR,
|
||||
@@ -68,11 +68,11 @@ public class PackerAssetWalker {
|
||||
true));
|
||||
return new PackerWalkResult(List.of(), diagnostics);
|
||||
}
|
||||
diagnostics.addAll(tileBankDeclarationDiagnostics(assetRoot, declaration, requirementBuildResult.requirements));
|
||||
final var walkResult = tileBankWalker.walk(assetRoot, requirementBuildResult.requirements, priorAssetCache);
|
||||
diagnostics.addAll(glyphBankDeclarationDiagnostics(assetRoot, declaration, requirementBuildResult.requirements));
|
||||
final var walkResult = glyphBankWalker.walk(assetRoot, requirementBuildResult.requirements, priorAssetCache);
|
||||
diagnostics.addAll(walkResult.diagnostics());
|
||||
diagnostics.addAll(tileBankSelectedArtifactDiagnostics(assetRoot, declaration, walkResult));
|
||||
diagnostics.addAll(tileBankFragileIndexDiagnostics(declaration, walkResult));
|
||||
diagnostics.addAll(glyphBankSelectedArtifactDiagnostics(assetRoot, declaration, walkResult));
|
||||
diagnostics.addAll(glyphBankFragileIndexDiagnostics(declaration, walkResult));
|
||||
return new PackerWalkResult(walkResult.probeResults(), diagnostics);
|
||||
}
|
||||
case SOUND_BANK -> {
|
||||
@@ -81,7 +81,7 @@ public class PackerAssetWalker {
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.WARNING,
|
||||
PackerDiagnosticCategory.HYGIENE,
|
||||
"Output metadata for tile bank cannot be empty, using default values",
|
||||
"Output metadata for sound bank cannot be empty, using default values",
|
||||
assetRoot,
|
||||
false));
|
||||
metadata = Map.of("sample_rate", "44100", "channels", "1");
|
||||
@@ -113,15 +113,15 @@ public class PackerAssetWalker {
|
||||
return PackerWalkResult.EMPTY;
|
||||
}
|
||||
|
||||
private RequirementBuildResult<PackerTileBankRequirements> buildTileBankRequirements(
|
||||
private RequirementBuildResult<PackerGlyphBankRequirements> buildGlyphBankRequirements(
|
||||
final PackerAssetDeclaration declaration,
|
||||
final Map<String, String> metadata) {
|
||||
if (!TILE_BANK_SUPPORTED_FORMATS.contains(declaration.outputFormat())) {
|
||||
return RequirementBuildResult.fail("Unsupported output format for tile bank: " + declaration.outputFormat());
|
||||
if (!GLYPH_BANK_SUPPORTED_FORMATS.contains(declaration.outputFormat())) {
|
||||
return RequirementBuildResult.fail("Unsupported output format for glyph bank: " + declaration.outputFormat());
|
||||
}
|
||||
final var tileSizeStr = metadata.get("tile_size");
|
||||
if (StringUtils.isBlank(tileSizeStr)) {
|
||||
return RequirementBuildResult.fail("Tile size metadata for tile bank cannot be empty");
|
||||
return RequirementBuildResult.fail("Tile size metadata for glyph bank cannot be empty");
|
||||
}
|
||||
final int tileSize;
|
||||
switch (tileSizeStr) {
|
||||
@@ -135,16 +135,16 @@ public class PackerAssetWalker {
|
||||
tileSize = 32;
|
||||
} break;
|
||||
default: {
|
||||
return RequirementBuildResult.fail("Unsupported tile size for tile bank: " + tileSizeStr);
|
||||
return RequirementBuildResult.fail("Unsupported tile size for glyph bank: " + tileSizeStr);
|
||||
}
|
||||
}
|
||||
return RequirementBuildResult.success(new PackerTileBankRequirements(tileSize));
|
||||
return RequirementBuildResult.success(new PackerGlyphBankRequirements(tileSize));
|
||||
}
|
||||
|
||||
private List<PackerDiagnostic> tileBankDeclarationDiagnostics(
|
||||
private List<PackerDiagnostic> glyphBankDeclarationDiagnostics(
|
||||
final Path assetRoot,
|
||||
final PackerAssetDeclaration declaration,
|
||||
final PackerTileBankRequirements requirements) {
|
||||
final PackerGlyphBankRequirements requirements) {
|
||||
final List<PackerDiagnostic> diagnostics = new ArrayList<>();
|
||||
final List<PackerAssetArtifactSelection> artifacts = declaration.artifacts();
|
||||
final Set<Integer> seenIndices = new java.util.HashSet<>();
|
||||
@@ -169,8 +169,8 @@ public class PackerAssetWalker {
|
||||
}
|
||||
}
|
||||
|
||||
final int tileCapacity = (TILE_BANK_EMITTED_SHEET_SIZE / requirements.tileSize())
|
||||
* (TILE_BANK_EMITTED_SHEET_SIZE / requirements.tileSize());
|
||||
final int tileCapacity = (GLYPH_BANK_EMITTED_SHEET_SIZE / requirements.tileSize())
|
||||
* (GLYPH_BANK_EMITTED_SHEET_SIZE / requirements.tileSize());
|
||||
if (artifacts.size() > tileCapacity) {
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.ERROR,
|
||||
@@ -191,18 +191,18 @@ public class PackerAssetWalker {
|
||||
assetRoot,
|
||||
true));
|
||||
}
|
||||
if (declaredPalettes.size() > TILE_BANK_MAX_PALETTES) {
|
||||
if (declaredPalettes.size() > GLYPH_BANK_MAX_PALETTES) {
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.ERROR,
|
||||
PackerDiagnosticCategory.STRUCTURAL,
|
||||
"Tile bank cannot declare more than " + TILE_BANK_MAX_PALETTES + " palettes.",
|
||||
"Glyph bank cannot declare more than " + GLYPH_BANK_MAX_PALETTES + " palettes.",
|
||||
assetRoot,
|
||||
true));
|
||||
}
|
||||
return diagnostics;
|
||||
}
|
||||
|
||||
private List<PackerDiagnostic> tileBankSelectedArtifactDiagnostics(
|
||||
private List<PackerDiagnostic> glyphBankSelectedArtifactDiagnostics(
|
||||
final Path assetRoot,
|
||||
final PackerAssetDeclaration declaration,
|
||||
final PackerWalkResult walkResult) {
|
||||
@@ -225,7 +225,7 @@ public class PackerAssetWalker {
|
||||
return diagnostics;
|
||||
}
|
||||
|
||||
private List<PackerDiagnostic> tileBankFragileIndexDiagnostics(
|
||||
private List<PackerDiagnostic> glyphBankFragileIndexDiagnostics(
|
||||
final PackerAssetDeclaration declaration,
|
||||
final PackerWalkResult walkResult) {
|
||||
final List<DeclaredPalette> declaredPalettes = declaredPalettes(declaration);
|
||||
|
||||
+4
-7
@@ -7,19 +7,17 @@ import p.packer.models.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
public class PackerTileBankWalker extends PackerAbstractBankWalker<PackerTileBankRequirements> {
|
||||
public class PackerGlyphBankWalker extends PackerAbstractBankWalker<PackerGlyphBankRequirements> {
|
||||
private static final int MAX_COLORS_PER_PALETTE = 15;
|
||||
private static final int COLOR_KEY_RGB = 0x00FF00FF;
|
||||
private static final Set<String> SUPPORTED_MIME_TYPES = Set.of(
|
||||
"image/png"
|
||||
);
|
||||
|
||||
public PackerTileBankWalker(ObjectMapper mapper) {
|
||||
public PackerGlyphBankWalker(ObjectMapper mapper) {
|
||||
super(mapper);
|
||||
}
|
||||
|
||||
@@ -42,7 +40,7 @@ public class PackerTileBankWalker extends PackerAbstractBankWalker<PackerTileBan
|
||||
protected PackerProbeResult processFileProbe(
|
||||
final PackerFileProbe fileProbe,
|
||||
final Path assetRoot,
|
||||
final PackerTileBankRequirements requirements) {
|
||||
final PackerGlyphBankRequirements requirements) {
|
||||
final List<PackerDiagnostic> diagnostics = new ArrayList<>();
|
||||
|
||||
final var image = readImage(fileProbe, diagnostics);
|
||||
@@ -63,7 +61,7 @@ public class PackerTileBankWalker extends PackerAbstractBankWalker<PackerTileBan
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.ERROR,
|
||||
PackerDiagnosticCategory.STRUCTURAL,
|
||||
"Invalid tile dimensions for " + fileProbe.path().getFileName()
|
||||
"Invalid glyph dimensions for " + fileProbe.path().getFileName()
|
||||
+ ": expected " + requirements.tileSize() + "x" + requirements.tileSize()
|
||||
+ " but got " + width + "x" + height,
|
||||
fileProbe.path(),
|
||||
@@ -140,7 +138,6 @@ public class PackerTileBankWalker extends PackerAbstractBankWalker<PackerTileBan
|
||||
return new PackerProbeResult(fileProbe, Map.of("tile", tile, "palette", palette), diagnostics);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean hasReusableTileMetadata(final Map<String, Object> metadata) {
|
||||
final Object tileValue = metadata.get("tile");
|
||||
if (!(tileValue instanceof Map<?, ?> tile)) {
|
||||
+30
-29
@@ -37,7 +37,7 @@ import java.util.*;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public final class FileSystemPackerWorkspaceService implements PackerWorkspaceService {
|
||||
private static final int TILE_BANK_COLOR_KEY_RGB565 = 0xF81F;
|
||||
private static final int GLYPH_BANK_COLOR_KEY_RGB565 = 0xF81F;
|
||||
|
||||
private final ObjectMapper mapper;
|
||||
private final PackerWorkspaceFoundation workspaceFoundation;
|
||||
@@ -816,7 +816,7 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
if (declaration == null) {
|
||||
return List.of();
|
||||
}
|
||||
if (declaration.assetFamily() == AssetFamilyCatalog.TILE_BANK) {
|
||||
if (declaration.assetFamily() == AssetFamilyCatalog.GLYPH_BANK) {
|
||||
return List.of();
|
||||
}
|
||||
return List.of(new PackerDiagnostic(
|
||||
@@ -878,7 +878,7 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
"size", packedAsset.payload().length,
|
||||
"decoded_size", packedAsset.decodedSize(),
|
||||
"codec", packedAsset.codec(),
|
||||
"metadata", packedAsset.metadata())));
|
||||
"metadata", packedAsset.runtimeMetadata())));
|
||||
if (packedAsset.preloadEnabled()) {
|
||||
final int slot = nextPreloadSlotByBankType.getOrDefault(packedAsset.bankType(), 0);
|
||||
nextPreloadSlotByBankType.put(packedAsset.bankType(), slot + 1);
|
||||
@@ -888,7 +888,7 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
}
|
||||
assetTableMetadata.add(new LinkedHashMap<>(Map.of(
|
||||
"asset_id", packedAsset.assetId(),
|
||||
"metadata", packedAsset.metadata())));
|
||||
"metadata", packedAsset.toolingMetadata())));
|
||||
}
|
||||
|
||||
final byte[] headerBytes = canonicalJsonBytes(Map.of(
|
||||
@@ -909,10 +909,10 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
|
||||
private PackedAsset packRuntimeAsset(PackerRuntimeAsset runtimeAsset) {
|
||||
final PackerAssetDeclaration declaration = runtimeAsset.parsedDeclaration().declaration();
|
||||
if (declaration == null || declaration.assetFamily() != AssetFamilyCatalog.TILE_BANK) {
|
||||
if (declaration == null || declaration.assetFamily() != AssetFamilyCatalog.GLYPH_BANK) {
|
||||
throw new IllegalStateException("Unsupported pack output family for current implementation.");
|
||||
}
|
||||
return packTileBank(runtimeAsset, declaration);
|
||||
return packGlyphBank(runtimeAsset, declaration);
|
||||
}
|
||||
|
||||
private boolean isEffectivelyIncludedInPackSet(PackerRuntimeAsset runtimeAsset) {
|
||||
@@ -923,7 +923,7 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
return declaration == null || !declaration.artifacts().isEmpty();
|
||||
}
|
||||
|
||||
private PackedAsset packTileBank(PackerRuntimeAsset runtimeAsset, PackerAssetDeclaration declaration) {
|
||||
private PackedAsset packGlyphBank(PackerRuntimeAsset runtimeAsset, PackerAssetDeclaration declaration) {
|
||||
final int tileSize = parseTileSize(declaration.outputMetadata().get("tile_size"));
|
||||
final int width = 256;
|
||||
final int height = 256;
|
||||
@@ -955,35 +955,38 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
});
|
||||
|
||||
final byte[] packedPixels = packNibbles(sheetPixels);
|
||||
final byte[] paletteBytes = emitTileBankPalettes(declaration);
|
||||
final byte[] paletteBytes = emitGlyphBankPalettes(declaration);
|
||||
final byte[] payload = new byte[packedPixels.length + paletteBytes.length];
|
||||
System.arraycopy(packedPixels, 0, payload, 0, packedPixels.length);
|
||||
System.arraycopy(paletteBytes, 0, payload, packedPixels.length, paletteBytes.length);
|
||||
|
||||
final LinkedHashMap<String, Object> metadata = new LinkedHashMap<>();
|
||||
metadata.put("tile_size", tileSize);
|
||||
metadata.put("width", width);
|
||||
metadata.put("height", height);
|
||||
metadata.put("palette_count", 64);
|
||||
metadata.put("palette_authored", countAuthoredTileBankPalettes(declaration));
|
||||
metadata.put("codec", Map.of());
|
||||
metadata.put("pipeline", normalizeTileBankRuntimePipelineMetadata(declaration));
|
||||
final LinkedHashMap<String, Object> runtimeMetadata = new LinkedHashMap<>();
|
||||
runtimeMetadata.put("tile_size", tileSize);
|
||||
runtimeMetadata.put("width", width);
|
||||
runtimeMetadata.put("height", height);
|
||||
runtimeMetadata.put("palette_count", 64);
|
||||
runtimeMetadata.put("palette_authored", countAuthoredGlyphBankPalettes(declaration));
|
||||
runtimeMetadata.put("codec", Map.of());
|
||||
declaration.outputMetadata().forEach((key, value) -> {
|
||||
if (!"tile_size".equals(key)) {
|
||||
metadata.putIfAbsent(key, value);
|
||||
runtimeMetadata.putIfAbsent(key, value);
|
||||
}
|
||||
});
|
||||
|
||||
final LinkedHashMap<String, Object> toolingMetadata = new LinkedHashMap<>(runtimeMetadata);
|
||||
toolingMetadata.put("pipeline", normalizeToolingPipelineMetadata(declaration));
|
||||
|
||||
final PackerRegistryEntry registryEntry = runtimeAsset.registryEntry()
|
||||
.orElseThrow(() -> new IllegalStateException("Packed runtime asset must be registered"));
|
||||
return new PackedAsset(
|
||||
registryEntry.assetId(),
|
||||
declaration.name(),
|
||||
"TILES",
|
||||
"GLYPH",
|
||||
"NONE",
|
||||
payload,
|
||||
width * height + 2048,
|
||||
metadata,
|
||||
runtimeMetadata,
|
||||
toolingMetadata,
|
||||
declaration.preloadEnabled());
|
||||
}
|
||||
|
||||
@@ -1006,7 +1009,7 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
return packed;
|
||||
}
|
||||
|
||||
private byte[] emitTileBankPalettes(PackerAssetDeclaration declaration) {
|
||||
private byte[] emitGlyphBankPalettes(PackerAssetDeclaration declaration) {
|
||||
final byte[] bytes = new byte[64 * 16 * 2];
|
||||
final JsonNode palettesNode = declaration.outputPipelineMetadata().get("palettes");
|
||||
if (!(palettesNode instanceof com.fasterxml.jackson.databind.node.ArrayNode palettesArray)) {
|
||||
@@ -1023,8 +1026,8 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
continue;
|
||||
}
|
||||
final int paletteBaseOffset = (paletteIndex * 16) * 2;
|
||||
bytes[paletteBaseOffset] = (byte) (TILE_BANK_COLOR_KEY_RGB565 & 0xFF);
|
||||
bytes[paletteBaseOffset + 1] = (byte) ((TILE_BANK_COLOR_KEY_RGB565 >>> 8) & 0xFF);
|
||||
bytes[paletteBaseOffset] = (byte) (GLYPH_BANK_COLOR_KEY_RGB565 & 0xFF);
|
||||
bytes[paletteBaseOffset + 1] = (byte) ((GLYPH_BANK_COLOR_KEY_RGB565 >>> 8) & 0xFF);
|
||||
final JsonNode convertedNode = paletteNode.path("convertedRgb565");
|
||||
if (!convertedNode.isArray()) {
|
||||
continue;
|
||||
@@ -1039,16 +1042,13 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
return bytes;
|
||||
}
|
||||
|
||||
private int countAuthoredTileBankPalettes(PackerAssetDeclaration declaration) {
|
||||
private int countAuthoredGlyphBankPalettes(PackerAssetDeclaration declaration) {
|
||||
final JsonNode palettesNode = declaration.outputPipelineMetadata().get("palettes");
|
||||
return palettesNode instanceof ArrayNode palettesArray ? palettesArray.size() : 0;
|
||||
}
|
||||
|
||||
private Map<String, Object> normalizeTileBankRuntimePipelineMetadata(PackerAssetDeclaration declaration) {
|
||||
final LinkedHashMap<String, Object> pipeline = new LinkedHashMap<>(
|
||||
PackerReadMessageMapper.normalizeMetadata(declaration.outputPipelineMetadata()));
|
||||
pipeline.remove("palettes");
|
||||
return pipeline;
|
||||
private Map<String, Object> normalizeToolingPipelineMetadata(PackerAssetDeclaration declaration) {
|
||||
return new LinkedHashMap<>(PackerReadMessageMapper.normalizeMetadata(declaration.outputPipelineMetadata()));
|
||||
}
|
||||
|
||||
private byte[] buildPrelude(int headerLength) {
|
||||
@@ -1111,7 +1111,8 @@ public final class FileSystemPackerWorkspaceService implements PackerWorkspaceSe
|
||||
String codec,
|
||||
byte[] payload,
|
||||
int decodedSize,
|
||||
Map<String, Object> metadata,
|
||||
Map<String, Object> runtimeMetadata,
|
||||
Map<String, Object> toolingMetadata,
|
||||
boolean preloadEnabled) {
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ public final class PackerAssetDeclarationParser {
|
||||
diagnostics.add(new PackerDiagnostic(
|
||||
PackerDiagnosticSeverity.ERROR,
|
||||
PackerDiagnosticCategory.STRUCTURAL,
|
||||
"Field 'type' must be one of: tile_bank, palette_bank, sound_bank.",
|
||||
"Field 'type' must be one of: glyph_bank, palette_bank, sound_bank.",
|
||||
manifestPath,
|
||||
true));
|
||||
return null;
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ final class PackerOutputContractCatalog {
|
||||
codecs.addAll(outputFormat.availableCodecs());
|
||||
} else {
|
||||
final String normalizedFormat = outputFormat.manifestValue().trim().toUpperCase(Locale.ROOT);
|
||||
if (normalizedFormat.startsWith("TILES/")
|
||||
if (normalizedFormat.startsWith("GLYPH/")
|
||||
|| normalizedFormat.startsWith("PALETTE/")
|
||||
|| normalizedFormat.startsWith("SOUND/")
|
||||
|| normalizedFormat.startsWith("AUDIO/")) {
|
||||
@@ -54,7 +54,7 @@ final class PackerOutputContractCatalog {
|
||||
|
||||
private static List<PackerCodecConfigurationField> metadataFieldsFor(OutputFormatCatalog outputFormat) {
|
||||
return switch (outputFormat) {
|
||||
case TILES_INDEXED_V1 -> List.of(new PackerCodecConfigurationField(
|
||||
case GLYPH_INDEXED_V1 -> List.of(new PackerCodecConfigurationField(
|
||||
"tile_size",
|
||||
"TileSize",
|
||||
PackerCodecConfigurationFieldType.ENUM,
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@ import org.junit.jupiter.api.io.TempDir;
|
||||
import p.packer.models.PackerAssetCacheEntry;
|
||||
import p.packer.models.PackerFileCacheEntry;
|
||||
import p.packer.models.PackerTileIndexedV1;
|
||||
import p.packer.models.PackerTileBankRequirements;
|
||||
import p.packer.models.PackerGlyphBankRequirements;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -18,7 +18,7 @@ import java.util.Optional;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
final class PackerTileBankWalkerTest {
|
||||
final class PackerGlyphBankWalkerTest {
|
||||
private static final ObjectMapper MAPPER = new ObjectMapper();
|
||||
|
||||
@TempDir
|
||||
@@ -30,7 +30,7 @@ final class PackerTileBankWalkerTest {
|
||||
final Path filePath = assetRoot.resolve("tile.png");
|
||||
writeTile(filePath);
|
||||
|
||||
final PackerTileBankWalker walker = new PackerTileBankWalker(MAPPER);
|
||||
final PackerGlyphBankWalker walker = new PackerGlyphBankWalker(MAPPER);
|
||||
final PackerAssetCacheEntry priorCache = new PackerAssetCacheEntry(
|
||||
1,
|
||||
"contract",
|
||||
@@ -45,7 +45,7 @@ final class PackerTileBankWalkerTest {
|
||||
"palette", Map.of("originalArgb8888", List.of(0xFFFFFFFF))),
|
||||
List.of())));
|
||||
|
||||
final var result = walker.walk(assetRoot, new PackerTileBankRequirements(16), Optional.of(priorCache));
|
||||
final var result = walker.walk(assetRoot, new PackerGlyphBankRequirements(16), Optional.of(priorCache));
|
||||
|
||||
final PackerTileIndexedV1 tile = (PackerTileIndexedV1) result.probeResults().getFirst().metadata().get("tile");
|
||||
assertNotNull(tile);
|
||||
+2
-2
@@ -135,9 +135,9 @@ final class PackerRuntimeAssetMaterializerTest {
|
||||
1,
|
||||
"uuid",
|
||||
"asset",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
artifacts,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
metadata,
|
||||
pipelineMetadata,
|
||||
|
||||
+31
-31
@@ -141,7 +141,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
assertEquals(PackerOperationStatus.SUCCESS, result.status());
|
||||
assertEquals(1, result.packSummary().assets().size());
|
||||
assertEquals(1, result.packSummary().assets().getFirst().artifactCount());
|
||||
assertEquals(OutputFormatCatalog.TILES_INDEXED_V1, result.packSummary().assets().getFirst().outputFormat());
|
||||
assertEquals(OutputFormatCatalog.GLYPH_INDEXED_V1, result.packSummary().assets().getFirst().outputFormat());
|
||||
assertEquals("16x16", result.packSummary().assets().getFirst().outputMetadata().get("tile_size"));
|
||||
assertEquals(64L, ((Map<?, ?>) ((Map<?, ?>) result.packSummary().assets().getFirst().outputPipeline().get("samples")).get("1")).get("length"));
|
||||
assertEquals(0L, result.packSummary().assets().getFirst().lastModified());
|
||||
@@ -232,14 +232,14 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void packValidationBlocksTileBanksWithoutDeclaredPalettes() throws Exception {
|
||||
void packValidationBlocksGlyphBanksWithoutDeclaredPalettes() throws Exception {
|
||||
final Path projectRoot = copyFixture("workspaces/managed-basic", tempDir.resolve("pack-validation-no-palettes"));
|
||||
final Path assetRoot = projectRoot.resolve("assets/ui/atlas");
|
||||
final Path manifestPath = assetRoot.resolve("asset.json");
|
||||
writeTilePng(assetRoot.resolve("confirm.png"), 16);
|
||||
|
||||
final ObjectNode manifest = (ObjectNode) MAPPER.readTree(manifestPath.toFile());
|
||||
manifest.putObject("output").put("format", "TILES/indexed_v1").put("codec", "NONE");
|
||||
manifest.putObject("output").put("format", "GLYPH/indexed_v1").put("codec", "NONE");
|
||||
final var artifacts = manifest.putArray("artifacts");
|
||||
artifacts.addObject().put("file", "confirm.png").put("index", 0);
|
||||
MAPPER.writerWithDefaultPrettyPrinter().writeValue(manifestPath.toFile(), manifest);
|
||||
@@ -278,7 +278,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void packWorkspaceEmitsTileBankArtifactsFromFrozenSnapshot() throws Exception {
|
||||
void packWorkspaceEmitsGlyphBankArtifactsFromFrozenSnapshot() throws Exception {
|
||||
final Path projectRoot = copyFixture("workspaces/managed-basic", tempDir.resolve("pack-workspace-success"));
|
||||
final Path assetRoot = projectRoot.resolve("assets/ui/atlas");
|
||||
final Path manifestPath = assetRoot.resolve("asset.json");
|
||||
@@ -330,15 +330,14 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
assertEquals(0xF81F, readLeUnsignedShort(assetsPa, paletteStart));
|
||||
assertEquals(0xF800, readLeUnsignedShort(assetsPa, paletteStart + 2));
|
||||
assertEquals(1, assetTable.get(0).path("asset_id").asInt());
|
||||
assertEquals("TILES", assetTable.get(0).path("bank_type").asText());
|
||||
assertEquals("GLYPH", assetTable.get(0).path("bank_type").asText());
|
||||
assertEquals("NONE", assetTable.get(0).path("codec").asText());
|
||||
assertEquals(16, assetTable.get(0).path("metadata").path("tile_size").asInt());
|
||||
assertEquals(256, assetTable.get(0).path("metadata").path("width").asInt());
|
||||
assertEquals(256, assetTable.get(0).path("metadata").path("height").asInt());
|
||||
assertEquals(64, assetTable.get(0).path("metadata").path("palette_count").asInt());
|
||||
assertEquals(1, assetTable.get(0).path("metadata").path("palette_authored").asInt());
|
||||
assertTrue(assetTable.get(0).path("metadata").path("pipeline").isObject());
|
||||
assertTrue(assetTable.get(0).path("metadata").path("pipeline").path("palettes").isMissingNode());
|
||||
assertTrue(assetTable.get(0).path("metadata").path("pipeline").isMissingNode());
|
||||
|
||||
final var preload = MAPPER.readTree(projectRoot.resolve("build/preload.json").toFile());
|
||||
assertEquals(1, preload.size());
|
||||
@@ -348,7 +347,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
final var assetTableMetadata = MAPPER.readTree(projectRoot.resolve("build/asset_table_metadata.json").toFile());
|
||||
assertEquals(1, assetTableMetadata.size());
|
||||
assertEquals(1, assetTableMetadata.get(0).path("metadata").path("palette_authored").asInt());
|
||||
assertTrue(assetTableMetadata.get(0).path("metadata").path("pipeline").path("palettes").isMissingNode());
|
||||
assertEquals(1, assetTableMetadata.get(0).path("metadata").path("pipeline").path("palettes").size());
|
||||
assertEquals(0, assetTableMetadata.get(0).path("metadata").path("pipeline").path("palettes").get(0).path("index").asInt());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -446,7 +446,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
assertEquals(PackerOperationStatus.PARTIAL, result.status());
|
||||
assertFalse(result.canPack());
|
||||
assertTrue(result.assets().getFirst().diagnostics().stream()
|
||||
.anyMatch(diagnostic -> diagnostic.message().contains("Invalid tile dimensions for oversized.png")));
|
||||
.anyMatch(diagnostic -> diagnostic.message().contains("Invalid glyph dimensions for oversized.png")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -491,8 +491,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/new-atlas",
|
||||
"new_atlas",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
true));
|
||||
|
||||
@@ -521,8 +521,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/new-atlas",
|
||||
"new_atlas",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
true));
|
||||
|
||||
@@ -539,7 +539,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
assertEquals("new_atlas", detailsResult.details().summary().identity().assetName());
|
||||
assertNotNull(detailsResult.details().summary().identity().assetUuid());
|
||||
assertTrue(detailsResult.diagnostics().stream().noneMatch(diagnostic -> diagnostic.blocking()));
|
||||
assertTrue(detailsResult.diagnostics().stream().anyMatch(diagnostic -> diagnostic.message().contains("Output metadata for tile bank cannot be empty")));
|
||||
assertTrue(detailsResult.diagnostics().stream().anyMatch(diagnostic -> diagnostic.message().contains("Output metadata for glyph bank cannot be empty")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -555,8 +555,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/new-atlas",
|
||||
"new_atlas",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
true));
|
||||
|
||||
@@ -987,7 +987,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
"name": "ui_atlas",
|
||||
"type": "IMAGE/bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "none"
|
||||
},
|
||||
"preload": {
|
||||
@@ -1002,7 +1002,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
"name": "ui_clone",
|
||||
"type": "IMAGE/bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "none"
|
||||
},
|
||||
"preload": {
|
||||
@@ -1053,8 +1053,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/delete-me",
|
||||
"delete_me",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
false));
|
||||
final Path assetRoot = projectRoot.resolve("assets/ui/delete-me");
|
||||
@@ -1081,8 +1081,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/source-atlas",
|
||||
"source_atlas",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
true));
|
||||
Files.writeString(projectRoot.resolve("assets/ui/source-atlas/atlas.png"), "fixture");
|
||||
@@ -1148,16 +1148,16 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/source",
|
||||
"source",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
false));
|
||||
final CreateAssetResult target = service.createAsset(new CreateAssetRequest(
|
||||
project(projectRoot),
|
||||
"ui/target",
|
||||
"target",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
false));
|
||||
|
||||
@@ -1223,7 +1223,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"audio/bad",
|
||||
"bad_asset",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.SOUND_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
false));
|
||||
@@ -1243,16 +1243,16 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
project(projectRoot),
|
||||
"ui/atlas-a",
|
||||
"atlas_a",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
true)));
|
||||
final Future<CreateAssetResult> second = executor.submit(() -> service.createAsset(new CreateAssetRequest(
|
||||
project(projectRoot),
|
||||
"ui/atlas-b",
|
||||
"atlas_b",
|
||||
AssetFamilyCatalog.TILE_BANK,
|
||||
OutputFormatCatalog.TILES_INDEXED_V1,
|
||||
AssetFamilyCatalog.GLYPH_BANK,
|
||||
OutputFormatCatalog.GLYPH_INDEXED_V1,
|
||||
OutputCodecCatalog.NONE,
|
||||
false)));
|
||||
|
||||
|
||||
+11
-11
@@ -29,8 +29,8 @@ final class PackerAssetDeclarationParserTest {
|
||||
assertEquals(1, result.declaration().schemaVersion());
|
||||
assertEquals("fixture-uuid-1", result.declaration().assetUuid());
|
||||
assertEquals("ui_atlas", result.declaration().name());
|
||||
assertEquals(AssetFamilyCatalog.TILE_BANK, result.declaration().assetFamily());
|
||||
assertEquals("TILES/indexed_v1", result.declaration().outputFormat().displayName());
|
||||
assertEquals(AssetFamilyCatalog.GLYPH_BANK, result.declaration().assetFamily());
|
||||
assertEquals("GLYPH/indexed_v1", result.declaration().outputFormat().displayName());
|
||||
assertEquals(OutputCodecCatalog.NONE, result.declaration().outputCodec());
|
||||
assertEquals(Map.of(), result.declaration().outputPipelineMetadata());
|
||||
assertTrue(result.declaration().preloadEnabled());
|
||||
@@ -75,9 +75,9 @@ final class PackerAssetDeclarationParserTest {
|
||||
"schema_version": 1,
|
||||
"asset_uuid": "uuid-pipeline",
|
||||
"name": "pipeline_asset",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "NONE",
|
||||
"pipeline": []
|
||||
},
|
||||
@@ -99,9 +99,9 @@ final class PackerAssetDeclarationParserTest {
|
||||
"schema_version": 1,
|
||||
"asset_uuid": "uuid-palette-contract",
|
||||
"name": "palette_asset",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "NONE",
|
||||
"pipeline": {
|
||||
"palettes": [
|
||||
@@ -135,9 +135,9 @@ final class PackerAssetDeclarationParserTest {
|
||||
"schema_version": 1,
|
||||
"asset_uuid": "uuid-palette-duplicate",
|
||||
"name": "palette_asset",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "NONE",
|
||||
"pipeline": {
|
||||
"palettes": [
|
||||
@@ -203,9 +203,9 @@ final class PackerAssetDeclarationParserTest {
|
||||
"schema_version": 1,
|
||||
"asset_uuid": "uuid-outside",
|
||||
"name": "bad_asset",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"inputs": { "sprites": ["../outside.png"] },
|
||||
"output": { "format": "TILES/indexed_v1", "codec": "NONE" },
|
||||
"output": { "format": "GLYPH/indexed_v1", "codec": "NONE" },
|
||||
"preload": { "enabled": true }
|
||||
}
|
||||
""");
|
||||
@@ -225,7 +225,7 @@ final class PackerAssetDeclarationParserTest {
|
||||
"asset_uuid": "uuid-video",
|
||||
"name": "bad_asset",
|
||||
"type": "video_bank",
|
||||
"output": { "format": "TILES/indexed_v1", "codec": "NONE" },
|
||||
"output": { "format": "GLYPH/indexed_v1", "codec": "NONE" },
|
||||
"preload": { "enabled": true }
|
||||
}
|
||||
""");
|
||||
|
||||
+4
-4
@@ -44,14 +44,14 @@ final class PackerAssetDetailsServiceTest {
|
||||
assertEquals(PackerBuildParticipation.INCLUDED, result.details().summary().buildParticipation());
|
||||
assertEquals("fixture-uuid-1", result.details().summary().identity().assetUuid());
|
||||
assertEquals("ui_atlas", result.details().summary().identity().assetName());
|
||||
assertEquals("TILES/indexed_v1", result.details().outputFormat().displayName());
|
||||
assertEquals("GLYPH/indexed_v1", result.details().outputFormat().displayName());
|
||||
assertEquals(List.of(OutputCodecCatalog.NONE), result.details().availableOutputCodecs());
|
||||
assertEquals(List.of(), result.details().codecConfigurationFieldsByCodec().get(OutputCodecCatalog.NONE));
|
||||
assertNotNull(result.details().bankComposition());
|
||||
assertTrue(result.details().bankComposition().selectedFiles().isEmpty());
|
||||
assertTrue(result.details().pipelinePalettes().isEmpty());
|
||||
assertTrue(result.diagnostics().stream().noneMatch(diagnostic -> diagnostic.blocking()));
|
||||
assertTrue(result.diagnostics().stream().anyMatch(diagnostic -> diagnostic.message().contains("Output metadata for tile bank cannot be empty")));
|
||||
assertTrue(result.diagnostics().stream().anyMatch(diagnostic -> diagnostic.message().contains("Output metadata for glyph bank cannot be empty")));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -152,9 +152,9 @@ final class PackerAssetDetailsServiceTest {
|
||||
|
||||
assertEquals(PackerOperationStatus.PARTIAL, result.status());
|
||||
assertTrue(result.diagnostics().stream()
|
||||
.anyMatch(diagnostic -> diagnostic.message().contains("Invalid tile dimensions for wrong-palette.png")));
|
||||
.anyMatch(diagnostic -> diagnostic.message().contains("Invalid glyph dimensions for wrong-palette.png")));
|
||||
assertTrue(result.details().diagnostics().stream()
|
||||
.anyMatch(diagnostic -> diagnostic.message().contains("Invalid tile dimensions for wrong-palette.png")));
|
||||
.anyMatch(diagnostic -> diagnostic.message().contains("Invalid glyph dimensions for wrong-palette.png")));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"inputs": "wrong",
|
||||
"output": {
|
||||
"codec": ""
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
"schema_version": 9,
|
||||
"asset_uuid": "future-uuid-1",
|
||||
"name": "future_asset",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "NONE"
|
||||
},
|
||||
"preload": {
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
"schema_version": 1,
|
||||
"asset_uuid": "fixture-uuid-1",
|
||||
"name": "ui_atlas",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "NONE"
|
||||
},
|
||||
"preload": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"inputs": "wrong",
|
||||
"output": {
|
||||
"codec": ""
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@
|
||||
"schema_version": 1,
|
||||
"asset_uuid": "uuid-1",
|
||||
"name": "ui_atlas",
|
||||
"type": "tile_bank",
|
||||
"type": "glyph_bank",
|
||||
"output": {
|
||||
"format": "TILES/indexed_v1",
|
||||
"format": "GLYPH/indexed_v1",
|
||||
"codec": "NONE"
|
||||
},
|
||||
"preload": {
|
||||
|
||||
Reference in New Issue
Block a user