Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PAnTHer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puma
client
PAnTHer
Commits
cf24ebd9
Commit
cf24ebd9
authored
10 months ago
by
Lucio Zambon
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
7f5e84f1
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
components/src/sip.js
+61
-0
61 additions, 0 deletions
components/src/sip.js
with
61 additions
and
0 deletions
components/src/sip.js
0 → 100644
+
61
−
0
View file @
cf24ebd9
// jshint esversion: 6
import
*
as
THREE
from
'
three
'
;
export
function
sip
(
param
)
{
const
sipContiner
=
new
THREE
.
Object3D
();
const
sipObject
=
new
THREE
.
Object3D
();
//cylinder
const
cylgeometry
=
new
THREE
.
CylinderGeometry
(
25
,
25
,
50
,
15
);
const
cylmaterial
=
new
THREE
.
MeshLambertMaterial
({
color
:
0xc7c7c7
});
const
cylmesh
=
new
THREE
.
Mesh
(
cylgeometry
,
cylmaterial
);
cylmesh
.
rotateX
(
Math
.
PI
*
1
);
cylmesh
.
rotateY
(
Math
.
PI
*
1.0
);
cylmesh
.
rotateZ
(
Math
.
PI
*
1.5
);
cylmesh
.
position
.
set
(
0
,
0
,
0
);
sipObject
.
add
(
cylmesh
);
// connect
const
vlvgeometry
=
new
THREE
.
BoxGeometry
(
30
,
50
,
30
);
const
vlv1mesh
=
new
THREE
.
Mesh
(
vlvgeometry
,
cylmaterial
);
vlv1mesh
.
position
.
set
(
0
,
-
30
,
0
);
sipObject
.
add
(
vlv1mesh
);
// box
const
boxmaterial
=
new
THREE
.
MeshLambertMaterial
({
color
:
0xb6b6b6
});
const
boxgeometry
=
new
THREE
.
BoxGeometry
(
60
,
80
,
120
);
const
boxmesh
=
new
THREE
.
Mesh
(
boxgeometry
,
boxmaterial
);
boxmesh
.
position
.
set
(
0
,
-
90
,
0
);
sipObject
.
add
(
boxmesh
);
// blackbox1
const
bb1material
=
new
THREE
.
MeshLambertMaterial
({
color
:
0x000000
});
const
bb1geometry
=
new
THREE
.
BoxGeometry
(
60
,
80
,
10
);
const
bb1mesh
=
new
THREE
.
Mesh
(
bb1geometry
,
bb1material
);
bb1mesh
.
position
.
set
(
0
,
-
90
,
-
65
);
sipObject
.
add
(
bb1mesh
);
// blackbox2
const
bb2geometry
=
new
THREE
.
BoxGeometry
(
60
,
80
,
10
);
const
bb2mesh
=
new
THREE
.
Mesh
(
bb2geometry
,
bb1material
);
bb2mesh
.
position
.
set
(
0
,
-
90
,
65
);
sipObject
.
add
(
bb2mesh
);
// border
const
bordergeometry
=
new
THREE
.
BoxGeometry
(
61
,
81
,
1
);
const
bordermesh
=
new
THREE
.
Mesh
(
bordergeometry
,
bb1material
);
bordermesh
.
position
.
set
(
0
,
-
90
,
0
);
sipObject
.
add
(
bordermesh
);
sipObject
.
scale
.
setX
(
1
);
sipObject
.
scale
.
setY
(
1
);
sipObject
.
scale
.
setZ
(
1
);
sipObject
.
position
.
set
(
0
,
0
,
0
);
sipContiner
.
add
(
sipObject
);
sipContiner
.
rotateY
(
Math
.
PI
*
-
1
);
return
sipContiner
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
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