mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-03 04:54:26 +00:00
JavaScript port decodes YAPF 2; VS Code and Figma open every file
yapf.js: decodeTexture (container, yapf-sum checks, code books with context decoding, 16-bit / float planes, GPU block tiles), BC1-BC7 / BC6H block decoding and textureToRGBA for display. Matches the C library on 417 generated files (surfaces bit-exact) and survives fuzzing with clean YapfErrors; fixtures in bindings/js/test-data keep it checked. VS Code preview: pickers for mip, face, layer, frame and slice; storage, normal-map convention and version in the info bar. Figma import: textures converted to 8-bit, 8-bit images stay exact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVrVthWN8GsmgHGUhhsCYm
This commit is contained in:
parent
fdbd0a6b8f
commit
0ba1f0af17
23 changed files with 1751 additions and 66 deletions
BIN
bindings/js/test-data/v2-animation-notes.yapf
Normal file
BIN
bindings/js/test-data/v2-animation-notes.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-bc3-packed.yapf
Normal file
BIN
bindings/js/test-data/v2-bc3-packed.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-bc5-packed.yapf
Normal file
BIN
bindings/js/test-data/v2-bc5-packed.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-bc6h-encoded.yapf
Normal file
BIN
bindings/js/test-data/v2-bc6h-encoded.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-bc6h-random-blocks.yapf
Normal file
BIN
bindings/js/test-data/v2-bc6h-random-blocks.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-bc7-encoded.yapf
Normal file
BIN
bindings/js/test-data/v2-bc7-encoded.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-bc7-random-blocks.yapf
Normal file
BIN
bindings/js/test-data/v2-bc7-random-blocks.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-cube-mips.yapf
Normal file
BIN
bindings/js/test-data/v2-cube-mips.yapf
Normal file
Binary file not shown.
137
bindings/js/test-data/v2-expected.json
Normal file
137
bindings/js/test-data/v2-expected.json
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
{
|
||||
"v2-rgba8.yapf": {
|
||||
"surfaces": [
|
||||
480599072
|
||||
],
|
||||
"preview0": 480599072
|
||||
},
|
||||
"v2-float-gray-entropy.yapf": {
|
||||
"surfaces": [
|
||||
1656156314
|
||||
],
|
||||
"preview0": 2474033295
|
||||
},
|
||||
"v2-half-gray-alpha-entropy.yapf": {
|
||||
"surfaces": [
|
||||
2599040047
|
||||
],
|
||||
"preview0": 297007736
|
||||
},
|
||||
"v2-rgba8-entropy.yapf": {
|
||||
"surfaces": [
|
||||
554695116
|
||||
],
|
||||
"preview0": 554695116
|
||||
},
|
||||
"v2-u16-rgba-entropy.yapf": {
|
||||
"surfaces": [
|
||||
3416063949
|
||||
],
|
||||
"preview0": 1518500476
|
||||
},
|
||||
"v2-cube-mips.yapf": {
|
||||
"surfaces": [
|
||||
3098789294,
|
||||
2090642189,
|
||||
3178169037,
|
||||
3641419477,
|
||||
333399741,
|
||||
2333110333,
|
||||
1703812753,
|
||||
3098789294,
|
||||
2090642189,
|
||||
3178169037,
|
||||
3641419477,
|
||||
333399741,
|
||||
2333110333,
|
||||
1703812753,
|
||||
3098789294,
|
||||
2090642189,
|
||||
3178169037,
|
||||
3641419477,
|
||||
333399741,
|
||||
2333110333,
|
||||
1703812753,
|
||||
3098789294,
|
||||
2090642189,
|
||||
3178169037,
|
||||
3641419477,
|
||||
333399741,
|
||||
2333110333,
|
||||
1703812753,
|
||||
3098789294,
|
||||
2090642189,
|
||||
3178169037,
|
||||
3641419477,
|
||||
333399741,
|
||||
2333110333,
|
||||
1703812753,
|
||||
3098789294,
|
||||
2090642189,
|
||||
3178169037,
|
||||
3641419477,
|
||||
333399741,
|
||||
2333110333,
|
||||
1703812753
|
||||
],
|
||||
"preview0": 3098789294
|
||||
},
|
||||
"v2-u16-volume.yapf": {
|
||||
"surfaces": [
|
||||
1504297975,
|
||||
2857113671,
|
||||
3272367306,
|
||||
4248642449
|
||||
],
|
||||
"preview0": 3611091147
|
||||
},
|
||||
"v2-animation-notes.yapf": {
|
||||
"surfaces": [
|
||||
2496952478,
|
||||
2084186354,
|
||||
2971951804,
|
||||
4204487618
|
||||
],
|
||||
"preview0": 2496952478
|
||||
},
|
||||
"v2-bc6h-random-blocks.yapf": {
|
||||
"surfaces": [
|
||||
2051803746,
|
||||
562394057,
|
||||
2093502260
|
||||
],
|
||||
"preview0": 2386146506
|
||||
},
|
||||
"v2-bc7-random-blocks.yapf": {
|
||||
"surfaces": [
|
||||
3714498223,
|
||||
242396130,
|
||||
2835116443
|
||||
],
|
||||
"preview0": 4042788133
|
||||
},
|
||||
"v2-bc3-packed.yapf": {
|
||||
"surfaces": [
|
||||
1798067479
|
||||
],
|
||||
"preview0": 3027945807
|
||||
},
|
||||
"v2-bc5-packed.yapf": {
|
||||
"surfaces": [
|
||||
1681957115
|
||||
],
|
||||
"preview0": 1079658926
|
||||
},
|
||||
"v2-bc7-encoded.yapf": {
|
||||
"surfaces": [
|
||||
3415378546
|
||||
],
|
||||
"preview0": 851871445
|
||||
},
|
||||
"v2-bc6h-encoded.yapf": {
|
||||
"surfaces": [
|
||||
3372163902
|
||||
],
|
||||
"preview0": 89762387
|
||||
}
|
||||
}
|
||||
BIN
bindings/js/test-data/v2-float-gray-entropy.yapf
Normal file
BIN
bindings/js/test-data/v2-float-gray-entropy.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-half-gray-alpha-entropy.yapf
Normal file
BIN
bindings/js/test-data/v2-half-gray-alpha-entropy.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-rgba8-entropy.yapf
Normal file
BIN
bindings/js/test-data/v2-rgba8-entropy.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-rgba8.yapf
Normal file
BIN
bindings/js/test-data/v2-rgba8.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-u16-rgba-entropy.yapf
Normal file
BIN
bindings/js/test-data/v2-u16-rgba-entropy.yapf
Normal file
Binary file not shown.
BIN
bindings/js/test-data/v2-u16-volume.yapf
Normal file
BIN
bindings/js/test-data/v2-u16-volume.yapf
Normal file
Binary file not shown.
Loading…
Reference in a new issue