Spritesheets
Fit an accessory to a rigged 3D model for Directional Sprites: an item GLB (a sword, a gun, a staff, a bow, a shield, a helmet, a hat, a backpack...) held by one bone of the model - a hand, the head, the back or the hips. Nothing is saved. The item is first placed automatically for its `kind` (a sword by its handle, a gun by its pistol grip, a shield on the forearm, a helmet over the head, a backpack on the back), and the hand closes round it. Adjust it relative to that automatic fit with `size` (% of it), `move` (% of the character's height along forward/up/out) and `turn` (degrees about those axes), and call again with the new values until it looks right: each call starts from the automatic fit, so send the full adjustment every time. The response has the `placement` to pass to attachDirectionalAccessories, `checks` (how far the item sinks into the body, how far its grip is from the palm, how much of the head pokes through a helmet, each in % of the character's height or of its vertices), and, unless `preview` is false, `model_url` (the model holding the item, a GLB kept 7 days) and `previews`: frames of the model walking with it, seen from SW and SE, like previewDirectionalSprites' (which this shares: one preview at a time, a newer one cancels the older, which then comes back without previews). Free (no credits) and synchronous; a fit takes a few seconds with previews. Requires an API key (user scope).
Changed onpost/assets/sprite/directional-accessory-fit
Request
- Base URLhttps://api.ludo.ai/api
- AuthAPI key in header Authorization
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Success
Changes
- info
endpoint added
- info