cocobean

0.2.5 • Public • Published

CSS Orientation Controls

Orientation controls for 3D CSS builds.

About coco

Usage

Import the script in your HTML:

<script src="https://unpkg.com/cocobean/coco.min.js"></script>

And add coco to an element:

document.querySelector('.3dCSS').coco();

Rotate by dragging, move with arrow keys.

Disable default controls

document.querySelector('.3dCSS').coco(false);

Move the camera

var scene = document.querySelector('.3dCSS').coco();
scene.camera(x, y, z);

Multiple elements (grouped coco)

document.querySelectorAll('.3dCSS, .3dPlane').coco();

Examples

Check out this collection on Codepen.

Package Sidebar

Install

npm i cocobean

Weekly Downloads

3

Version

0.2.5

License

MIT

Unpacked Size

14.4 kB

Total Files

7

Last publish

Collaborators

  • benhatsor