Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OrigamiSimulator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
b66aa0c3
Commit
b66aa0c3
authored
Oct 02, 2017
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user interaction fixes
parent
c635e189
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
13 deletions
+8
-13
js/3dUI.js
js/3dUI.js
+4
-4
js/VRInterface.js
js/VRInterface.js
+4
-4
js/model.js
js/model.js
+0
-5
No files found.
js/3dUI.js
View file @
b66aa0c3
...
...
@@ -100,11 +100,11 @@ function init3DUI(globals) {
if
(
intersections
.
length
>
0
){
var
face
=
intersections
[
0
].
face
;
var
position
=
intersections
[
0
].
point
;
var
verticesArray
=
globals
.
model
.
getVertices
();
var
positionsArray
=
globals
.
model
.
getPositionsArray
();
var
vertices
=
[];
vertices
.
push
(
verticesArray
[
face
.
a
]
);
vertices
.
push
(
verticesArray
[
face
.
b
]
);
vertices
.
push
(
verticesArray
[
face
.
c
]
);
vertices
.
push
(
new
THREE
.
Vector3
(
positionsArray
[
3
*
face
.
a
],
positionsArray
[
3
*
face
.
a
+
1
],
positionsArray
[
3
*
face
.
a
+
2
])
);
vertices
.
push
(
new
THREE
.
Vector3
(
positionsArray
[
3
*
face
.
b
],
positionsArray
[
3
*
face
.
b
+
1
],
positionsArray
[
3
*
face
.
b
+
2
])
);
vertices
.
push
(
new
THREE
.
Vector3
(
positionsArray
[
3
*
face
.
c
],
positionsArray
[
3
*
face
.
c
+
1
],
positionsArray
[
3
*
face
.
c
+
2
])
);
var
dist
=
vertices
[
0
].
clone
().
sub
(
position
).
lengthSq
();
var
nodeIndex
=
face
.
a
;
for
(
var
i
=
1
;
i
<
3
;
i
++
){
...
...
js/VRInterface.js
View file @
b66aa0c3
...
...
@@ -255,11 +255,11 @@ function initViveInterface(globals){
continue
;
}
var
verticesArray
=
globals
.
model
.
getVertices
();
var
positionsArray
=
globals
.
model
.
getPositionsArray
();
var
vertices
=
[];
vertices
.
push
(
verticesArray
[
face
.
a
]
);
vertices
.
push
(
verticesArray
[
face
.
b
]
);
vertices
.
push
(
verticesArray
[
face
.
c
]
);
vertices
.
push
(
new
THREE
.
Vector3
(
positionsArray
[
3
*
face
.
a
],
positionsArray
[
3
*
face
.
a
+
1
],
positionsArray
[
3
*
face
.
a
+
2
])
);
vertices
.
push
(
new
THREE
.
Vector3
(
positionsArray
[
3
*
face
.
b
],
positionsArray
[
3
*
face
.
b
+
1
],
positionsArray
[
3
*
face
.
b
+
2
])
);
vertices
.
push
(
new
THREE
.
Vector3
(
positionsArray
[
3
*
face
.
c
],
positionsArray
[
3
*
face
.
c
+
1
],
positionsArray
[
3
*
face
.
c
+
2
])
);
var
dist
=
transformToGlobalCoords
(
vertices
[
0
].
clone
()).
sub
(
point
).
lengthSq
();
var
nodeIndex
=
face
.
a
;
for
(
var
j
=
1
;
j
<
3
;
j
++
){
...
...
js/model.js
View file @
b66aa0c3
...
...
@@ -147,10 +147,6 @@ function initModel(globals){
return
[
frontside
,
backside
];
}
function
getVertices
(){
return
vertices
;
}
function
getPositionsArray
(){
return
positions
;
}
...
...
@@ -409,7 +405,6 @@ function initModel(globals){
getFaces
:
getFaces
,
getCreases
:
getCreases
,
getGeometry
:
getGeometry
,
//for save stl
getVertices
:
getVertices
,
//for user interaction, vive interface
getPositionsArray
:
getPositionsArray
,
getColorsArray
:
getColorsArray
,
getMesh
:
getMesh
,
...
...
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