Skip to content

zoomkoding/3d-book

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3d-book

3d-book is a React book component created by three.js.

Installation

3d-book is available as an npm package.

npm install 3d-book

Usage

import Book from "3d-book";

function App() {
  return (
    <div className="App">
      <Book
        style={{ width: 500, height: 600, background: "white" }}
        bookCovers={{
          front: "/images/front.jpeg",
          back: "/images/back.jpeg",
          spine: "/images/spine.jpeg",
        }}
      />
      <h2>
        <a href="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/zoomKoding/3d-book">3d book</a> by{" "}
        <a href="https://threejs.org/">three.js</a>
      </h2>
      <strong>Hover your mouse to rotate the book.</strong>
    </div>
  );
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT