2.6.23 • Published 7 years ago

react-cubeview v2.6.23

Weekly downloads
181
License
-
Repository
github
Last release
7 years ago

react-cubeview

3D camera controller - based on autodesk's Fusion360 cube view

alt text

UI Reference

This UI Component is based on Autodesk's Cube view controller from Fusion360 (and many other Autodesk Solutions like ecad.io):

original cube

Details

This component uses a 'hacked' version of the three.js orbit controls. I just added few methods to make the callbacks simpler.

Demo & Examples

Live demo: lucascassiano.github.io/react-cubeview

To build the examples (storyboard) locally, run:

npm install
npm start

Then open localhost:6060 in a browser.

Installation

npm install react-cubeview --save

Usage

import CubeView from 'react-cubeview';
//optional css file
import 'react-cubeview/lib/css/react-cubeview.css';

//render()...

<CubeView 
    aspect={1} 
    hoverColor={0x0088FF} 
    cubeSize={2} 
    zoom={6} 
    antialias={true} 
    onUpdateAngles={this.updateAngles} 
/>

Callback - onUpdateAngles

function myCustomCallback(phi, theta){
    //...
    update main camera
    //...
}

Notes

TODO

  • Add controls for 90º rotations
  • Improve OrbitControls.js

License

MIT

Copyright (c) 2017 lucascassiano.

2.6.23

7 years ago

2.6.22

7 years ago

2.6.21

7 years ago

2.6.20

7 years ago

2.6.19

7 years ago

2.6.18

7 years ago

2.6.17

7 years ago

2.6.16

7 years ago

2.6.15

7 years ago

2.6.14

7 years ago

2.6.13

7 years ago

2.6.12

7 years ago

2.6.11

7 years ago

2.6.10

7 years ago

2.6.9

7 years ago

2.6.8

7 years ago

2.6.7

7 years ago

2.6.6

7 years ago

2.6.5

7 years ago

2.6.4

7 years ago

2.6.3

7 years ago

2.6.2

7 years ago

2.6.0

7 years ago

2.5.9

7 years ago

2.5.8

8 years ago

2.5.7

8 years ago

2.5.6

8 years ago

2.5.5

8 years ago

2.5.3

8 years ago

2.5.2

8 years ago

2.5.1

8 years ago

2.5.0

8 years ago

2.4.9

8 years ago

2.4.8

8 years ago

2.4.7

8 years ago

2.4.6

8 years ago

2.4.5

8 years ago

2.4.4

8 years ago

2.4.3

8 years ago

2.4.2

8 years ago

2.4.1

8 years ago

2.4.0

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago

1.5.6

8 years ago

1.5.5

8 years ago

1.5.4

8 years ago

1.5.3

8 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago