three-web-components
three-web-components copied to clipboard
Create ‹three-camera› element
Features
- [x] Perspective camera, with user defined and default options
DONE21.02 - [x] Orthographic camera with user defined and default options
DONE22.02 - [x] Register/deregister with parent ‹three-app› element
DONE21.02 - [x] Dispose used resources (THREE Camera, controllers) when disconnect
DONE21.02+27.02 - [x] Have parent ‹three-app› element define frustum aspect ratio (on init and resize)
DONE21.02 - [x] Specification of active camera on parent ‹three-app› element
DONE21.02 - [x] Active camera on parent ‹three-app› element defaults to first ‹three-camera›
DONE21.02 - [x] Define position and direction of camera
DONE22.02 - [x] Define view frustum of camera
DONE21.02 - [x] Define zoom of camera
DONE27.02 - [ ] Handle dynamic addition and removal from DOM
STAGINGalmost done, still a bug on setting frustum aspect ratio upon addition
Sample code
<three-app fps="10">
<three-camera id="camera01" type="perspective" helper="true"></three-camera>
</three-app>
<three-app fps="10" camera="camera01">
<three-camera id="camera01" type="perspective" helper="true"></three-camera>
<three-camera id="camera02" type="perspective" helper="true"></three-camera>
</three-app>
Blocks
- #7 Create ‹three-camera› OSC controller
- #8 Create ‹three-camera› Orbitter controller