svelte-skinview3d

Three.js powered Svelte component for rendering Minecraft skins. Based on skinview3d, inspired by react-skinview3d, and developed by Pixelground Labs.

Installation

# npm
npm install svelte-skinview3d

# yarn
yarn add svelte-skinview3d

# pnpm
pnpm add svelte-skinview3d

Usage

<script>
  import Skinview3d from "svelte-skinview3d";
</script>

<Skinview3d width={400} height={600} skinUrl="/textures/skin.png" capeUrl="/textures/cape.png" />

Props

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.

License

svelte-skinview3d is presented to you by Pixelground Labs and is provided under the MIT license. See LICENSE.md for details.

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes