1.0.1 โ€ข Published 5 years ago

css-camera v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

๐Ÿ“ท CSS-CAMERA

npm GitHub

Add depth to your web page with CSS3 3D transform.

This project is mostly inspired by Keith Clark's work.

โœจ Features

  • Movable, and Rotatable camera for your scene.
  • Can move to in front of any element in your scene, whether it has been rotated or translated.

โš™๏ธ Installation

npm i css-camera
# or
yarn add css-camera

๐Ÿƒ Quick Start

// Prerequisite:
// Create your scene as you like
const card = document.querySelector("#card");
const cardButton = document.querySelector("#card-button");

// First, make camera
const camera = new CSSCamera("#space");

// Call its method, then update it!
cardButton.onclick = () => {
  camera.focus(card);
  camera.update(2000);
}

Check more methods on the ๐Ÿ“„API Documentation page

๐Ÿ“œ License

MIT

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-rc

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago