Closed GalMunGral closed 7 months ago
LGTM 👍 Works as advertised! Thank you, @GalMunGral!
If these scripts run very quickly, we also have a Backend Python API if we want to turn any of these Python scripts into API endpoints that the frontend can call at runtime 😄
Thanks! I think eventually some of this (including the code on the frontend that's doing the lookups) will go to the backend.
Precompute lookup tables for chemical properties. See
src/assets/blocks/10x10x10palette/data.json
andsrc/assets/blocks/opv/data.json
for the output formats. E.g."5:0:2"
represents start block 5 + no middle block + end block 2. The JSON is mostly designed to be consumed by the frontend:Map
or object from an array.block.index
), the second-level index is the block ID (1-based index) within each group of blocks (also stored inblock.id
)) so you can directly index into it to get the blocks. E.g. for molecule"5:0:2"
the first block isblocks[0][5-1]
and the last one isblocks[2][2-1]
.