1.0.1 • Published 2 years ago

react-headview3d v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-headview3d (Forked from react-skinview3d)

Three.js powered Minecraft skin viewer component for react - see upstream project for more info headview3d

NPM

Install

npm install --save react-headview3d

Usage

import React from "react";
import Skinview3d from "react-headview3d";

const App = () => {
  return <HeadView3d skinUrl="textures/shiro.png" height={128} width={128} />;
};

Apply animations and customization

import React from "react";
import Skinview3d from "react-headview3d";

const App = () => {
  return (
    <HeadView3d
      skinUrl="textures/shiro.png"
      height={128}
      width={128}
      onReady={(skinViewer: headview3d.SkinViewer) => {
        // Add another animation
        skinViewer.animations.add(headview3d.RotatingAnimation);
      }}
    />
  );
};

License

MIT © SMCodesP