Add a tool that measures emotes from a store's 3D preview
tools/capture drives a store page's skin viewer in headless Firefox, stepping its clock one tick at a time and taking every tick from ten fixed cameras. It then fits our own rig to the frames by rendering the model (a Python port of LimbBend and PoseApplier) and matching outlines and colours, and writes the result as Emotecraft JSON. It measures pixels only and never reads the page's animation data. The README covers the steps, the checks and the limits. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import org.saturnclient.emotes.core.bend.LimbBend;
|
||||
|
||||
/** Prints LimbBend results for check_port.py to compare with the Python port. */
|
||||
public class CheckPort {
|
||||
public static void main(String[] args) {
|
||||
float[][] cases = { {-2, 10, 0.5f, 0, 0}, {-2, 10, 1.75f, 3.5f, 0}, {0, 12, 1.2f, 2.79f, 0},
|
||||
{0, 12, 0.7f, 3.14159f, 1}, {0, 12, -0.9f, 1.0f, 1} };
|
||||
float[][] points = { {0, 0, 0}, {1.5f, 3, -2.25f}, {-2.25f, 10.25f, 2.25f}, {2, -2.25f, 1}, {0.5f, 12.25f, -1} };
|
||||
float[] out = new float[3];
|
||||
for (float[] c : cases) {
|
||||
LimbBend b = c[4] == 1 ? LimbBend.anchoredAtEnd(c[0], c[1], c[2], c[3], 0.5f, 12)
|
||||
: new LimbBend(c[0], c[1], c[2], c[3], 0.5f, 12);
|
||||
for (float[] p : points) {
|
||||
b.bendPoint(p[0], p[1], p[2], out);
|
||||
System.out.printf("%f %f %f %f%n", out[0], out[1], out[2], b.angleAt(p[1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user