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
e6d3d2e3
Commit
e6d3d2e3
authored
Jul 25, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+background later init
parent
90acde40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
16 deletions
+64
-16
ui_init.js
js/ui_init.js
+63
-16
x3dom_init.js
js/x3dom_init.js
+1
-0
No files found.
js/ui_init.js
View file @
e6d3d2e3
...
...
@@ -61,8 +61,7 @@ var SETTINGS = {
'edit'
:
false
,
'files'
:
{
'x3d'
:
""
,
'x3d_background'
:
""
,
'kml'
:
""
,
'kml'
:
""
}
// 'kml' : "scene.kml"
}
...
...
@@ -109,7 +108,6 @@ $(function(){
parseURL
();
SETTINGS
.
files
.
x3d
=
SETTINGS
.
basepath
+
"/"
+
SETTINGS
.
path
+
"/"
+
SETTINGS
.
version
+
"/"
+
SETTINGS
.
path
+
".x3d"
;
SETTINGS
.
files
.
x3d_background
=
SETTINGS
.
basepath
+
"/"
+
SETTINGS
.
path
+
"/"
+
SETTINGS
.
version
+
"/"
+
SETTINGS
.
path
+
"-texture-bgnd-ext.jpeg"
;
// always reload kml
SETTINGS
.
files
.
kml
=
SETTINGS
.
basepath
+
"/"
+
SETTINGS
.
path
+
"/"
+
SETTINGS
.
path
+
".kml"
;
...
...
@@ -144,17 +142,31 @@ function title_init(){
}
function
light_init
(){
function
background_check
(){
var
mback
=
$
(
"#x3d_id"
).
find
(
"scene"
).
find
(
"Background"
);
return
(
mback
.
length
>
0
);
}
function
background_init
(){
var
x3delement
=
$
(
"#x3d_id"
).
find
(
"scene"
);
//var model_back_url = SETTINGS.files.x3d_background;
var
model_back_url
=
""
;
var
model_url
=
SETTINGS
.
files
.
x3d
;
var
model_back_url
=
SETTINGS
.
files
.
x3d_background
;
var
mback
=
$
(
"#x3d_id"
).
find
(
"scene"
).
find
(
"Background"
);
if
(
mback
.
length
>
0
){
frontUrl
=
mback
.
attr
(
'frontUrl'
);
if
(
frontUrl
.
length
!=
0
){
model_back_url
=
SETTINGS
.
basepath
+
"/"
+
SETTINGS
.
path
+
"/"
+
SETTINGS
.
version
+
"/"
+
frontUrl
;
}
}
if
(
model_back_url
!=
""
){
mback
.
remove
();
var
model
=
$
([
'<group>'
,
' <inline name="mymodel" namespacename="mymodel" url="'
+
model_url
+
'"></inline>'
,
'</group>'
,
'<group>'
,
' <Background '
,
' id="Background"'
,
...
...
@@ -170,6 +182,29 @@ function light_init(){
].
join
(
'
\
n'
));
x3delement
.
append
(
model
);
//set sensitivity
}
else
{
$
(
"#shiftspeed"
).
val
(
0.0005
);
$
(
"#shiftspeed"
).
change
();
}
}
function
light_init
(){
var
x3delement
=
$
(
"#x3d_id"
).
find
(
"scene"
);
var
model_url
=
SETTINGS
.
files
.
x3d
;
var
model_back_url
=
SETTINGS
.
files
.
x3d_background
;
var
model
=
$
([
'<group>'
,
' <inline name="mymodel" namespacename="mymodel" url="'
+
model_url
+
'"></inline>'
,
'</group>'
].
join
(
'
\
n'
));
x3delement
.
append
(
model
);
$
.
ajax
({
url
:
SETTINGS
.
files
.
kml
+
"?"
+
Date
.
now
(),
...
...
@@ -225,6 +260,7 @@ function light_init(){
map_resize_init
();
deep_init
();
//align_init();
x3d_initial_camera_placement
();
Scene
.
resize
();
...
...
@@ -357,6 +393,17 @@ function deep_init(){
progress_counter
=
progress_counter
.
split
(
" "
);
cnt
=
parseInt
(
progress_counter
[
1
]);
if
(
!
Scene
.
_X3DOM_SCENE_INIT_BACK_DONE
){
//console.log(cnt+" "+background_check());
var
bc
=
background_check
();
if
(
bc
){
background_init
();
Scene
.
_X3DOM_SCENE_INIT_BACK_DONE
=
true
;
}
}
if
(
!
Scene
.
_X3DOM_SCENE_INIT_DONE
&&
(
cnt
==
0
)){
//Scene.initResize();
...
...
@@ -365,7 +412,7 @@ function deep_init(){
Scene
.
ShapeEvents
();
Scene
.
_X3DOM_SCENE_INIT_DONE
=
true
;
Scene
.
_X3DOM_SCENE_INIT_BACK_DONE
=
true
;
}
};
...
...
js/x3dom_init.js
View file @
e6d3d2e3
...
...
@@ -62,6 +62,7 @@ var X3DOMObject = function(element,data,options){
this
.
old_view_translation
=
null
;
// status vars
this
.
_X3DOM_SCENE_INIT_BACK_DONE
=
false
;
this
.
_X3DOM_SCENE_INIT_DONE
=
false
;
this
.
_ctrlKey
=
false
;
this
.
_shiftKey
=
false
;
...
...
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