Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WebARforCIFT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Manuel Amesberger
WebARforCIFT
Commits
ae57fa35
Commit
ae57fa35
authored
5 years ago
by
Manuel Amesberger
Browse files
Options
Downloads
Patches
Plain Diff
Added folder to gui
parent
8fe9ea89
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
www/WebDevPlayground/three.js/examples/ARforCIFT.js
+13
-8
13 additions, 8 deletions
www/WebDevPlayground/three.js/examples/ARforCIFT.js
with
13 additions
and
8 deletions
www/WebDevPlayground/three.js/examples/ARforCIFT.js
+
13
−
8
View file @
ae57fa35
...
...
@@ -19,6 +19,9 @@
var
maxRange
=
4.0
;
var
minRange
=
0.0
;
var
minColor
=
'
red
'
;
var
maxColor
=
'
blue
'
;
// ====Default sizes for non depictable arrows ======
var
nonArrowLength
=
0.1
;
var
nonArrowHeadLength
=
0.05
;
...
...
@@ -260,12 +263,12 @@
// look up if the length is exceedes the set limits and set arrow to specific color and shape
if
(
vecLength
>
arrowMaxLength
){
vectorlist
[
i
].
arrow
.
setLength
(
nonArrowLength
,
nonArrowHeadLength
,
nonArrowHeadWidth
)
vectorlist
[
i
].
arrow
.
setColor
(
new
THREE
.
Color
(
0
,
0
,
1
));
vectorlist
[
i
].
arrow
.
setColor
(
new
THREE
.
Color
(
maxColor
));
};
if
(
vecLength
<
arrowMinLength
){
vectorlist
[
i
].
arrow
.
setLength
(
nonArrowLength
,
nonArrowHeadLength
,
nonArrowHeadWidth
)
vectorlist
[
i
].
arrow
.
setColor
(
new
THREE
.
Color
(
1
,
0
,
0
));
vectorlist
[
i
].
arrow
.
setColor
(
new
THREE
.
Color
(
minColor
));
}
};
// set not needed arrowHelper objects invisible
...
...
@@ -299,18 +302,20 @@
onRenderFcts
.
push
(
function
(){
renderer
.
render
(
scene
,
camera
);
})
},
5
00
);
},
10
00
);
scene
.
add
(
vectorfield
)
//==================================GUI=============================================
var
gui
=
new
dat
.
GUI
();
gui
.
add
(
controls
,
'
offsetX
'
,
offsetXmin
,
offsetXmax
);
gui
.
add
(
controls
,
'
offsetY
'
,
offsetYmin
,
offsetYmax
);
gui
.
add
(
controls
,
'
offsetZ
'
,
offsetZmin
,
offsetZmax
);
gui
.
add
(
controls
,
'
arrowMaxLength
'
,
minRange
,
maxRange
);
gui
.
add
(
controls
,
'
arrowMinLength
'
,
minRange
,
maxRange
);
var
f1
=
gui
.
addFolder
(
'
Transformation
'
);
var
f2
=
gui
.
addFolder
(
'
Max and min length control
'
)
f1
.
add
(
controls
,
'
offsetX
'
,
offsetXmin
,
offsetXmax
);
f1
.
add
(
controls
,
'
offsetY
'
,
offsetYmin
,
offsetYmax
);
f1
.
add
(
controls
,
'
offsetZ
'
,
offsetZmin
,
offsetZmax
);
f2
.
add
(
controls
,
'
arrowMaxLength
'
,
minRange
,
maxRange
);
f2
.
add
(
controls
,
'
arrowMinLength
'
,
minRange
,
maxRange
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment