Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DMDesign
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amanda Ghassaei
DMDesign
Commits
08439b51
Commit
08439b51
authored
May 22, 2015
by
Amanda Ghassaei
Browse files
Options
Downloads
Patches
Plain Diff
eod
parent
883b5099
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/fea/DmaCellOther.js
+2
-6
2 additions, 6 deletions
js/fea/DmaCellOther.js
js/fea/DmaPart.js
+17
-0
17 additions, 0 deletions
js/fea/DmaPart.js
js/models/ThreeModel.js
+1
-1
1 addition, 1 deletion
js/models/ThreeModel.js
with
20 additions
and
7 deletions
js/fea/DmaCellOther.js
+
2
−
6
View file @
08439b51
...
...
@@ -96,7 +96,8 @@ var cellMaterial = [new THREE.MeshNormalMaterial()];
return
this
.
superCell
.
getMaterialType
();
};
DMAGIKCell
.
prototype
.
__initParts
=
function
(){
DMAGIKCell
.
prototype
.
_initParts
=
function
(){
if
(
!
this
.
superCell
)
return
[];
var
parts
=
[];
var
isEnd
=
this
.
superCellIndex
==
0
||
this
.
superCellIndex
==
this
.
superCell
.
getLength
();
if
(
dmaGlobals
.
lattice
.
get
(
"
partType
"
)
==
"
lego
"
)
{
...
...
@@ -110,11 +111,6 @@ var cellMaterial = [new THREE.MeshNormalMaterial()];
return
parts
;
};
DMAGIKCell
.
prototype
.
_initParts
=
function
(){
if
(
this
.
superCell
)
return
this
.
__initParts
();
return
[];
};
self
.
DMAGIKCell
=
DMAGIKCell
;
})();
...
...
This diff is collapsed.
Click to expand it.
js/fea/DmaPart.js
+
17
−
0
View file @
08439b51
...
...
@@ -229,6 +229,7 @@ var partMaterial = new THREE.MeshLambertMaterial({ color:0xffffff, shading: THRE
var
unitScale
=
1
/
(
1.2699999809265137
);
unitPartGeo
.
applyMatrix
(
new
THREE
.
Matrix4
().
makeRotationX
(
Math
.
PI
/
2
));
unitPartGeo
.
applyMatrix
(
new
THREE
.
Matrix4
().
makeScale
(
unitScale
,
unitScale
,
unitScale
));
console
.
log
(
unitPartGeo
);
});
function
DMAGIKPart
(
type
,
parent
){
...
...
@@ -236,9 +237,25 @@ var partMaterial = new THREE.MeshLambertMaterial({ color:0xffffff, shading: THRE
}
DMAGIKPart
.
prototype
=
Object
.
create
(
DMAPart
.
prototype
);
DMAGIKPart
.
prototype
.
_makeGikWireframe
=
function
(
positions
,
yPosition
){
var
geometry
=
new
THREE
.
Geometry
();
_
.
each
(
positions
,
function
(
position
,
index
){
if
(
position
==
yPosition
){
geometry
.
vertices
.
push
(
new
THREE
.
Vector3
(
positions
[
index
-
1
],
yPosition
,
positions
[
index
+
1
]));
}
});
console
.
log
(
geometry
.
vertices
);
return
new
THREE
.
Line
(
geometry
);
};
DMAGIKPart
.
prototype
.
_makeMeshForType
=
function
(){
var
mesh
=
new
THREE
.
Mesh
(
unitPartGeo
,
this
.
parentCell
.
getMaterialType
());
mesh
.
myPart
=
this
;
//need a ref back to this part
var
wireframe
=
new
THREE
.
EdgesHelper
(
mesh
,
0x000000
);
mesh
.
children
.
push
(
wireframe
);
return
mesh
;
};
...
...
This diff is collapsed.
Click to expand it.
js/models/ThreeModel.js
+
1
−
1
View file @
08439b51
...
...
@@ -5,7 +5,7 @@
function
ThreeModel
(){
var
camera
=
new
THREE
.
PerspectiveCamera
(
60
,
window
.
innerWidth
/
window
.
innerHeight
,
0.00
1
,
10000
);
var
camera
=
new
THREE
.
PerspectiveCamera
(
60
,
window
.
innerWidth
/
window
.
innerHeight
,
1
,
10000
);
var
scene
=
new
THREE
.
Scene
();
var
renderer
=
new
THREE
.
WebGLRenderer
({
antialias
:
true
});
//antialiasing is not supported in ff and on mac+chrome
...
...
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
sign in
to comment