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" />
class
CSS class to apply to the canvas element.
width
Width of the canvas element. number | string
(updates dynamically) (required)
height
Height of the canvas element. number | string
(updates dynamically) (required)
skinUrl
URL of the skin image. string
(updates dynamically) (required)
capeUrl
URL of the cape image. string
(updates dynamically)
onReady
Callback function that is called when the skin is loaded. ({ viewer, canvas }) => void
options
Options 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.