Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/unconed/threestrap
Browse files Browse the repository at this point in the history
  • Loading branch information
unconed committed Sep 17, 2014
2 parents d77b8f6 + a38df66 commit e0c62d1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
41 changes: 30 additions & 11 deletions docs/extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ three.VR.renderer // VRRenderer instance
three.VR.state // Last sensor state
```

* Events

```javascript
// VR mode was activated / deactivated
three.on('vr', function (event, three) {
// event ==
{
active: true,
//active: false,
hmd: ...
sensor: ...
}
}
```
fullscreen
---
Supports going fullscreen via an API or a keypress. Integrates with `vr` if present.
Expand All @@ -40,7 +55,7 @@ Supports going fullscreen via an API or a keypress. Integrates with `vr` if pres
```javascript
{
key: null, // Keyboard letter to toggle fullscreen mode with (e.g. 'f')
key: 'f', // Keyboard letter to toggle fullscreen mode with (e.g. 'f') or 'null' to disable
}
```
Expand Down Expand Up @@ -78,16 +93,20 @@ Minimal UI for fullscreen / VR mode.
* Options:
```javascript
{
// Container style
layout: 'position: absolute; bottom: 5px; right: 5px; float: left;',

// Injected CSS
style: '.threestrap-ui button { border: 0; background: none; color: #fff;'+
' text-shadow: 0 1px 1px rgba(0, 0, 0, 1), 0 1px 3px rgba(0, 0, 0, 1);'+
' vertical-align: middle; font-size: 85%; font-weight: bold; } '+
'.threestrap-ui .glyphicon { top: 2px; font-weight: bold; } '+
'@media (max-width: 640px) { .threestrap-ui button { font-size: 120% } }'
},
// Class (white / black)
theme: 'white',
// Injected CSS.
style: '.threestrap-ui { position: absolute; bottom: 5px; right: 5px; float: left; }'+
'.threestrap-ui button { border: 0; background: none;'+
' vertical-align: middle; font-weight: bold; } '+
'.threestrap-ui .glyphicon { top: 2px; font-weight: bold; } '+
'@media (max-width: 640px) { .threestrap-ui button { font-size: 120% } }'+
'.threestrap-white button { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 1), '+
'0 1px 3px rgba(0, 0, 0, 1); }'+
'.threestrap-black button { color: #000; text-shadow: 0 0px 1px rgba(255, 255, 255, 1), '+
'0 0px 2px rgba(255, 255, 255, 1), '+
'0 0px 2px rgba(255, 255, 255, 1) }'
}
```
stats
Expand Down
2 changes: 1 addition & 1 deletion examples/vr.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var three = THREE.Bootstrap({
plugins: ['VR', 'ui', 'controls'],
// Equivalent to:
// plugins: ['core', 'cursor', 'fullscreen', 'render:vr', 'ui']
// plugins: ['core', 'cursor', 'fullscreen', 'render:vr', 'ui', 'controls']
controls: {
klass: THREE.VRControls,
},
Expand Down

0 comments on commit e0c62d1

Please sign in to comment.