Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ More detailed api documentation pending, for now the below explains about all yo
$('.valiantContainer').Valiant360({
crossOrigin: 'anonymous', // valid keywords: 'anonymous' or 'use-credentials'
clickAndDrag: false, // use click-and-drag camera controls
disableZoom: false // disable zooming on the video
keyboardControls: true, // use keyboard controls (move by arrows)
flatProjection: false, // map image to appear flat (often more distorted)
fov: 35, // initial field of view
Expand Down
5 changes: 5 additions & 0 deletions src/valiant.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ three.js r65 or higher
defaults = {
crossOrigin: 'anonymous',
clickAndDrag: false,
disableZoom: false,
keyboardControls: true,
fov: 35,
fovMin: 3,
Expand Down Expand Up @@ -458,6 +459,10 @@ three.js r65 or higher

var wheelSpeed = -0.01;

if(this.options.disableZoom) {
return;
}

// WebKit
if ( event.wheelDeltaY ) {
this._fov -= event.wheelDeltaY * wheelSpeed;
Expand Down