Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
freecad_x3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
freecad_x3d
Commits
1f976f01
Commit
1f976f01
authored
Dec 20, 2015
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.colors 2.fov
parent
cabf5ac7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
viewmodel.css
x3d_web_viewer/viewmodel.css
+4
-0
viewmodel.js
x3d_web_viewer/viewmodel.js
+19
-3
No files found.
x3d_web_viewer/viewmodel.css
View file @
1f976f01
...
@@ -78,3 +78,7 @@ body{
...
@@ -78,3 +78,7 @@ body{
bottom
:
1px
;
bottom
:
1px
;
left
:
1px
;
left
:
1px
;
}
}
.btn-odd-success
{
background
:
rgba
(
90
,
150
,
90
,
1
);
}
\ No newline at end of file
x3d_web_viewer/viewmodel.js
View file @
1f976f01
...
@@ -348,7 +348,7 @@ function place_camera(){
...
@@ -348,7 +348,7 @@ function place_camera(){
console
.
log
(
"field of view is "
+
fov
);
console
.
log
(
"field of view is "
+
fov
);
//(top_bboxsize[1]/2) / l = tg a/2
//(top_bboxsize[1]/2) / l = tg a/2
fov
=
fov
*
0.
75
;
fov
=
fov
*
0.
9
;
var
phi
=
-
0.7
;
var
phi
=
-
0.7
;
var
boxsize
;
var
boxsize
;
...
@@ -424,20 +424,36 @@ function showBOM(){
...
@@ -424,20 +424,36 @@ function showBOM(){
parts_unique
.
find
(
"Material"
).
attr
(
"transparency"
,
0.1
);
parts_unique
.
find
(
"Material"
).
attr
(
"transparency"
,
0.1
);
parts_unique
.
find
(
"Material"
).
prop
(
"transparency"
,
0.1
);
parts_unique
.
find
(
"Material"
).
prop
(
"transparency"
,
0.1
);
var
prev_nsn_group
=
""
;
var
odd_group_en
=
false
;
parts_unique
.
each
(
function
(
i
){
parts_unique
.
each
(
function
(
i
){
var
part
=
$
(
this
);
var
part
=
$
(
this
);
var
tmp_nsn
=
this
.
getAttribute
(
"nameSpaceName"
);
var
tmp_nsn
=
this
.
getAttribute
(
"nameSpaceName"
);
tmp_nsn_arr
=
tmp_nsn
.
split
(
"-"
);
tmp_nsn_group
=
tmp_nsn_arr
[
0
]
+
"-"
+
tmp_nsn_arr
[
1
];
if
(
prev_nsn_group
==
""
)
prev_nsn_group
=
tmp_nsn_group
;
if
(
prev_nsn_group
!=
tmp_nsn_group
)
odd_group_en
=!
odd_group_en
;
//find secondary appearances
//find secondary appearances
if
(
odd_group_en
){
odd_group
=
"btn-odd-success"
;
}
else
{
odd_group
=
""
;
}
var
sublist
=
top
.
find
(
"[USE="
+
tmp_nsn
+
"]"
);
var
sublist
=
top
.
find
(
"[USE="
+
tmp_nsn
+
"]"
);
var
ele_sublist
=
""
;
var
ele_sublist
=
""
;
var
btn_subpart
=
false
;
var
btn_subpart
=
false
;
ele_ul
=
$
(
"<ul>"
,{
class
:
"dropdown-menu"
,
"data-toggle"
:
"dropdown"
}).
css
({
padding
:
"10px"
,
"min-width"
:
"100px"
,
border
:
"1px solid rgba(50,50,50,0.5)"
});
ele_ul
=
$
(
"<ul>"
,{
class
:
"dropdown-menu"
,
"data-toggle"
:
"dropdown"
}).
css
({
padding
:
"10px"
,
"min-width"
:
"100px"
,
border
:
"1px solid rgba(50,50,50,0.5)"
});
btn_part
=
$
(
"<button>"
,{
class
:
"btn-part btn btn-default btn-sm btn-success
"
}).
css
({
"min-width"
:
"100px"
}).
html
(
tmp_nsn
);
btn_part
=
$
(
"<button>"
,{
class
:
"btn-part btn btn-default btn-sm btn-success
"
+
odd_group
}).
css
({
"min-width"
:
"100px"
}).
html
(
tmp_nsn
);
btn_part
.
attr
(
"nsn"
,
tmp_nsn
);
btn_part
.
attr
(
"nsn"
,
tmp_nsn
);
btn_part
.
attr
(
"state"
,
"normal"
);
btn_part
.
attr
(
"state"
,
"normal"
);
prev_nsn_group
=
tmp_nsn_group
;
ele_sublist
=
$
(
"<div>"
,{
class
:
"btn-group"
}).
append
(
btn_part
).
append
(
ele_sublist
=
$
(
"<div>"
,{
class
:
"btn-group"
}).
append
(
btn_part
).
append
(
$
(
"<button>"
,{
class
:
"dropdown-toggle btn btn-default btn-sm nooutline"
,
$
(
"<button>"
,{
class
:
"dropdown-toggle btn btn-default btn-sm nooutline"
,
"data-toggle"
:
"dropdown"
,
"data-toggle"
:
"dropdown"
,
...
...
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