svelte-skinview3d
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i svelte-skinview3d

Weekly Downloads

2

Version

1.0.0

License

none

Unpacked Size

6.26 kB

Total Files

9

Last publish

Collaborators

  • officialcrugg