Three.js powered Svelte component for rendering Minecraft skins. Based on skinview3d, inspired by react-skinview3d, and developed by Pixelground Labs.
# npm
npm install svelte-skinview3d
# yarn
yarn add svelte-skinview3d
# pnpm
pnpm add svelte-skinview3d
<script>
import Skinview3d from "svelte-skinview3d";
</script>
<Skinview3d width={400} height={600} skinUrl="/textures/skin.png" capeUrl="/textures/cape.png" />
classCSS class to apply to the canvas element.
widthWidth of the canvas element. number | string (updates dynamically) (required)
heightHeight of the canvas element. number | string (updates dynamically) (required)
skinUrlURL of the skin image. string (updates dynamically) (required)
capeUrlURL of the cape image. string (updates dynamically)
onReadyCallback function that is called when the skin is loaded. ({ viewer, canvas }) => void
optionsOptions to pass to the skinview3d viewer minus canvas, width, height, skin, and cape. See skinview3d Readme and SkinViewerOptions interface for reference.
svelte-skinview3d is presented to you by Pixelground Labs and is provided under the MIT license. See LICENSE.md for details.