Studio and Packer RGBA8888 Asset Pipeline Alignment
Intrepid/Prometeu/Studio/pipeline/head Build started...
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 61.03% (17116/28043)
* Branch Coverage: 51.80% (6569/12681)
* Lines of Code: 28043
* Cyclomatic Complexity: 11219
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 16, passed: 580
Intrepid/Prometeu/Studio/pipeline/head Build started...
Intrepid/Prometeu/Studio/pipeline/pr-master Build started...
JaCoCo Coverage #### Project Overview
No changes detected, that affect the code coverage.
* Line Coverage: 61.03% (17116/28043)
* Branch Coverage: 51.80% (6569/12681)
* Lines of Code: 28043
* Cyclomatic Complexity: 11219
#### Quality Gates Summary
Output truncated.
Test / Build skipped: 16, passed: 580
This commit is contained in:
+5
-5
@@ -187,7 +187,7 @@ final class PackerGlyphMaterialSupport {
|
||||
try {
|
||||
final int index = Integer.parseInt(entry.getKey());
|
||||
final String color = normalizeHtmlColor(entry.getValue().asText(null));
|
||||
if (index >= 1 && index <= 15 && color != null) {
|
||||
if (index >= 0 && index <= 15 && color != null) {
|
||||
materialIndices.put(index, color);
|
||||
}
|
||||
} catch (NumberFormatException ignored) {
|
||||
@@ -197,7 +197,7 @@ final class PackerGlyphMaterialSupport {
|
||||
if (materialIndices.isEmpty()
|
||||
|| materialIndices.size() != materialIndicesNode.size()
|
||||
|| !denseIndices(materialIndices.keySet())) {
|
||||
diagnostics.add(blocking("Schema '" + schemaId + "' must define dense material_indices in range 1..15 using #RRGGBB values.", supportFile));
|
||||
diagnostics.add(blocking("Schema '" + schemaId + "' must define dense material_indices in range 0..15 using #RRGGBB or #RRGGBBAA values.", supportFile));
|
||||
return Optional.empty();
|
||||
}
|
||||
if (!(schemaNode.path("artifact_bindings") instanceof ArrayNode bindingsNode) || bindingsNode.isEmpty()) {
|
||||
@@ -242,7 +242,7 @@ final class PackerGlyphMaterialSupport {
|
||||
for (JsonNode colorNode : colorsNode) {
|
||||
final String color = normalizeHtmlColor(colorNode.asText(null));
|
||||
if (color == null) {
|
||||
diagnostics.add(blocking("Palette '" + paletteId + "' must use #RRGGBB colors.", supportFile));
|
||||
diagnostics.add(blocking("Palette '" + paletteId + "' must use #RRGGBB or #RRGGBBAA colors.", supportFile));
|
||||
return Optional.empty();
|
||||
}
|
||||
colors.add(color);
|
||||
@@ -260,7 +260,7 @@ final class PackerGlyphMaterialSupport {
|
||||
}
|
||||
|
||||
private boolean denseIndices(Set<Integer> indices) {
|
||||
int expected = 1;
|
||||
int expected = 0;
|
||||
for (Integer index : new TreeSet<>(indices)) {
|
||||
if (index == null || index != expected) {
|
||||
return false;
|
||||
@@ -275,7 +275,7 @@ final class PackerGlyphMaterialSupport {
|
||||
return null;
|
||||
}
|
||||
final String normalized = value.trim().toUpperCase();
|
||||
return normalized.matches("^#[0-9A-F]{6}$") ? normalized : null;
|
||||
return normalized.matches("^#[0-9A-F]{6}([0-9A-F]{2})?$") ? normalized : null;
|
||||
}
|
||||
|
||||
private record GlyphMaterialFile(
|
||||
|
||||
+4
-4
@@ -385,8 +385,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
"status": "ok",
|
||||
"version": 1,
|
||||
"material_indices": {
|
||||
"1": "#00FF00",
|
||||
"2": "#FF0000"
|
||||
"0": "#00FF00",
|
||||
"1": "#FF0000"
|
||||
},
|
||||
"artifact_bindings": [
|
||||
{
|
||||
@@ -1022,7 +1022,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
"schema_id": "schema-1",
|
||||
"status": "ok",
|
||||
"version": 2,
|
||||
"material_indices": { "1": "#FF0000" },
|
||||
"material_indices": { "0": "#FF0000" },
|
||||
"artifact_bindings": [
|
||||
{ "artifact_id": "%s", "fingerprint": "%s" }
|
||||
]
|
||||
@@ -1079,7 +1079,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
||||
"schema_id": "schema-1",
|
||||
"status": "ok",
|
||||
"version": 1,
|
||||
"material_indices": { "1": "#FF0000" },
|
||||
"material_indices": { "0": "#FF0000" },
|
||||
"artifact_bindings": [
|
||||
{ "artifact_id": "%s", "fingerprint": "%s" }
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user