2.6.23 • Published 6 years ago

react-cubeview v2.6.23

Weekly downloads
181
License
-
Repository
github
Last release
6 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

6 years ago

2.6.22

6 years ago

2.6.21

6 years ago

2.6.20

6 years ago

2.6.19

6 years ago

2.6.18

6 years ago

2.6.17

6 years ago

2.6.16

6 years ago

2.6.15

6 years ago

2.6.14

6 years ago

2.6.13

6 years ago

2.6.12

6 years ago

2.6.11

6 years ago

2.6.10

6 years ago

2.6.9

6 years ago

2.6.8

6 years ago

2.6.7

6 years ago

2.6.6

6 years ago

2.6.5

6 years ago

2.6.4

6 years ago

2.6.3

6 years ago

2.6.2

6 years ago

2.6.0

6 years ago

2.5.9

6 years ago

2.5.8

7 years ago

2.5.7

7 years ago

2.5.6

7 years ago

2.5.5

7 years ago

2.5.3

7 years ago

2.5.2

7 years ago

2.5.1

7 years ago

2.5.0

7 years ago

2.4.9

7 years ago

2.4.8

7 years ago

2.4.7

7 years ago

2.4.6

7 years ago

2.4.5

7 years ago

2.4.4

7 years ago

2.4.3

7 years ago

2.4.2

7 years ago

2.4.1

7 years ago

2.4.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.5.6

7 years ago

1.5.5

7 years ago

1.5.4

7 years ago

1.5.3

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago