Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
34b36bb5
Commit
34b36bb5
authored
Sep 01, 2020
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
w/h more proper resizing
parent
b1d70d8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
x3dom_init.js
js/x3dom_init.js
+4
-4
No files found.
js/x3dom_init.js
View file @
34b36bb5
...
@@ -43,7 +43,7 @@ var X3DOMObject = function(element,data,options){
...
@@ -43,7 +43,7 @@ var X3DOMObject = function(element,data,options){
var
defaults
=
{
var
defaults
=
{
debug
:
true
,
// {boot}, unused
debug
:
true
,
// {boot}, unused
highlight
:
true
,
// {bool}, highlight surfaces on mouseover
highlight
:
true
,
// {bool}, highlight surfaces on mouseover
fov
:
30
*
Math
.
PI
/
180
,
// {rad}, default vertic
al fov
fov
:
55
*
Math
.
PI
/
180
,
// {rad}, default horizont
al fov
fov_step
:
0.025
,
// {rad}, min change
fov_step
:
0.025
,
// {rad}, min change
};
};
...
@@ -119,15 +119,15 @@ X3DOMObject.prototype.resize = function(){
...
@@ -119,15 +119,15 @@ X3DOMObject.prototype.resize = function(){
//var fov = w/h*self._FOV;
//var fov = w/h*self._FOV;
// default vertical FoV is 30 degs, we would like to fit in the window
// default vertical FoV is 30 degs, we would like to fit in the window
// the model w/h ratio is 2592/1904
// the model w/h ratio is 2592/1904
var
fov
=
1.8
*
self
.
_FOV
;
var
fov
=
self
.
_FOV
;
var
K_model
=
2592
/
1904
;
var
K_model
=
2592
/
1904
;
var
K_window
=
w
/
h
;
var
K_window
=
w
/
h
;
// window is really wide - fit the height
// window is really wide - fit the height
if
(
K_window
>
K_model
){
if
(
K_window
>
K_model
){
fov
=
1.8
*
self
.
_FOV
;
fov
=
self
.
_FOV
;
}
else
{
}
else
{
fov
=
(
4.2
-
1.8
*
K_window
)
*
self
.
_FOV
;
fov
=
K_model
/
K_window
*
self
.
_FOV
;
}
}
//fov = Math.PI/2;
//fov = Math.PI/2;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment