Socket
Socket
Sign inDemoInstall

css3d

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    css3d

Wrapper around three.js CSS3D render + tween.js


Version published
Maintainers
1
Install size
419 kB
Created

Readme

Source

css3d

Wrapper around three.js + CSS3D Renderer + tween.js.

Allows you to easily require all three libraries together with CommonJS or include in your html file as a script tag. The exported class has all the properties of three.js, CSS3D Renderer, and tween.js.

eg:

var CSS3D = require('css3d');

// use three.js
var camera = new CSS3D.PerspectiveCamera(
  75, window.innerWidth / window.innerHeight, 1, 5000
);

// use css3d renderer
var element = document.createElement('div');
var object = new CSS3D.CSS3DObject(element);

// use tween
new CSS3D.TWEEN.Tween(object.position)
  .to({ y: Math.random() * 2000 - 1000 }, 2000)
  .easing(CSS3D.TWEEN.Easing.Exponential.Out)
  .start();

or

<html>
  <head>
    <title>CSS3D</title>
  </head>
  <body>
    <div id="container"></div>
    <script type="text/javascript" src="css3d.js"></script>
    <script type="text/javascript">
      var element = document.createElement('div');
      var object = new CSS3D.CSS3DObject(element);
      // ..
    </script>
  </body>
</html>

FAQs

Last updated on 24 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc