Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Amanda Ghassaei
AMOEBA
Commits
bdc9bb4f
Commit
bdc9bb4f
authored
Jun 27, 2016
by
amandaghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save last orientation
parent
aef0ae09
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
js/highlighter/Highlighter.js
js/highlighter/Highlighter.js
+1
-1
js/lattice/LatticeBase.js
js/lattice/LatticeBase.js
+3
-1
js/menus/contextMenu/CellContextMenu.js
js/menus/contextMenu/CellContextMenu.js
+1
-0
js/models/AppState.js
js/models/AppState.js
+1
-0
No files found.
js/highlighter/Highlighter.js
View file @
bdc9bb4f
...
...
@@ -218,7 +218,7 @@ define(['underscore', 'backbone', 'threeModel', 'appState', 'lattice', 'cell', '
}
if
(
shouldAdd
){
if
(
!
this
.
isVisible
()
||
!
this
.
highlightedObject
)
return
;
lattice
.
addCellAtIndex
(
this
.
_getNextCellIndex
());
lattice
.
addCellAtIndex
(
this
.
_getNextCellIndex
()
,
{
quaternion
:
appState
.
get
(
"
currentDesignOrientation
"
)}
);
}
else
{
if
(
!
this
.
highlightedObject
)
return
;
if
(
!
(
this
.
highlightedObject
instanceof
DMACell
))
return
;
...
...
js/lattice/LatticeBase.js
View file @
bdc9bb4f
...
...
@@ -96,6 +96,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
for
(
var
y
=
range
.
min
.
y
;
y
<=
range
.
max
.
y
;
y
++
){
for
(
var
z
=
range
.
min
.
z
;
z
<=
range
.
max
.
z
;
z
++
){
var
index
=
new
THREE
.
Vector3
(
x
,
y
,
z
);
var
quaternion
=
null
;
if
(
clone
){
var
relIndex
=
index
.
clone
().
sub
(
range
.
min
);
var
cloneSize
=
clone
.
get
(
"
size
"
);
...
...
@@ -105,8 +106,9 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
var
cell
=
clone
.
cellAtIndex
(
relIndex
);
if
(
!
cell
)
continue
;
materialID
=
cell
.
getMaterialID
();
quaternion
=
cell
.
getOrientation
();
}
this
.
_addCellAtIndex
(
index
,
{
materialID
:
materialID
},
true
);
this
.
_addCellAtIndex
(
index
,
{
materialID
:
materialID
,
quaternion
:
quaternion
},
true
);
}
}
}
...
...
js/menus/contextMenu/CellContextMenu.js
View file @
bdc9bb4f
...
...
@@ -65,6 +65,7 @@ define(['jquery', 'underscore', 'backbone', 'text!menus/contextMenu/CellContextM
else
if
(
axis
==
"
z
"
)
this
.
cell
.
rotateZ
();
else
console
.
warn
(
"
unknown axis
"
+
axis
);
cellAxesVis
.
setRotation
(
this
.
cell
.
getRotation
());
appState
.
set
(
"
currentDesignOrientation
"
,
this
.
cell
.
getOrientation
());
three
.
render
();
},
...
...
js/models/AppState.js
View file @
bdc9bb4f
...
...
@@ -34,6 +34,7 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'materialsPlis
deleteMode
:
false
,
extrudeMode
:
false
,
cellMode
:
"
cell
"
,
//cell, hide
currentDesignOrientation
:
null
,
//current rotation set for placing parts
realisticColorScheme
:
false
,
materialType
:
null
,
...
...
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