"""Moonwater mudskipper (a friend's idea, another friend named the fish; 2026-10-15). A fish that crawls out at dusk to sleep on the sand and slips back into the sea at dawn. Faces +X. Root = body, its centre ~0.04 m above the sand. Eyes sit high on the head (they retract when it sleeps); pectoral fins are its 'arms'; the first dorsal fin is a sail it raises when startled. Writes mudskipper.json for slbuild. Claude Opus 5.5 (Tessel).""" import json, os SKIN_TEX = "3112cdcf-2eb3-f180-49f8-6805194edcc7" # skin.png (gen_textures.py) FIN_TEX = "86ab7238-155c-7184-5a34-d89ae00af707" # fin.png SKIN = "#ffffff" SK = {"color": SKIN, "texture": SKIN_TEX} FN = {"color": "#ffffff", "texture": FIN_TEX, "alpha_mode": ["blend", 0]} BELLY = "#a49c7c" FIN = "#5d6470" SAIL = "#56708a" # blue-grey sail; mudskippers have a blue edge on it prims = [ {"name": "Moonwater mudskipper", "shape": "sphere", "size": [0.22, 0.09, 0.078], **SK}, {"name": "tail stalk", "shape": "sphere", "size": [0.16, 0.055, 0.05], "pos": [-0.095, 0, 0.004], **SK}, {"name": "head", "shape": "sphere", "size": [0.13, 0.105, 0.09], "pos": [0.085, 0, 0.006], **SK}, {"name": "chin", "shape": "sphere", "size": [0.11, 0.08, 0.04], "pos": [0.085, 0, -0.022], "color": BELLY}, ] for side, tag in ((1, "L"), (-1, "R")): prims.append({"name": f"eye {tag}", "shape": "sphere", "size": [0.036, 0.036, 0.036], "pos": [0.11, 0.024 * side, 0.052], "color": "#1b1a15", "shiny": "high"}) prims.append({"name": f"pec {tag}", "shape": "sphere", "size": [0.065, 0.014, 0.04], "pos": [0.06, 0.05 * side, -0.026], "rot": [-60 * side, 0, -40 * side], **FN}) prims += [ {"name": "sail", "shape": "sphere", "size": [0.075, 0.006, 0.11], "pos": [0.015, 0, 0.06], "rot": [0, -25, 0], **FN}, {"name": "dorsal 2", "shape": "sphere", "size": [0.09, 0.005, 0.045], "pos": [-0.085, 0, 0.03], **FN}, {"name": "tail", "shape": "sphere", "size": [0.11, 0.008, 0.055], "pos": [-0.195, 0, 0.004], **FN}, ] for p in prims: p["physics_shape"] = "none" if p is not prims[0] else "convex" spec = {"name": "Moonwater mudskipper", "desc": "a mudskipper: sleeps on the sand at night (Tessel; a friend's idea)", "defaults": {"texture": "blank"}, "prims": prims} out = os.path.join(os.path.dirname(os.path.abspath(__file__)), "mudskipper.json") open(out, "w").write("// generated by gen_mudskipper.py\n" + json.dumps(spec, indent=1)) print(out, len(prims), "prims")