{"id":19200213,"url":"https://github.com/rinckodev/starlightskinapi","last_synced_at":"2025-05-09T02:14:32.853Z","repository":{"id":208672624,"uuid":"722207262","full_name":"rinckodev/starlightskinapi","owner":"rinckodev","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-16T13:20:24.000Z","size":385,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T18:49:34.295Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rinckodev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-22T17:00:38.000Z","updated_at":"2025-02-26T16:53:36.000Z","dependencies_parsed_at":"2024-03-05T09:44:18.044Z","dependency_job_id":"335dfdfd-a35e-4556-8f8c-cf3f92240983","html_url":"https://github.com/rinckodev/starlightskinapi","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"b87f2d4ab7077f204595e5ebcab7459e04cad600"},"previous_names":["rinckodev/starlightskinapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinckodev%2Fstarlightskinapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinckodev%2Fstarlightskinapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinckodev%2Fstarlightskinapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rinckodev%2Fstarlightskinapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rinckodev","download_url":"https://codeload.github.com/rinckodev/starlightskinapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252699225,"owners_count":21790678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T12:31:17.137Z","updated_at":"2025-05-09T02:14:32.835Z","avatar_url":"https://github.com/rinckodev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Starlight SkinAPI Wrapper\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/images/logo.png\" width=450\u003e\n\u003c/p\u003e\n\nThis package is a Starlight SkinAPI wrapper\n\nOficial Starlight SkinAPI Documentation : https://docs.lunareclipse.studio/\n\n### Installation\n```bash\nnpm install starlightskinapi\n```\n\nfetchSkinInfo function usage:\n```ts\nimport { fetchSkinInfo } from \"starlightskinapi\";\n\nasync function main(){\n    const playerNickname = \"RinckoZ_\";\n    const infoResult = await fetchSkinInfo(playerNickname)\n\n    if (infoResult.success){\n        console.log(infoResult.playerUUID)\n        console.log(infoResult.skinUrl)\n        console.log(infoResult.userCape)\n        console.log(infoResult.skinTextureWidth)\n        console.log(infoResult.skinTextureHeight)\n    }\n}\nmain();\n```\nOutput:\n```bash\nf169e30f110943dfba445da3b7dee1ce\nhttp://textures.minecraft.net/texture/4d24cc4874ba673963ca57818a0be02666aa80f4747d00b45571e380ed9b54f7\nhttp://textures.minecraft.net/texture/2340c0e03dd24a11b15a8b33c2a7e9e32abb2051b2481d0ba7defd635ca7a933\n64\n64\n```\n\nIf the nick or uuid is not found, success will be false, and you will have the error property\n```ts\nasync function main(){\n    const playerNickname = \"NicknameVeryLongAndUnlikely\";\n    const infoResult = await fetchSkinInfo(playerNickname)\n\n    if (!infoResult.success){\n        console.log(infoResult.error)\n    }\n}\nmain();\n```\n\nOutput: \n```bash\nUnknown player username/uuid.\n```\n\nSee how to get a render pose\n\n```ts\nimport { RenderCrops, RenderTypes, fetchSkinRender } from \"starlightskinapi\";\nimport { writeFile } from \"node:fs/promises\"\n\nasync function main(){\n    const playerNickname = \"RinckoZ_\";\n    const renderResult = await fetchSkinRender(playerNickname, {\n        type: RenderTypes.Default,\n        crop: RenderCrops.Full,\n    })\n\n    if (!renderResult.success){\n        console.log(renderResult.error)\n        return;\n    }\n\n    if (renderResult.success){\n        const { buffer, url } = renderResult;\n        console.log(url) // \n        await writeFile(\"./render.png\", buffer);\n    }\n}\nmain();\n```\nOutput:\n\n\u003cimg src=\"assets/images/render.png\" width=100\u003e\n\nYou can customize the model, camera and lighting options\n\n```ts\nimport { RenderCrops, RenderTypes, fetchSkinRender } from \"starlightskinapi\";\nimport { writeFile } from \"node:fs/promises\"\n\nasync function main(){\n    const playerNickname = \"RinckoZ_\";\n\n    const renderResult = await fetchSkinRender(playerNickname, {\n        type: RenderTypes.Default,\n        crop: RenderCrops.Full,\n        model: {\n            capeEnabled: true,\n            // ... other model options ...\n        },\n        camera: {\n            cameraPosition: { x: \"10\", y: \"10\", z: \"-20\" },\n            cameraWidth: 720,\n            cameraHeight: 1080,\n            // ... other camera options ...\n        },\n        lighting: {\n            dirLightPos: { x: \"-10\", y: \"10\", z: \"-10\" },\n            // ... other lighting options ...\n        },\n    });\n\n    if (!renderResult.success){\n        console.log(renderResult.error)\n        return;\n    }\n\n    if (renderResult.success){\n        const { buffer } = renderResult;\n        await writeFile(\"./customized.png\", buffer);\n    }\n}\nmain();\n```\n\nOutput:\n\n\u003cimg src=\"assets/images/customized.png\" width=200\u003e\n\n\n## Full Render Type List\n\n| Render Types | Supported Crops | Preview |\n| ------------ | --------------- | ------- |\n| Default | Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/default/RinckoZ_/full\" width=40\u003e |\n| Marching | Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/marching/RinckoZ_/full\" width=40\u003e |\n| Walking | Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/walking/RinckoZ_/full\" width=40\u003e |\n| Crouching | Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/crouching/RinckoZ_/full\" width=40\u003e |\n| Crossed | Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/crossed/RinckoZ_/full\" width=40\u003e |\n| CrissCross| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/criss_cross/RinckoZ_/full\" width=40\u003e |\n| Cheering| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/cheering/RinckoZ_/full\" width=40\u003e |\n| Relaxing| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/relaxing/RinckoZ_/full\" width=40\u003e |\n| Trudging | Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/trudging/RinckoZ_/full\" width=40\u003e |\n| Cowering| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/cowering/RinckoZ_/full\" width=40\u003e |\n| Pointing| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/pointing/RinckoZ_/full\" width=40\u003e |\n| Lunging| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/lunging/RinckoZ_/full\" width=40\u003e |\n| Dungeons| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/dungeons/RinckoZ_/full\" width=40\u003e |\n| Facepalm| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/facepalm/RinckoZ_/full\" width=40\u003e |\n| Sleeping| Full, Bust | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/sleeping/RinckoZ_/full\" width=40\u003e |\n| Dead| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/dead/RinckoZ_/full\" width=40\u003e |\n| Archer| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/archer/RinckoZ_/full\" width=40\u003e |\n| Facepalm| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/kicking/RinckoZ_/full\" width=40\u003e |\n| Mojavatar| Full, Bust | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/mojavatar/RinckoZ_/full\" width=40\u003e |\n| Ultimate| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/ultimate/RinckoZ_/full\" width=40\u003e |\n| Isometric| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/isometric/RinckoZ_/full\" width=40\u003e |\n| Head| Full | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/head/RinckoZ_/full\" width=40\u003e |\n| Bitzel| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/bitzel/RinckoZ_/full\" width=40\u003e |\n| Pixel| Full, Bust, Face | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/pixel/RinckoZ_/full\" width=40\u003e |\n| Ornament| Full | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/ornament/RinckoZ_/full\" width=40\u003e |\n| Skin| Default, Processed | \u003cimg src=\"https://starlightskins.lunareclipse.studio/render/skin/RinckoZ_/default\" width=40\u003e |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinckodev%2Fstarlightskinapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frinckodev%2Fstarlightskinapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frinckodev%2Fstarlightskinapi/lists"}