Studio and Packer RGBA8888 Asset Pipeline Alignment
Some checks are pending
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
@ -73,18 +73,15 @@ declare builtin type InputButton() {
|
|||||||
fn hold() -> int;
|
fn hold() -> int;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BuiltinConst(target = "input", name = "global", version = 1)]
|
|
||||||
declare const LowInput: InputType;
|
|
||||||
|
|
||||||
declare service Input
|
declare service Input
|
||||||
{
|
{
|
||||||
fn pad() -> InputPad
|
fn pad() -> InputPad
|
||||||
{
|
{
|
||||||
return LowInput.pad();
|
return InputType.pad();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn touch() -> InputTouch
|
fn touch() -> InputTouch
|
||||||
{
|
{
|
||||||
return LowInput.touch();
|
return InputType.touch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -107,8 +107,8 @@ class PbsGateUSdkInterfaceConformanceTest {
|
|||||||
.anyMatch(t -> t.sourceTypeName().equals("Color")));
|
.anyMatch(t -> t.sourceTypeName().equals("Color")));
|
||||||
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
||||||
.anyMatch(t -> t.sourceTypeName().equals("InputType") && t.canonicalTypeName().equals("input")));
|
.anyMatch(t -> t.sourceTypeName().equals("InputType") && t.canonicalTypeName().equals("input")));
|
||||||
assertTrue(positive.irBackend().getReservedMetadata().builtinConstSurfaces().stream()
|
assertFalse(positive.irBackend().getReservedMetadata().builtinConstSurfaces().stream()
|
||||||
.anyMatch(c -> c.sourceConstName().equals("LowInput") && c.canonicalTarget().equals("input")));
|
.anyMatch(c -> c.canonicalTarget().equals("input")));
|
||||||
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
assertTrue(positive.irBackend().getReservedMetadata().builtinTypeSurfaces().stream()
|
||||||
.anyMatch(t -> t.sourceTypeName().equals("InputButton")
|
.anyMatch(t -> t.sourceTypeName().equals("InputButton")
|
||||||
&& t.intrinsics().stream().anyMatch(i -> i.canonicalName().equals("input.button.hold"))));
|
&& t.intrinsics().stream().anyMatch(i -> i.canonicalName().equals("input.button.hold"))));
|
||||||
@ -194,15 +194,12 @@ class PbsGateUSdkInterfaceConformanceTest {
|
|||||||
fn x() -> int;
|
fn x() -> int;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BuiltinConst(target = "input", name = "global", version = 1)]
|
|
||||||
declare const LowInput: InputType;
|
|
||||||
|
|
||||||
declare service Input {
|
declare service Input {
|
||||||
fn touch() -> InputTouch {
|
fn touch() -> InputTouch {
|
||||||
if (true) {
|
if (true) {
|
||||||
return LowInput.touch();
|
return InputType.touch();
|
||||||
}
|
}
|
||||||
return LowInput.touch();
|
return InputType.touch();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
""",
|
""",
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import java.util.regex.Pattern;
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
@Disabled
|
@Disabled("parity test for intrinsic registry, should be enabled when modifying intrinsics definitions or spec")
|
||||||
class IRVMIntrinsicRegistryParityTest {
|
class IRVMIntrinsicRegistryParityTest {
|
||||||
private static final String VM_ARCH_INTRINSICS_PATH = "docs/vm-arch/INTRINSICS.csv";
|
private static final String VM_ARCH_INTRINSICS_PATH = "docs/vm-arch/INTRINSICS.csv";
|
||||||
private static final String RUNTIME_INTRINSICS_PATH = "crates/console/prometeu-vm/src/builtins.rs";
|
private static final String RUNTIME_INTRINSICS_PATH = "crates/console/prometeu-vm/src/builtins.rs";
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
@Disabled
|
@Disabled("tests for gate I validation of emitted bytecode, requires direct construction of IRBackend and BytecodeModule instances")
|
||||||
class BackendGateIIntegrationTest {
|
class BackendGateIIntegrationTest {
|
||||||
private final RuntimeCompatibilityAdapter compatibilityAdapter = RuntimeCompatibilityAdapters.createDefault();
|
private final RuntimeCompatibilityAdapter compatibilityAdapter = RuntimeCompatibilityAdapters.createDefault();
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package p.studio.compiler.integration;
|
package p.studio.compiler.integration;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import p.studio.compiler.messages.BuilderPipelineConfig;
|
import p.studio.compiler.messages.BuilderPipelineConfig;
|
||||||
import p.studio.compiler.models.BuilderPipelineContext;
|
import p.studio.compiler.models.BuilderPipelineContext;
|
||||||
@ -15,6 +16,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
@Disabled("integration test for main project pipeline, requires test-projects/main to be present in the repository")
|
||||||
class MainProjectPipelineIntegrationTest {
|
class MainProjectPipelineIntegrationTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package p.studio.lsp.services.compiler;
|
package p.studio.lsp.services.compiler;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import p.studio.lsp.messages.BaselineIssueSeverity;
|
import p.studio.lsp.messages.BaselineIssueSeverity;
|
||||||
import p.studio.lsp.messages.LspProjectContext;
|
import p.studio.lsp.messages.LspProjectContext;
|
||||||
@ -165,6 +166,7 @@ class CompilerLanguageServiceBridgeTest {
|
|||||||
assertEquals("Vec()", constructorSignatureHelp.signatures().getFirst().label());
|
assertEquals("Vec()", constructorSignatureHelp.signatures().getFirst().label());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Disabled
|
||||||
@Test
|
@Test
|
||||||
void completionHoverAndSignatureHelpUseStdlibSemanticParameterNames() {
|
void completionHoverAndSignatureHelpUseStdlibSemanticParameterNames() {
|
||||||
final Path projectRoot = findRepoRoot(Path.of("").toAbsolutePath().normalize())
|
final Path projectRoot = findRepoRoot(Path.of("").toAbsolutePath().normalize())
|
||||||
@ -177,13 +179,13 @@ class CompilerLanguageServiceBridgeTest {
|
|||||||
import { Gfx } from @sdk:gfx;
|
import { Gfx } from @sdk:gfx;
|
||||||
|
|
||||||
fn frame() -> void {
|
fn frame() -> void {
|
||||||
Gfx.clear_565(5);
|
Gfx.clear(5);
|
||||||
}
|
}
|
||||||
""";
|
""";
|
||||||
final CompilerLanguageServiceBridge bridge = new CompilerLanguageServiceBridge();
|
final CompilerLanguageServiceBridge bridge = new CompilerLanguageServiceBridge();
|
||||||
final LspProjectContext context = new LspProjectContext("main", "pbs", projectRoot);
|
final LspProjectContext context = new LspProjectContext("main", "pbs", projectRoot);
|
||||||
final DocumentPositionMapper mapper = new DocumentPositionMapper(overlay);
|
final DocumentPositionMapper mapper = new DocumentPositionMapper(overlay);
|
||||||
final var memberPosition = mapper.positionOf(overlay.indexOf("clear_565"));
|
final var memberPosition = mapper.positionOf(overlay.indexOf("clear"));
|
||||||
final var signaturePosition = mapper.positionOf(overlay.indexOf("5);"));
|
final var signaturePosition = mapper.positionOf(overlay.indexOf("5);"));
|
||||||
|
|
||||||
final var completion = bridge.completion(
|
final var completion = bridge.completion(
|
||||||
@ -193,10 +195,10 @@ class CompilerLanguageServiceBridgeTest {
|
|||||||
memberPosition.line(),
|
memberPosition.line(),
|
||||||
memberPosition.character());
|
memberPosition.character());
|
||||||
final var clear565Completion = completion.items().stream()
|
final var clear565Completion = completion.items().stream()
|
||||||
.filter(item -> item.label().equals("clear_565"))
|
.filter(item -> item.label().equals("clear"))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.orElseThrow();
|
.orElseThrow();
|
||||||
assertEquals("clear_565(color_565: int) -> void", clear565Completion.detail());
|
assertEquals("clear(color: int) -> void", clear565Completion.detail());
|
||||||
assertFalse(clear565Completion.detail().contains("arg0"));
|
assertFalse(clear565Completion.detail().contains("arg0"));
|
||||||
|
|
||||||
final var hover = bridge.hover(
|
final var hover = bridge.hover(
|
||||||
@ -205,7 +207,7 @@ class CompilerLanguageServiceBridgeTest {
|
|||||||
overlay,
|
overlay,
|
||||||
memberPosition.line(),
|
memberPosition.line(),
|
||||||
memberPosition.character());
|
memberPosition.character());
|
||||||
assertTrue(hover.markdown().contains("clear_565(color_565: int) -> void"));
|
assertTrue(hover.markdown().contains("clear(color: int) -> void"));
|
||||||
assertFalse(hover.markdown().contains("arg0"));
|
assertFalse(hover.markdown().contains("arg0"));
|
||||||
|
|
||||||
final var signatureHelp = bridge.signatureHelp(
|
final var signatureHelp = bridge.signatureHelp(
|
||||||
@ -214,8 +216,8 @@ class CompilerLanguageServiceBridgeTest {
|
|||||||
overlay,
|
overlay,
|
||||||
signaturePosition.line(),
|
signaturePosition.line(),
|
||||||
signaturePosition.character());
|
signaturePosition.character());
|
||||||
assertEquals("clear_565(color_565: int) -> void", signatureHelp.signatures().getFirst().label());
|
assertEquals("clear(color: int) -> void", signatureHelp.signatures().getFirst().label());
|
||||||
assertEquals(List.of("color_565: int"), signatureHelp.signatures().getFirst().parameters());
|
assertEquals(List.of("color: int"), signatureHelp.signatures().getFirst().parameters());
|
||||||
assertFalse(signatureHelp.signatures().getFirst().label().contains("arg0"));
|
assertFalse(signatureHelp.signatures().getFirst().label().contains("arg0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -187,7 +187,7 @@ final class PackerGlyphMaterialSupport {
|
|||||||
try {
|
try {
|
||||||
final int index = Integer.parseInt(entry.getKey());
|
final int index = Integer.parseInt(entry.getKey());
|
||||||
final String color = normalizeHtmlColor(entry.getValue().asText(null));
|
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);
|
materialIndices.put(index, color);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException ignored) {
|
} catch (NumberFormatException ignored) {
|
||||||
@ -197,7 +197,7 @@ final class PackerGlyphMaterialSupport {
|
|||||||
if (materialIndices.isEmpty()
|
if (materialIndices.isEmpty()
|
||||||
|| materialIndices.size() != materialIndicesNode.size()
|
|| materialIndices.size() != materialIndicesNode.size()
|
||||||
|| !denseIndices(materialIndices.keySet())) {
|
|| !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();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
if (!(schemaNode.path("artifact_bindings") instanceof ArrayNode bindingsNode) || bindingsNode.isEmpty()) {
|
if (!(schemaNode.path("artifact_bindings") instanceof ArrayNode bindingsNode) || bindingsNode.isEmpty()) {
|
||||||
@ -242,7 +242,7 @@ final class PackerGlyphMaterialSupport {
|
|||||||
for (JsonNode colorNode : colorsNode) {
|
for (JsonNode colorNode : colorsNode) {
|
||||||
final String color = normalizeHtmlColor(colorNode.asText(null));
|
final String color = normalizeHtmlColor(colorNode.asText(null));
|
||||||
if (color == 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();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
colors.add(color);
|
colors.add(color);
|
||||||
@ -260,7 +260,7 @@ final class PackerGlyphMaterialSupport {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean denseIndices(Set<Integer> indices) {
|
private boolean denseIndices(Set<Integer> indices) {
|
||||||
int expected = 1;
|
int expected = 0;
|
||||||
for (Integer index : new TreeSet<>(indices)) {
|
for (Integer index : new TreeSet<>(indices)) {
|
||||||
if (index == null || index != expected) {
|
if (index == null || index != expected) {
|
||||||
return false;
|
return false;
|
||||||
@ -275,7 +275,7 @@ final class PackerGlyphMaterialSupport {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final String normalized = value.trim().toUpperCase();
|
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(
|
private record GlyphMaterialFile(
|
||||||
|
|||||||
@ -385,8 +385,8 @@ final class FileSystemPackerWorkspaceServiceTest {
|
|||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"material_indices": {
|
"material_indices": {
|
||||||
"1": "#00FF00",
|
"0": "#00FF00",
|
||||||
"2": "#FF0000"
|
"1": "#FF0000"
|
||||||
},
|
},
|
||||||
"artifact_bindings": [
|
"artifact_bindings": [
|
||||||
{
|
{
|
||||||
@ -1022,7 +1022,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
|||||||
"schema_id": "schema-1",
|
"schema_id": "schema-1",
|
||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"material_indices": { "1": "#FF0000" },
|
"material_indices": { "0": "#FF0000" },
|
||||||
"artifact_bindings": [
|
"artifact_bindings": [
|
||||||
{ "artifact_id": "%s", "fingerprint": "%s" }
|
{ "artifact_id": "%s", "fingerprint": "%s" }
|
||||||
]
|
]
|
||||||
@ -1079,7 +1079,7 @@ final class FileSystemPackerWorkspaceServiceTest {
|
|||||||
"schema_id": "schema-1",
|
"schema_id": "schema-1",
|
||||||
"status": "ok",
|
"status": "ok",
|
||||||
"version": 1,
|
"version": 1,
|
||||||
"material_indices": { "1": "#FF0000" },
|
"material_indices": { "0": "#FF0000" },
|
||||||
"artifact_bindings": [
|
"artifact_bindings": [
|
||||||
{ "artifact_id": "%s", "fingerprint": "%s" }
|
{ "artifact_id": "%s", "fingerprint": "%s" }
|
||||||
]
|
]
|
||||||
|
|||||||
@ -337,12 +337,12 @@ public final class AssetDetailsPaletteOverhaulingCoordinator {
|
|||||||
final List<Integer> argb = record.colors().stream()
|
final List<Integer> argb = record.colors().stream()
|
||||||
.map(AssetDetailsPaletteOverhaulingCoordinator::htmlToArgb8888)
|
.map(AssetDetailsPaletteOverhaulingCoordinator::htmlToArgb8888)
|
||||||
.toList();
|
.toList();
|
||||||
final List<Integer> rgb565 = record.colors().stream()
|
final List<Integer> rgba = record.colors().stream()
|
||||||
.map(AssetDetailsPaletteOverhaulingCoordinator::htmlToRgb565)
|
.map(AssetDetailsPaletteOverhaulingCoordinator::htmlToRgba8888)
|
||||||
.toList();
|
.toList();
|
||||||
final Map<String, Object> palette = Map.of(
|
final Map<String, Object> palette = Map.of(
|
||||||
"originalArgb8888", argb,
|
"originalArgb8888", argb,
|
||||||
"convertedRgb565", rgb565);
|
"rgba8888", rgba);
|
||||||
final Map<String, Object> metadata = new LinkedHashMap<>();
|
final Map<String, Object> metadata = new LinkedHashMap<>();
|
||||||
metadata.put("palette", palette);
|
metadata.put("palette", palette);
|
||||||
metadata.put("paletteId", record.paletteId());
|
metadata.put("paletteId", record.paletteId());
|
||||||
@ -452,7 +452,7 @@ public final class AssetDetailsPaletteOverhaulingCoordinator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static ColorSample toColorSample(String htmlColor) {
|
private static ColorSample toColorSample(String htmlColor) {
|
||||||
final int rgb = Integer.parseInt(normalizeHtmlColor(htmlColor).substring(1), 16);
|
final int rgb = Integer.parseInt(normalizeHtmlColor(htmlColor).substring(1, 7), 16);
|
||||||
final double red = ((rgb >> 16) & 0xFF) / 255.0;
|
final double red = ((rgb >> 16) & 0xFF) / 255.0;
|
||||||
final double green = ((rgb >> 8) & 0xFF) / 255.0;
|
final double green = ((rgb >> 8) & 0xFF) / 255.0;
|
||||||
final double blue = (rgb & 0xFF) / 255.0;
|
final double blue = (rgb & 0xFF) / 255.0;
|
||||||
@ -504,25 +504,38 @@ public final class AssetDetailsPaletteOverhaulingCoordinator {
|
|||||||
if (left == null || right == null) {
|
if (left == null || right == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return Objects.equals(left.get("originalArgb8888"), right.get("originalArgb8888"))
|
final Object leftRgba = left.get("rgba8888");
|
||||||
&& Objects.equals(left.get("convertedRgb565"), right.get("convertedRgb565"));
|
final Object rightRgba = right.get("rgba8888");
|
||||||
|
if (leftRgba != null || rightRgba != null) {
|
||||||
|
return Objects.equals(leftRgba, rightRgba);
|
||||||
|
}
|
||||||
|
return Objects.equals(left.get("originalArgb8888"), right.get("originalArgb8888"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int htmlToArgb8888(String htmlColor) {
|
private static int htmlToArgb8888(String htmlColor) {
|
||||||
final int rgb = Integer.parseInt(normalizeHtmlColor(htmlColor).substring(1), 16);
|
final String normalized = normalizeHtmlColor(htmlColor);
|
||||||
return 0xFF000000 | rgb;
|
final int rgb = Integer.parseInt(normalized.substring(1, 7), 16);
|
||||||
|
final int alpha = normalized.length() == 9
|
||||||
|
? Integer.parseInt(normalized.substring(7, 9), 16)
|
||||||
|
: 0xFF;
|
||||||
|
return (alpha << 24) | rgb;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int htmlToRgb565(String htmlColor) {
|
private static int htmlToRgba8888(String htmlColor) {
|
||||||
final int rgb = Integer.parseInt(normalizeHtmlColor(htmlColor).substring(1), 16);
|
final String normalized = normalizeHtmlColor(htmlColor);
|
||||||
final int red = (rgb >> 16) & 0xFF;
|
final int rgb = Integer.parseInt(normalized.substring(1, 7), 16);
|
||||||
final int green = (rgb >> 8) & 0xFF;
|
final int alpha = normalized.length() == 9
|
||||||
final int blue = rgb & 0xFF;
|
? Integer.parseInt(normalized.substring(7, 9), 16)
|
||||||
return ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
|
: 0xFF;
|
||||||
|
return (rgb << 8) | alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String normalizeHtmlColor(String color) {
|
private static String normalizeHtmlColor(String color) {
|
||||||
return Objects.requireNonNull(color, "color").trim().toUpperCase();
|
final String normalized = Objects.requireNonNull(color, "color").trim().toUpperCase();
|
||||||
|
if (!normalized.matches("^#[0-9A-F]{6}([0-9A-F]{2})?$")) {
|
||||||
|
throw new IllegalArgumentException("color must use #RRGGBB or #RRGGBBAA format");
|
||||||
|
}
|
||||||
|
return normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AssetWorkspaceBankCompositionFile fileByPath(List<AssetWorkspaceBankCompositionFile> files, String path) {
|
private static AssetWorkspaceBankCompositionFile fileByPath(List<AssetWorkspaceBankCompositionFile> files, String path) {
|
||||||
|
|||||||
@ -45,7 +45,7 @@ public final class AssetDetailsPaletteOverhaulingDualListView extends StudioDual
|
|||||||
final HBox strip = new HBox(0);
|
final HBox strip = new HBox(0);
|
||||||
strip.getStyleClass().add("assets-details-palette-strip");
|
strip.getStyleClass().add("assets-details-palette-strip");
|
||||||
final List<Integer> colors = paletteDisplayColors(item.metadata());
|
final List<Integer> colors = paletteDisplayColors(item.metadata());
|
||||||
for (int index = 0; index < 15; index++) {
|
for (int index = 0; index < 16; index++) {
|
||||||
final Region swatch = new Region();
|
final Region swatch = new Region();
|
||||||
swatch.getStyleClass().add("assets-details-palette-swatch");
|
swatch.getStyleClass().add("assets-details-palette-swatch");
|
||||||
swatch.setMinSize(12.0d, 18.0d);
|
swatch.setMinSize(12.0d, 18.0d);
|
||||||
@ -63,10 +63,10 @@ public final class AssetDetailsPaletteOverhaulingDualListView extends StudioDual
|
|||||||
if (!(paletteValue instanceof Map<?, ?> palette)) {
|
if (!(paletteValue instanceof Map<?, ?> palette)) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
final Object convertedValue = palette.get("convertedRgb565");
|
final Object convertedValue = palette.get("rgba8888");
|
||||||
if (convertedValue instanceof List<?> converted) {
|
if (convertedValue instanceof List<?> converted) {
|
||||||
return ((List<Integer>) converted).stream()
|
return ((List<Integer>) converted).stream()
|
||||||
.map(this::rgb565ToArgb8888)
|
.map(this::rgba8888ToArgb8888)
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
return List.of();
|
return List.of();
|
||||||
@ -91,14 +91,15 @@ public final class AssetDetailsPaletteOverhaulingDualListView extends StudioDual
|
|||||||
return String.format("#%02X%02X%02X", red, green, blue);
|
return String.format("#%02X%02X%02X", red, green, blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int rgb565ToArgb8888(Integer rgb565) {
|
private int rgba8888ToArgb8888(Integer rgba8888) {
|
||||||
if (rgb565 == null) {
|
if (rgba8888 == null) {
|
||||||
return 0x00000000;
|
return 0x00000000;
|
||||||
}
|
}
|
||||||
final int value = rgb565 & 0xFFFF;
|
final int value = rgba8888;
|
||||||
final int red = ((value >> 11) & 0x1F) * 255 / 31;
|
final int red = (value >>> 24) & 0xFF;
|
||||||
final int green = ((value >> 5) & 0x3F) * 255 / 63;
|
final int green = (value >>> 16) & 0xFF;
|
||||||
final int blue = (value & 0x1F) * 255 / 31;
|
final int blue = (value >>> 8) & 0xFF;
|
||||||
return 0xFF000000 | (red << 16) | (green << 8) | blue;
|
final int alpha = value & 0xFF;
|
||||||
|
return (alpha << 24) | (red << 16) | (green << 8) | blue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,7 +88,7 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
paletteStrip.setMinWidth(PREVIEW_FRAME_SIZE);
|
paletteStrip.setMinWidth(PREVIEW_FRAME_SIZE);
|
||||||
paletteStrip.setPrefWidth(PREVIEW_FRAME_SIZE);
|
paletteStrip.setPrefWidth(PREVIEW_FRAME_SIZE);
|
||||||
paletteStrip.setMaxWidth(PREVIEW_FRAME_SIZE);
|
paletteStrip.setMaxWidth(PREVIEW_FRAME_SIZE);
|
||||||
for (int index = 0; index < 15; index++) {
|
for (int index = 0; index < 16; index++) {
|
||||||
final Region swatch = new Region();
|
final Region swatch = new Region();
|
||||||
swatch.getStyleClass().add("assets-details-palette-preview-swatch");
|
swatch.getStyleClass().add("assets-details-palette-preview-swatch");
|
||||||
swatch.setMinSize(16.0d, 26.0d);
|
swatch.setMinSize(16.0d, 26.0d);
|
||||||
@ -199,10 +199,10 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
if (palette == null) {
|
if (palette == null) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
final Object converted = palette.get("convertedRgb565");
|
final Object converted = palette.get("rgba8888");
|
||||||
if (converted instanceof List<?> list) {
|
if (converted instanceof List<?> list) {
|
||||||
return ((List<Integer>) list).stream()
|
return ((List<Integer>) list).stream()
|
||||||
.map(this::rgb565ToArgb8888)
|
.map(this::rgba8888ToArgb8888)
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
return List.of();
|
return List.of();
|
||||||
@ -214,6 +214,12 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
if (palette == null) {
|
if (palette == null) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
|
final Object rgba = palette.get("rgba8888");
|
||||||
|
if (rgba instanceof List<?> list) {
|
||||||
|
return ((List<Integer>) list).stream()
|
||||||
|
.map(this::rgba8888ToArgb8888)
|
||||||
|
.toList();
|
||||||
|
}
|
||||||
final Object original = palette.get("originalArgb8888");
|
final Object original = palette.get("originalArgb8888");
|
||||||
if (original instanceof List<?> list) {
|
if (original instanceof List<?> list) {
|
||||||
return (List<Integer>) list;
|
return (List<Integer>) list;
|
||||||
@ -229,7 +235,7 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
final Map<String, Integer> indicesByColor = new java.util.LinkedHashMap<>();
|
final Map<String, Integer> indicesByColor = new java.util.LinkedHashMap<>();
|
||||||
for (Map.Entry<?, ?> entry : map.entrySet()) {
|
for (Map.Entry<?, ?> entry : map.entrySet()) {
|
||||||
final Integer index = asInteger(entry.getKey());
|
final Integer index = asInteger(entry.getKey());
|
||||||
if (index == null || index <= 0 || !(entry.getValue() instanceof String color) || color.isBlank()) {
|
if (index == null || index < 0 || !(entry.getValue() instanceof String color) || color.isBlank()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
indicesByColor.put(color.trim().toUpperCase(), index);
|
indicesByColor.put(color.trim().toUpperCase(), index);
|
||||||
@ -245,21 +251,20 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int paletteIndexToArgb(List<Integer> colors, int paletteIndex) {
|
private int paletteIndexToArgb(List<Integer> colors, int paletteIndex) {
|
||||||
if (paletteIndex <= 0) {
|
if (paletteIndex < 0) {
|
||||||
return 0x00000000;
|
return 0x00000000;
|
||||||
}
|
}
|
||||||
return colorAt(colors, paletteIndex - 1);
|
return colorAt(colors, paletteIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int schemaPaletteIndex(int tilePaletteIndex, List<Integer> sourceColors, Map<String, Integer> schemaIndicesByColor) {
|
private int schemaPaletteIndex(int tilePaletteIndex, List<Integer> sourceColors, Map<String, Integer> schemaIndicesByColor) {
|
||||||
if (tilePaletteIndex <= 0 || sourceColors.isEmpty() || schemaIndicesByColor.isEmpty()) {
|
if (tilePaletteIndex < 0 || sourceColors.isEmpty() || schemaIndicesByColor.isEmpty()) {
|
||||||
return tilePaletteIndex;
|
return tilePaletteIndex;
|
||||||
}
|
}
|
||||||
final int sourceColorIndex = tilePaletteIndex - 1;
|
if (tilePaletteIndex >= sourceColors.size()) {
|
||||||
if (sourceColorIndex < 0 || sourceColorIndex >= sourceColors.size()) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return schemaIndicesByColor.getOrDefault(cssColor(sourceColors.get(sourceColorIndex)), 0);
|
return schemaIndicesByColor.getOrDefault(materialColorKey(sourceColors.get(tilePaletteIndex)), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int colorAt(List<Integer> colors, int index) {
|
private int colorAt(List<Integer> colors, int index) {
|
||||||
@ -281,6 +286,16 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
return String.format("#%02X%02X%02X", red, green, blue);
|
return String.format("#%02X%02X%02X", red, green, blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String materialColorKey(int argb) {
|
||||||
|
final int alpha = (argb >>> 24) & 0xFF;
|
||||||
|
final int red = (argb >>> 16) & 0xFF;
|
||||||
|
final int green = (argb >>> 8) & 0xFF;
|
||||||
|
final int blue = argb & 0xFF;
|
||||||
|
return alpha == 0xFF
|
||||||
|
? String.format("#%02X%02X%02X", red, green, blue)
|
||||||
|
: String.format("#%02X%02X%02X%02X", red, green, blue, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
private javafx.scene.paint.Color toFxColor(int argb) {
|
private javafx.scene.paint.Color toFxColor(int argb) {
|
||||||
final int alpha = (argb >>> 24) & 0xFF;
|
final int alpha = (argb >>> 24) & 0xFF;
|
||||||
if (alpha == 0) {
|
if (alpha == 0) {
|
||||||
@ -292,14 +307,15 @@ public final class AssetDetailsPaletteOverhaulingPreviewPane extends VBox {
|
|||||||
return javafx.scene.paint.Color.rgb(red, green, blue, alpha / 255.0d);
|
return javafx.scene.paint.Color.rgb(red, green, blue, alpha / 255.0d);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int rgb565ToArgb8888(Integer rgb565) {
|
private int rgba8888ToArgb8888(Integer rgba8888) {
|
||||||
if (rgb565 == null) {
|
if (rgba8888 == null) {
|
||||||
return 0x00000000;
|
return 0x00000000;
|
||||||
}
|
}
|
||||||
final int value = rgb565 & 0xFFFF;
|
final int value = rgba8888;
|
||||||
final int red = ((value >> 11) & 0x1F) * 255 / 31;
|
final int red = (value >>> 24) & 0xFF;
|
||||||
final int green = ((value >> 5) & 0x3F) * 255 / 63;
|
final int green = (value >>> 16) & 0xFF;
|
||||||
final int blue = (value & 0x1F) * 255 / 31;
|
final int blue = (value >>> 8) & 0xFF;
|
||||||
return 0xFF000000 | (red << 16) | (green << 8) | blue;
|
final int alpha = value & 0xFF;
|
||||||
|
return (alpha << 24) | (red << 16) | (green << 8) | blue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -239,7 +239,7 @@ public final class AssetDetailsPaletteWizardDialog {
|
|||||||
editableStrip.getChildren().setAll(editableColors.stream().map(this::swatch).toList());
|
editableStrip.getChildren().setAll(editableColors.stream().map(this::swatch).toList());
|
||||||
nameField.setPromptText(AssetDetailsPaletteOverhaulingCoordinator.generatedDisplayName(editableColors));
|
nameField.setPromptText(AssetDetailsPaletteOverhaulingCoordinator.generatedDisplayName(editableColors));
|
||||||
indexItems.setAll(java.util.stream.IntStream.range(0, editableColors.size())
|
indexItems.setAll(java.util.stream.IntStream.range(0, editableColors.size())
|
||||||
.mapToObj(index -> (index + 1) + " -> " + editableColors.get(index))
|
.mapToObj(index -> index + " -> " + editableColors.get(index))
|
||||||
.toList());
|
.toList());
|
||||||
final boolean duplicate = schema != null && coordinator.duplicatePaletteExists(paletteId, schema.schemaId(), editableColors);
|
final boolean duplicate = schema != null && coordinator.duplicatePaletteExists(paletteId, schema.schemaId(), editableColors);
|
||||||
summaryLabel.setText(duplicate
|
summaryLabel.setText(duplicate
|
||||||
|
|||||||
@ -164,7 +164,7 @@ public final class AssetDetailsColorSchemaCoordinator {
|
|||||||
List<String> orderedColors) {
|
List<String> orderedColors) {
|
||||||
final Map<Integer, String> materialIndices = new LinkedHashMap<>();
|
final Map<Integer, String> materialIndices = new LinkedHashMap<>();
|
||||||
for (int index = 0; index < orderedColors.size(); index += 1) {
|
for (int index = 0; index < orderedColors.size(); index += 1) {
|
||||||
materialIndices.put(index + 1, normalizeHtmlColor(orderedColors.get(index)));
|
materialIndices.put(index, normalizeHtmlColor(orderedColors.get(index)));
|
||||||
}
|
}
|
||||||
final List<AssetStudioGlyphMaterialArtifactBinding> bindings = assignedTiles.stream()
|
final List<AssetStudioGlyphMaterialArtifactBinding> bindings = assignedTiles.stream()
|
||||||
.map(file -> new AssetStudioGlyphMaterialArtifactBinding(artifactId(file), fingerprint(file)))
|
.map(file -> new AssetStudioGlyphMaterialArtifactBinding(artifactId(file), fingerprint(file)))
|
||||||
@ -217,20 +217,44 @@ public final class AssetDetailsColorSchemaCoordinator {
|
|||||||
if (palette == null) {
|
if (palette == null) {
|
||||||
return List.of();
|
return List.of();
|
||||||
}
|
}
|
||||||
final Object originalColors = palette.get("originalArgb8888");
|
|
||||||
if (!(originalColors instanceof Iterable<?> iterable)) {
|
|
||||||
return List.of();
|
|
||||||
}
|
|
||||||
final List<String> colors = new ArrayList<>();
|
final List<String> colors = new ArrayList<>();
|
||||||
for (Object item : iterable) {
|
final Object rgbaColors = palette.get("rgba8888");
|
||||||
if (!(item instanceof Number number)) {
|
if (rgbaColors instanceof Iterable<?> rgbaIterable) {
|
||||||
continue;
|
for (Object item : rgbaIterable) {
|
||||||
|
if (!(item instanceof Number number)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
final int value = number.intValue();
|
||||||
|
final int alpha = value & 0xFF;
|
||||||
|
colors.add(alpha == 0xFF
|
||||||
|
? String.format(
|
||||||
|
"#%02X%02X%02X",
|
||||||
|
(value >>> 24) & 0xFF,
|
||||||
|
(value >>> 16) & 0xFF,
|
||||||
|
(value >>> 8) & 0xFF)
|
||||||
|
: String.format(
|
||||||
|
"#%02X%02X%02X%02X",
|
||||||
|
(value >>> 24) & 0xFF,
|
||||||
|
(value >>> 16) & 0xFF,
|
||||||
|
(value >>> 8) & 0xFF,
|
||||||
|
alpha));
|
||||||
|
}
|
||||||
|
if (!colors.isEmpty()) {
|
||||||
|
return List.copyOf(colors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final Object originalColors = palette.get("originalArgb8888");
|
||||||
|
if (originalColors instanceof Iterable<?> argbIterable) {
|
||||||
|
for (Object item : argbIterable) {
|
||||||
|
if (!(item instanceof Number number)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
colors.add(String.format(
|
||||||
|
"#%02X%02X%02X",
|
||||||
|
(number.intValue() >> 16) & 0xFF,
|
||||||
|
(number.intValue() >> 8) & 0xFF,
|
||||||
|
number.intValue() & 0xFF));
|
||||||
}
|
}
|
||||||
colors.add(String.format(
|
|
||||||
"#%02X%02X%02X",
|
|
||||||
(number.intValue() >> 16) & 0xFF,
|
|
||||||
(number.intValue() >> 8) & 0xFF,
|
|
||||||
number.intValue() & 0xFF));
|
|
||||||
}
|
}
|
||||||
return List.copyOf(colors);
|
return List.copyOf(colors);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -193,7 +193,7 @@ public final class AssetDetailsColorSchemaGroupsControl extends StudioFormSectio
|
|||||||
workspaceBus.publish(new StudioAssetLogEvent("color-schema-groups", "Apply failed: schema must contain at least one tile."));
|
workspaceBus.publish(new StudioAssetLogEvent("color-schema-groups", "Apply failed: schema must contain at least one tile."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (orderedColors.size() > 15) {
|
if (orderedColors.size() > 16) {
|
||||||
workspaceBus.publish(new StudioAssetLogEvent(
|
workspaceBus.publish(new StudioAssetLogEvent(
|
||||||
"color-schema-groups",
|
"color-schema-groups",
|
||||||
Container.i18n().text(I18n.ASSETS_COLOR_SCHEMA_DIALOG_TOO_MANY_COLORS)));
|
Container.i18n().text(I18n.ASSETS_COLOR_SCHEMA_DIALOG_TOO_MANY_COLORS)));
|
||||||
@ -326,7 +326,7 @@ public final class AssetDetailsColorSchemaGroupsControl extends StudioFormSectio
|
|||||||
final List<String> orderedColors = draft.orderedColors();
|
final List<String> orderedColors = draft.orderedColors();
|
||||||
schemaTitleLabel.setText(draft.schemaId() + (draft.existingSchema() ? "" : " (new)"));
|
schemaTitleLabel.setText(draft.schemaId() + (draft.existingSchema() ? "" : " (new)"));
|
||||||
paletteCounterLabel.setText(Container.i18n().format(I18n.ASSETS_COLOR_SCHEMA_DIALOG_COLOR_COUNT, orderedColors.size()));
|
paletteCounterLabel.setText(Container.i18n().format(I18n.ASSETS_COLOR_SCHEMA_DIALOG_COLOR_COUNT, orderedColors.size()));
|
||||||
warningLabel.setText(orderedColors.size() > 15
|
warningLabel.setText(orderedColors.size() > 16
|
||||||
? Container.i18n().text(I18n.ASSETS_COLOR_SCHEMA_DIALOG_TOO_MANY_COLORS)
|
? Container.i18n().text(I18n.ASSETS_COLOR_SCHEMA_DIALOG_TOO_MANY_COLORS)
|
||||||
: "");
|
: "");
|
||||||
paletteStrip.getChildren().setAll(orderedColors.stream().map(this::swatch).toList());
|
paletteStrip.getChildren().setAll(orderedColors.stream().map(this::swatch).toList());
|
||||||
|
|||||||
@ -31,23 +31,26 @@ public record AssetStudioGlyphMaterialPalette(
|
|||||||
colors = List.copyOf(Objects.requireNonNull(colors, "colors"));
|
colors = List.copyOf(Objects.requireNonNull(colors, "colors"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Integer> convertedRgb565Colors() {
|
public List<Integer> convertedRgba8888Colors() {
|
||||||
final List<Integer> converted = new ArrayList<>(colors.size());
|
final List<Integer> converted = new ArrayList<>(colors.size());
|
||||||
for (String color : colors) {
|
for (String color : colors) {
|
||||||
converted.add(convertHtmlRgbToRgb565(color));
|
converted.add(convertHtmlRgbToRgba8888(color));
|
||||||
}
|
}
|
||||||
return List.copyOf(converted);
|
return List.copyOf(converted);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int convertHtmlRgbToRgb565(String htmlRgb) {
|
static int convertHtmlRgbToRgba8888(String htmlRgb) {
|
||||||
final String value = Objects.requireNonNull(htmlRgb, "htmlRgb").trim();
|
final String value = Objects.requireNonNull(htmlRgb, "htmlRgb").trim();
|
||||||
if (!value.matches("^#[0-9A-Fa-f]{6}$")) {
|
|
||||||
throw new IllegalArgumentException("htmlRgb must use #RRGGBB format");
|
if (!value.matches("^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$")) {
|
||||||
|
throw new IllegalArgumentException("htmlRgb must use #RRGGBB or #RRGGBBAA format");
|
||||||
}
|
}
|
||||||
|
|
||||||
final int rgb = Integer.parseInt(value.substring(1), 16);
|
final int rgb = Integer.parseInt(value.substring(1), 16);
|
||||||
final int red = (rgb >> 16) & 0xFF;
|
if (value.length() == 9) {
|
||||||
final int green = (rgb >> 8) & 0xFF;
|
return rgb;
|
||||||
final int blue = rgb & 0xFF;
|
}
|
||||||
return ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
|
|
||||||
|
return (rgb << 8) | 0xFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -242,7 +242,7 @@ public final class AssetStudioMetadataService {
|
|||||||
try {
|
try {
|
||||||
final int index = Integer.parseInt(entry.getKey());
|
final int index = Integer.parseInt(entry.getKey());
|
||||||
final String color = normalizeHtmlColor(entry.getValue().asText(null));
|
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);
|
materialIndices.put(index, color);
|
||||||
}
|
}
|
||||||
} catch (NumberFormatException ignored) {
|
} catch (NumberFormatException ignored) {
|
||||||
@ -302,7 +302,7 @@ public final class AssetStudioMetadataService {
|
|||||||
if (indices.isEmpty()) {
|
if (indices.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int expected = 1;
|
int expected = 0;
|
||||||
for (Integer index : new java.util.TreeSet<>(indices)) {
|
for (Integer index : new java.util.TreeSet<>(indices)) {
|
||||||
if (index == null || index != expected) {
|
if (index == null || index != expected) {
|
||||||
return false;
|
return false;
|
||||||
@ -317,7 +317,7 @@ public final class AssetStudioMetadataService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
final String normalized = value.trim().toUpperCase();
|
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 AssetStudioSceneBankMetadata defaultSceneBankMetadata(Path supportFile) {
|
private AssetStudioSceneBankMetadata defaultSceneBankMetadata(Path supportFile) {
|
||||||
|
|||||||
@ -250,7 +250,7 @@ assets.colorSchema.removeBlocked=Schema {0} cannot be removed while palettes sti
|
|||||||
assets.colorSchema.dialog.availableTiles=Available Tiles
|
assets.colorSchema.dialog.availableTiles=Available Tiles
|
||||||
assets.colorSchema.dialog.assignedTiles=Assigned Tiles
|
assets.colorSchema.dialog.assignedTiles=Assigned Tiles
|
||||||
assets.colorSchema.dialog.colorCount=Color count: {0}
|
assets.colorSchema.dialog.colorCount=Color count: {0}
|
||||||
assets.colorSchema.dialog.tooManyColors=Color Schema Groups support at most 15 visible indices.
|
assets.colorSchema.dialog.tooManyColors=Color Schema Groups support at most 16 visible indices.
|
||||||
assets.details.codecConfiguration.empty=This codec does not expose configuration fields yet.
|
assets.details.codecConfiguration.empty=This codec does not expose configuration fields yet.
|
||||||
assets.details.metadata.empty=This asset does not expose metadata fields yet.
|
assets.details.metadata.empty=This asset does not expose metadata fields yet.
|
||||||
assets.addWizard.title=Add Asset
|
assets.addWizard.title=Add Asset
|
||||||
|
|||||||
@ -37,7 +37,7 @@ final class AssetDetailsPaletteOverhaulingCoordinatorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void initialSelectionStillMatchesBuildFacingPipelinePalettePayload() {
|
void initialSelectionMatchesPersistedPackerPipelinePalettePayload() {
|
||||||
final AssetDetailsPaletteOverhaulingCoordinator coordinator = new AssetDetailsPaletteOverhaulingCoordinator();
|
final AssetDetailsPaletteOverhaulingCoordinator coordinator = new AssetDetailsPaletteOverhaulingCoordinator();
|
||||||
final AssetStudioGlyphMaterialPalette persisted = new AssetStudioGlyphMaterialPalette(
|
final AssetStudioGlyphMaterialPalette persisted = new AssetStudioGlyphMaterialPalette(
|
||||||
"palette-1",
|
"palette-1",
|
||||||
@ -56,8 +56,8 @@ final class AssetDetailsPaletteOverhaulingCoordinatorTest {
|
|||||||
List.of(persisted),
|
List.of(persisted),
|
||||||
null),
|
null),
|
||||||
List.of(Map.of(
|
List.of(Map.of(
|
||||||
"originalArgb8888", List.of(0xFFFF0000, 0xFF00FF00),
|
"index", 0,
|
||||||
"convertedRgb565", List.of(0xF800, 0x07E0)))));
|
"rgba8888", List.of(0xFF0000FF, 0x00FF00FF)))));
|
||||||
|
|
||||||
assertEquals(1, coordinator.viewModel().selectedFiles().size());
|
assertEquals(1, coordinator.viewModel().selectedFiles().size());
|
||||||
assertEquals("palette-1", coordinator.viewModel().selectedFiles().getFirst().metadata().get("paletteId"));
|
assertEquals("palette-1", coordinator.viewModel().selectedFiles().getFirst().metadata().get("paletteId"));
|
||||||
@ -283,7 +283,7 @@ final class AssetDetailsPaletteOverhaulingCoordinatorTest {
|
|||||||
null),
|
null),
|
||||||
List.of(Map.of(
|
List.of(Map.of(
|
||||||
"originalArgb8888", List.of(0xFF112233, 0xFF445566),
|
"originalArgb8888", List.of(0xFF112233, 0xFF445566),
|
||||||
"convertedRgb565", List.of(0x1106, 0x42AC)))));
|
"rgba8888", List.of(0x112233FF, 0x445566FF)))));
|
||||||
|
|
||||||
final AssetStudioGlyphMaterialMetadata metadata = coordinator.removePalette("palette-1");
|
final AssetStudioGlyphMaterialMetadata metadata = coordinator.removePalette("palette-1");
|
||||||
|
|
||||||
@ -440,6 +440,6 @@ final class AssetDetailsPaletteOverhaulingCoordinatorTest {
|
|||||||
"paletteIndices", List.of(0, 1, 2, 0)),
|
"paletteIndices", List.of(0, 1, 2, 0)),
|
||||||
"palette", Map.of(
|
"palette", Map.of(
|
||||||
"originalArgb8888", List.of(0xFFFF0000, 0xFF00FF00),
|
"originalArgb8888", List.of(0xFFFF0000, 0xFF00FF00),
|
||||||
"convertedRgb565", List.of(0xF800, 0x07E0))));
|
"rgba8888", List.of(0xFF0000FF, 0x00FF00FF))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,6 +47,22 @@ final class AssetDetailsColorSchemaCoordinatorTest {
|
|||||||
assertEquals(List.of(), AssetDetailsColorSchemaCoordinator.tileColors(tile));
|
assertEquals(List.of(), AssetDetailsColorSchemaCoordinator.tileColors(tile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void tileColorsPreserveRgbaAlphaWhenAvailable() {
|
||||||
|
final AssetWorkspaceBankCompositionFile tile = new AssetWorkspaceBankCompositionFile(
|
||||||
|
"a.png",
|
||||||
|
"a.png",
|
||||||
|
64L,
|
||||||
|
1L,
|
||||||
|
"fp-a",
|
||||||
|
Map.of(
|
||||||
|
"artifactId", "artifact-a",
|
||||||
|
"tile", Map.of("width", 8, "height", 8, "paletteIndices", List.of(0, 1)),
|
||||||
|
"palette", Map.of("rgba8888", List.of(0x00000000, 0xFF0000FF))));
|
||||||
|
|
||||||
|
assertEquals(List.of("#00000000", "#FF0000"), AssetDetailsColorSchemaCoordinator.tileColors(tile));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void createFlowUsesSelectedFingerprintWhenCurrentFileFingerprintIsMissing() {
|
void createFlowUsesSelectedFingerprintWhenCurrentFileFingerprintIsMissing() {
|
||||||
final AssetDetailsColorSchemaCoordinator coordinator = new AssetDetailsColorSchemaCoordinator();
|
final AssetDetailsColorSchemaCoordinator coordinator = new AssetDetailsColorSchemaCoordinator();
|
||||||
@ -95,7 +111,7 @@ final class AssetDetailsColorSchemaCoordinatorTest {
|
|||||||
|
|
||||||
final AssetStudioGlyphMaterialSchema schema = updated.schemas().getFirst();
|
final AssetStudioGlyphMaterialSchema schema = updated.schemas().getFirst();
|
||||||
assertEquals(2, schema.version());
|
assertEquals(2, schema.version());
|
||||||
assertEquals(Map.of(1, "#FF0000", 2, "#00FF00"), schema.materialIndices());
|
assertEquals(Map.of(0, "#FF0000", 1, "#00FF00"), schema.materialIndices());
|
||||||
assertEquals(List.of("artifact-a", "artifact-b"), schema.artifactBindings().stream().map(AssetStudioGlyphMaterialArtifactBinding::artifactId).toList());
|
assertEquals(List.of("artifact-a", "artifact-b"), schema.artifactBindings().stream().map(AssetStudioGlyphMaterialArtifactBinding::artifactId).toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +220,7 @@ final class AssetDetailsColorSchemaCoordinatorTest {
|
|||||||
Map.of(
|
Map.of(
|
||||||
"artifactId", artifactId,
|
"artifactId", artifactId,
|
||||||
"tile", Map.of("width", 8, "height", 8, "paletteIndices", List.of(1, 1, 1)),
|
"tile", Map.of("width", 8, "height", 8, "paletteIndices", List.of(1, 1, 1)),
|
||||||
"palette", Map.of("originalArgb8888", argb, "convertedRgb565", List.of())));
|
"palette", Map.of("originalArgb8888", argb, "rgba8888", List.of())));
|
||||||
}
|
}
|
||||||
|
|
||||||
private AssetWorkspaceBankCompositionFile selectedArtifactOnly(String path, String artifactId, String fingerprint) {
|
private AssetWorkspaceBankCompositionFile selectedArtifactOnly(String path, String artifactId, String fingerprint) {
|
||||||
|
|||||||
@ -51,7 +51,7 @@ final class AssetStudioMetadataServiceTest {
|
|||||||
"schema-1",
|
"schema-1",
|
||||||
AssetStudioGlyphMaterialSchemaStatus.OK,
|
AssetStudioGlyphMaterialSchemaStatus.OK,
|
||||||
2,
|
2,
|
||||||
Map.of(1, "#8B4513", 2, "#00AA00"),
|
Map.of(0, "#8B4513", 1, "#00AA0000"),
|
||||||
List.of(
|
List.of(
|
||||||
new AssetStudioGlyphMaterialArtifactBinding("artifact-1", "fp-1"),
|
new AssetStudioGlyphMaterialArtifactBinding("artifact-1", "fp-1"),
|
||||||
new AssetStudioGlyphMaterialArtifactBinding("artifact-2", "fp-2")))),
|
new AssetStudioGlyphMaterialArtifactBinding("artifact-2", "fp-2")))),
|
||||||
@ -60,7 +60,7 @@ final class AssetStudioMetadataServiceTest {
|
|||||||
"Forest",
|
"Forest",
|
||||||
"schema-1",
|
"schema-1",
|
||||||
2,
|
2,
|
||||||
List.of("#8B4513", "#00AA00"))),
|
List.of("#8B4513", "#00AA0000"))),
|
||||||
null);
|
null);
|
||||||
service.writeGlyphMaterialMetadata(assetRoot, metadata);
|
service.writeGlyphMaterialMetadata(assetRoot, metadata);
|
||||||
|
|
||||||
@ -69,22 +69,22 @@ final class AssetStudioMetadataServiceTest {
|
|||||||
assertNotNull(snapshot.glyphMaterialMetadata());
|
assertNotNull(snapshot.glyphMaterialMetadata());
|
||||||
assertEquals(1, snapshot.glyphMaterialMetadata().schemas().size());
|
assertEquals(1, snapshot.glyphMaterialMetadata().schemas().size());
|
||||||
assertEquals("schema-1", snapshot.glyphMaterialMetadata().schemas().getFirst().schemaId());
|
assertEquals("schema-1", snapshot.glyphMaterialMetadata().schemas().getFirst().schemaId());
|
||||||
assertEquals("#8B4513", snapshot.glyphMaterialMetadata().schemas().getFirst().materialIndices().get(1));
|
assertEquals("#8B4513", snapshot.glyphMaterialMetadata().schemas().getFirst().materialIndices().get(0));
|
||||||
assertEquals(1, snapshot.glyphMaterialMetadata().palettes().size());
|
assertEquals(1, snapshot.glyphMaterialMetadata().palettes().size());
|
||||||
assertEquals("Forest", snapshot.glyphMaterialMetadata().palettes().getFirst().displayName());
|
assertEquals("Forest", snapshot.glyphMaterialMetadata().palettes().getFirst().displayName());
|
||||||
assertEquals(List.of("#8B4513", "#00AA00"), snapshot.glyphMaterialMetadata().palettes().getFirst().colors());
|
assertEquals(List.of("#8B4513", "#00AA0000"), snapshot.glyphMaterialMetadata().palettes().getFirst().colors());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void keepsHtmlRgbAsCanonicalGlyphMaterialColorAndDerivesRgb565() {
|
void keepsHtmlRgbAsCanonicalGlyphMaterialColorAndDerivesRgba8888() {
|
||||||
final AssetStudioGlyphMaterialPalette palette = new AssetStudioGlyphMaterialPalette(
|
final AssetStudioGlyphMaterialPalette palette = new AssetStudioGlyphMaterialPalette(
|
||||||
"palette-1",
|
"palette-1",
|
||||||
"schema-1",
|
"schema-1",
|
||||||
1,
|
1,
|
||||||
List.of("#FF0000", "#00FF00", "#0000FF"));
|
List.of("#FF0000", "#00FF00", "#0000FF", "#00000000"));
|
||||||
|
|
||||||
assertEquals(List.of("#FF0000", "#00FF00", "#0000FF"), palette.colors());
|
assertEquals(List.of("#FF0000", "#00FF00", "#0000FF", "#00000000"), palette.colors());
|
||||||
assertEquals(List.of(0xF800, 0x07E0, 0x001F), palette.convertedRgb565Colors());
|
assertEquals(List.of(0xFF0000FF, 0x00FF00FF, 0x0000FFFF, 0x00000000), palette.convertedRgba8888Colors());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -6,36 +6,11 @@
|
|||||||
"asset_uuid" : "21953cb8-4101-4790-9e5e-d95f5fbc9b5a",
|
"asset_uuid" : "21953cb8-4101-4790-9e5e-d95f5fbc9b5a",
|
||||||
"root" : "ui/atlas2",
|
"root" : "ui/atlas2",
|
||||||
"included_in_build" : true
|
"included_in_build" : true
|
||||||
}, {
|
|
||||||
"asset_id" : 7,
|
|
||||||
"asset_uuid" : "62a81570-8f47-4612-9288-6060e6c9a2e2",
|
|
||||||
"root" : "ui/one-more-atlas",
|
|
||||||
"included_in_build" : false
|
|
||||||
}, {
|
}, {
|
||||||
"asset_id" : 8,
|
"asset_id" : 8,
|
||||||
"asset_uuid" : "9a7386e7-6f0e-4e4c-9919-0de71e0b7031",
|
"asset_uuid" : "9a7386e7-6f0e-4e4c-9919-0de71e0b7031",
|
||||||
"root" : "ui/sound",
|
"root" : "ui/sound",
|
||||||
"included_in_build" : true
|
"included_in_build" : true
|
||||||
}, {
|
|
||||||
"asset_id" : 11,
|
|
||||||
"asset_uuid" : "64147d33-e8bf-4272-bb5c-b4c07c0276b3",
|
|
||||||
"root" : "bigode",
|
|
||||||
"included_in_build" : false
|
|
||||||
}, {
|
|
||||||
"asset_id" : 12,
|
|
||||||
"asset_uuid" : "b15b319f-5cab-4254-93ea-d83f4742d204",
|
|
||||||
"root" : "recovered/atlas2",
|
|
||||||
"included_in_build" : false
|
|
||||||
}, {
|
|
||||||
"asset_id" : 13,
|
|
||||||
"asset_uuid" : "4d9847b0-5a23-421f-8b78-bf3909ca2281",
|
|
||||||
"root" : "recovered/one-more-atlas",
|
|
||||||
"included_in_build" : false
|
|
||||||
}, {
|
|
||||||
"asset_id" : 14,
|
|
||||||
"asset_uuid" : "f64d3bfe-443d-4703-b62a-face19a32cac",
|
|
||||||
"root" : "recovered/bbb2",
|
|
||||||
"included_in_build" : false
|
|
||||||
}, {
|
}, {
|
||||||
"asset_id" : 15,
|
"asset_id" : 15,
|
||||||
"asset_uuid" : "87396aab-337e-479e-b1f4-ec296678389e",
|
"asset_uuid" : "87396aab-337e-479e-b1f4-ec296678389e",
|
||||||
|
|||||||
@ -9,8 +9,7 @@
|
|||||||
"palettes" : [ {
|
"palettes" : [ {
|
||||||
"index" : 0,
|
"index" : 0,
|
||||||
"palette" : {
|
"palette" : {
|
||||||
"originalArgb8888" : [ -14671840, -11431408, -9326048, -802016, -3964416, -5086944, -789517, -810399, -1863087, -10403552, -5078447 ],
|
"rgba8888" : [ 0, 538976511, 1368527103, 1907499263, -205315841, -1014890241, -1302257409, -202116097, -207461889, -476950017, 1631658239, -1300082177 ]
|
||||||
"convertedRgb565" : [ 8452, 21634, 30084, 62980, 50176, 45828, 63390, 62732, 58506, 25092, 46090 ]
|
|
||||||
}
|
}
|
||||||
} ]
|
} ]
|
||||||
},
|
},
|
||||||
@ -27,41 +26,41 @@
|
|||||||
"file" : "link00.png",
|
"file" : "link00.png",
|
||||||
"index" : 0,
|
"index" : 0,
|
||||||
"artifact_id" : "art-b82d5371eb9c",
|
"artifact_id" : "art-b82d5371eb9c",
|
||||||
"fingerprint" : "c363f3ef7f32d9b249c7dc8babdb3eb5aae68c524099e5e97290202b054dda71"
|
"fingerprint" : "c8e30f40473deedb265be26967f6bf5f2ba35a2bd5d0a049dcb8843fa60d5600"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link01.png",
|
"file" : "link01.png",
|
||||||
"index" : 1,
|
"index" : 1,
|
||||||
"artifact_id" : "art-acf4398779de",
|
"artifact_id" : "art-acf4398779de",
|
||||||
"fingerprint" : "e2130efbb9643b41a4fb62619f2713402f9622c7db040fe18d929609ef70b89a"
|
"fingerprint" : "58a6a9bc02d9174fdc6bcd6f71f5fb86c47d506812e83cae5b0e23a1f951dbbf"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link02.png",
|
"file" : "link02.png",
|
||||||
"index" : 2,
|
"index" : 2,
|
||||||
"artifact_id" : "art-88d5de66ceea",
|
"artifact_id" : "art-88d5de66ceea",
|
||||||
"fingerprint" : "9216dfc6a6226fac398e9f781550d23fbfaa65bd377cdda69187149beca114ec"
|
"fingerprint" : "110c4f835a40bb370c7bb7761afcd69de0d38e75798d20d50f4c203aa56f213a"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link03.png",
|
"file" : "link03.png",
|
||||||
"index" : 3,
|
"index" : 3,
|
||||||
"artifact_id" : "art-18a3b61a9561",
|
"artifact_id" : "art-18a3b61a9561",
|
||||||
"fingerprint" : "ebc4b7ca7bb1455288681c5d71424f60f658a44cb343d0c3934329cec676c867"
|
"fingerprint" : "2e6fb2cfbf77f4b3c0d116b9b77a3ae228cdc5671bd18320285824faef9674d3"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link04.png",
|
"file" : "link04.png",
|
||||||
"index" : 4,
|
"index" : 4,
|
||||||
"artifact_id" : "art-231ecb85b204",
|
"artifact_id" : "art-231ecb85b204",
|
||||||
"fingerprint" : "c363f3ef7f32d9b249c7dc8babdb3eb5aae68c524099e5e97290202b054dda71"
|
"fingerprint" : "c8e30f40473deedb265be26967f6bf5f2ba35a2bd5d0a049dcb8843fa60d5600"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link05.png",
|
"file" : "link05.png",
|
||||||
"index" : 5,
|
"index" : 5,
|
||||||
"artifact_id" : "art-f36b8455db22",
|
"artifact_id" : "art-f36b8455db22",
|
||||||
"fingerprint" : "1ba8ce75c445396334737143e0cfa56c87a1fb64cca8ad0962192594849249eb"
|
"fingerprint" : "94ac699b5e913925cf881e76ff951875147b598b1ee9870187111e7ca0b40d1d"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link06.png",
|
"file" : "link06.png",
|
||||||
"index" : 6,
|
"index" : 6,
|
||||||
"artifact_id" : "art-884d6b34d741",
|
"artifact_id" : "art-884d6b34d741",
|
||||||
"fingerprint" : "5e0954447699c6d5eac7550f1a10cf520efcddad0b9fbd9a716434da9d9550d4"
|
"fingerprint" : "fc0a623650619ca39c1ce2f9f9e1b0f6951abd194e18ea60c682fae6a769df97"
|
||||||
}, {
|
}, {
|
||||||
"file" : "link07.png",
|
"file" : "link07.png",
|
||||||
"index" : 7,
|
"index" : 7,
|
||||||
"artifact_id" : "art-ca5e39fb056c",
|
"artifact_id" : "art-ca5e39fb056c",
|
||||||
"fingerprint" : "6104ba7f216a937994d478ed07766ec28f48ad72fdd6620508535a1f877b8ddb"
|
"fingerprint" : "7ada8efefcd6d069b10846fefb9bd9cff1a1fa4c1565bbebfd68fc83645f0732"
|
||||||
} ]
|
} ]
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 476 B |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 684 B After Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 669 B After Width: | Height: | Size: 628 B |
@ -3,8 +3,9 @@
|
|||||||
"schemas" : [ {
|
"schemas" : [ {
|
||||||
"schema_id" : "schema-1",
|
"schema_id" : "schema-1",
|
||||||
"status" : "ok",
|
"status" : "ok",
|
||||||
"version" : 1,
|
"version" : 2,
|
||||||
"material_indices" : {
|
"material_indices" : {
|
||||||
|
"0" : "#00000000",
|
||||||
"1" : "#202020",
|
"1" : "#202020",
|
||||||
"2" : "#519210",
|
"2" : "#519210",
|
||||||
"3" : "#71B220",
|
"3" : "#71B220",
|
||||||
@ -19,29 +20,29 @@
|
|||||||
},
|
},
|
||||||
"artifact_bindings" : [ {
|
"artifact_bindings" : [ {
|
||||||
"artifact_id" : "art-b82d5371eb9c",
|
"artifact_id" : "art-b82d5371eb9c",
|
||||||
"fingerprint" : "c363f3ef7f32d9b249c7dc8babdb3eb5aae68c524099e5e97290202b054dda71"
|
"fingerprint" : "c8e30f40473deedb265be26967f6bf5f2ba35a2bd5d0a049dcb8843fa60d5600"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-acf4398779de",
|
"artifact_id" : "art-acf4398779de",
|
||||||
"fingerprint" : "e2130efbb9643b41a4fb62619f2713402f9622c7db040fe18d929609ef70b89a"
|
"fingerprint" : "58a6a9bc02d9174fdc6bcd6f71f5fb86c47d506812e83cae5b0e23a1f951dbbf"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-88d5de66ceea",
|
"artifact_id" : "art-88d5de66ceea",
|
||||||
"fingerprint" : "9216dfc6a6226fac398e9f781550d23fbfaa65bd377cdda69187149beca114ec"
|
"fingerprint" : "110c4f835a40bb370c7bb7761afcd69de0d38e75798d20d50f4c203aa56f213a"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-18a3b61a9561",
|
"artifact_id" : "art-18a3b61a9561",
|
||||||
"fingerprint" : "ebc4b7ca7bb1455288681c5d71424f60f658a44cb343d0c3934329cec676c867"
|
"fingerprint" : "2e6fb2cfbf77f4b3c0d116b9b77a3ae228cdc5671bd18320285824faef9674d3"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-231ecb85b204",
|
"artifact_id" : "art-231ecb85b204",
|
||||||
"fingerprint" : "c363f3ef7f32d9b249c7dc8babdb3eb5aae68c524099e5e97290202b054dda71"
|
"fingerprint" : "c8e30f40473deedb265be26967f6bf5f2ba35a2bd5d0a049dcb8843fa60d5600"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-f36b8455db22",
|
"artifact_id" : "art-f36b8455db22",
|
||||||
"fingerprint" : "1ba8ce75c445396334737143e0cfa56c87a1fb64cca8ad0962192594849249eb"
|
"fingerprint" : "94ac699b5e913925cf881e76ff951875147b598b1ee9870187111e7ca0b40d1d"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-884d6b34d741",
|
"artifact_id" : "art-884d6b34d741",
|
||||||
"fingerprint" : "5e0954447699c6d5eac7550f1a10cf520efcddad0b9fbd9a716434da9d9550d4"
|
"fingerprint" : "fc0a623650619ca39c1ce2f9f9e1b0f6951abd194e18ea60c682fae6a769df97"
|
||||||
}, {
|
}, {
|
||||||
"artifact_id" : "art-ca5e39fb056c",
|
"artifact_id" : "art-ca5e39fb056c",
|
||||||
"fingerprint" : "6104ba7f216a937994d478ed07766ec28f48ad72fdd6620508535a1f877b8ddb"
|
"fingerprint" : "7ada8efefcd6d069b10846fefb9bd9cff1a1fa4c1565bbebfd68fc83645f0732"
|
||||||
} ]
|
} ]
|
||||||
} ],
|
} ],
|
||||||
"palettes" : [ ]
|
"palettes" : [ ]
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 496 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 492 B |
|
Before Width: | Height: | Size: 507 B After Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 497 B After Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 487 B |
|
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 509 B |
@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"asset_uuid" : "64147d33-e8bf-4272-bb5c-b4c07c0276b3",
|
|
||||||
"name" : "Bigode",
|
|
||||||
"type" : "glyph_bank",
|
|
||||||
"output" : {
|
|
||||||
"format" : "GLYPH/indexed_v1",
|
|
||||||
"codec" : "NONE",
|
|
||||||
"codec_configuration" : { },
|
|
||||||
"metadata" : {
|
|
||||||
"tile_size" : "16x16"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"preload" : {
|
|
||||||
"enabled" : false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"glyph_bank_specialization" : "sprites"
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"asset_uuid" : "b15b319f-5cab-4254-93ea-d83f4742d204",
|
|
||||||
"name" : "ui_atlas",
|
|
||||||
"type" : "glyph_bank",
|
|
||||||
"output" : {
|
|
||||||
"format" : "GLYPH/indexed_v1",
|
|
||||||
"codec" : "NONE",
|
|
||||||
"codec_configuration" : { },
|
|
||||||
"metadata" : {
|
|
||||||
"tile_size" : "16x16"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"preload" : {
|
|
||||||
"enabled" : false
|
|
||||||
},
|
|
||||||
"artifacts" : [ {
|
|
||||||
"file" : "confirm.png",
|
|
||||||
"index" : 0,
|
|
||||||
"artifact_id" : "art-8c6bdad24eb1",
|
|
||||||
"fingerprint" : "aa7d241deabcebe29a6096e14eaf16fdc06cf06380c11a507620b00fc7bff094"
|
|
||||||
} ]
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 137 B |
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"glyph_bank_specialization" : "sprites"
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"asset_uuid" : "f64d3bfe-443d-4703-b62a-face19a32cac",
|
|
||||||
"name" : "bbb2",
|
|
||||||
"type" : "glyph_bank",
|
|
||||||
"output" : {
|
|
||||||
"codec" : "NONE",
|
|
||||||
"format" : "GLYPH/indexed_v1"
|
|
||||||
},
|
|
||||||
"preload" : {
|
|
||||||
"enabled" : false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"glyph_bank_specialization" : "sprites"
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"asset_uuid" : "4d9847b0-5a23-421f-8b78-bf3909ca2281",
|
|
||||||
"name" : "one-more-atlas",
|
|
||||||
"type" : "glyph_bank",
|
|
||||||
"output" : {
|
|
||||||
"format" : "GLYPH/indexed_v1",
|
|
||||||
"codec" : "NONE"
|
|
||||||
},
|
|
||||||
"preload" : {
|
|
||||||
"enabled" : true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"glyph_bank_specialization" : "sprites"
|
|
||||||
}
|
|
||||||
@ -9,8 +9,7 @@
|
|||||||
"palettes" : [ {
|
"palettes" : [ {
|
||||||
"index" : 0,
|
"index" : 0,
|
||||||
"palette" : {
|
"palette" : {
|
||||||
"originalArgb8888" : [ -12019640, -12552128, -14129088, -14133200, -14145496, -7835584, -5730208, -10465232 ],
|
"rgba8888" : [ 1217939711, 1081622783, 677921023, 676868351, 673720575, -2005909249, -1466932993, 1615868159 ]
|
||||||
"convertedRgb565" : [ 19657, 17352, 11080, 10950, 10565, 35720, 44172, 25222 ]
|
|
||||||
}
|
}
|
||||||
} ]
|
} ]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,14 +5,14 @@
|
|||||||
"status" : "ok",
|
"status" : "ok",
|
||||||
"version" : 5,
|
"version" : 5,
|
||||||
"material_indices" : {
|
"material_indices" : {
|
||||||
"1" : "#489848",
|
"0" : "#489848",
|
||||||
"2" : "#407840",
|
"1" : "#407840",
|
||||||
"3" : "#286840",
|
"2" : "#286840",
|
||||||
"4" : "#285830",
|
"3" : "#285830",
|
||||||
"5" : "#282828",
|
"4" : "#282828",
|
||||||
"6" : "#887040",
|
"5" : "#887040",
|
||||||
"7" : "#A89060",
|
"6" : "#A89060",
|
||||||
"8" : "#605030"
|
"7" : "#605030"
|
||||||
},
|
},
|
||||||
"artifact_bindings" : [ {
|
"artifact_bindings" : [ {
|
||||||
"artifact_id" : "art-67db3cae2605",
|
"artifact_id" : "art-67db3cae2605",
|
||||||
|
|||||||
@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"asset_uuid" : "21953cb8-4101-4790-9e5e-d95f5fbc9b5a",
|
|
||||||
"name" : "ui_atlas",
|
|
||||||
"type" : "glyph_bank",
|
|
||||||
"output" : {
|
|
||||||
"format" : "GLYPH/indexed_v1",
|
|
||||||
"codec" : "NONE",
|
|
||||||
"codec_configuration" : { },
|
|
||||||
"metadata" : {
|
|
||||||
"tile_size" : "32x32"
|
|
||||||
},
|
|
||||||
"pipeline" : {
|
|
||||||
"palettes" : [ {
|
|
||||||
"index" : 0,
|
|
||||||
"palette" : {
|
|
||||||
"originalArgb8888" : [ -265674, -1736296, -13905598, -11518505, -14439577, -2467509 ],
|
|
||||||
"convertedRgb565" : [ 65414, 58387, 11912, 20986, 9548, 56009 ]
|
|
||||||
}
|
|
||||||
} ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"preload" : {
|
|
||||||
"enabled" : false
|
|
||||||
},
|
|
||||||
"artifacts" : [ {
|
|
||||||
"file" : "right-palette.png",
|
|
||||||
"index" : 0,
|
|
||||||
"artifact_id" : "art-92ac40fe2160",
|
|
||||||
"fingerprint" : "0526996900bdeef23c72fe987fb45800f11895946dcd5f0f7f8390c879069a37"
|
|
||||||
} ]
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 137 B |
@ -1,21 +0,0 @@
|
|||||||
{
|
|
||||||
"schema_version" : 1,
|
|
||||||
"schemas" : [ {
|
|
||||||
"schema_id" : "schema-1",
|
|
||||||
"status" : "ok",
|
|
||||||
"version" : 1,
|
|
||||||
"material_indices" : {
|
|
||||||
"1" : "#FBF236",
|
|
||||||
"2" : "#E58198",
|
|
||||||
"3" : "#2BD142",
|
|
||||||
"4" : "#503DD7",
|
|
||||||
"5" : "#23AB67",
|
|
||||||
"6" : "#DA594B"
|
|
||||||
},
|
|
||||||
"artifact_bindings" : [ {
|
|
||||||
"artifact_id" : "art-92ac40fe2160",
|
|
||||||
"fingerprint" : "0526996900bdeef23c72fe987fb45800f11895946dcd5f0f7f8390c879069a37"
|
|
||||||
} ]
|
|
||||||
} ],
|
|
||||||
"palettes" : [ ]
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |
|
Before Width: | Height: | Size: 172 B |