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
99f549bf
Commit
99f549bf
authored
6 months ago
by
Lucio Zambon
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
2993a379
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/GCOL.js
+105
-0
105 additions, 0 deletions
components/src/GCOL.js
with
105 additions
and
0 deletions
components/src/GCOL.js
0 → 100644
+
105
−
0
View file @
99f549bf
import
*
as
THREE
from
'
three
'
;
// GCOL
export
function
GCOL
(
param
)
{
const
GCOLObject
=
new
THREE
.
Object3D
();
const
GCOLContiner
=
new
THREE
.
Object3D
();
const
materialGrey
=
new
THREE
.
MeshLambertMaterial
({
color
:
0xf0f0f0
});
const
materialDarkGrey
=
new
THREE
.
MeshLambertMaterial
({
color
:
0x8c8c8c
});
const
materialBlack
=
new
THREE
.
MeshLambertMaterial
({
color
:
0x000000
});
// box down
const
orangegeometry
=
new
THREE
.
CylinderGeometry
(
200
,
200
,
300
,
15
);
const
orangegeometrymesh
=
new
THREE
.
Mesh
(
orangegeometry
,
materialGrey
);
orangegeometrymesh
.
position
.
set
(
0
,
-
350
,
0
);
GCOLObject
.
add
(
orangegeometrymesh
);
// box large down
const
blackgeometry
=
new
THREE
.
CylinderGeometry
(
230
,
230
,
50
,
15
);
const
blackgeometrymesh
=
new
THREE
.
Mesh
(
blackgeometry
,
materialGrey
);
blackgeometrymesh
.
position
.
set
(
0
,
-
200
,
0
);
GCOLObject
.
add
(
blackgeometrymesh
);
//base zig
const
d15geometry
=
new
THREE
.
CylinderGeometry
(
60
,
60
,
50
,
25
);
const
d15mesh
=
new
THREE
.
Mesh
(
d15geometry
,
materialGrey
);
d15mesh
.
position
.
set
(
0
,
-
175
,
0
);
d15mesh
.
rotateX
(
Math
.
PI
*
1
);
GCOLObject
.
add
(
d15mesh
);
// zigrinatura
const
d4geometry
=
new
THREE
.
CylinderGeometry
(
60
,
60
,
100
,
15
);
const
textureLoader
=
new
THREE
.
TextureLoader
();
const
texture
=
textureLoader
.
load
(
'
./components/flsc_texture.png
'
);
texture
.
wrapS
=
texture
.
wrapT
=
THREE
.
RepeatWrapping
;
texture
.
repeat
.
set
(
5
,
40
);
const
material
=
new
THREE
.
MeshBasicMaterial
({
map
:
texture
});
const
d4mesh
=
new
THREE
.
Mesh
(
d4geometry
,
material
);
d4mesh
.
rotateX
(
Math
.
PI
*
1
);
d4mesh
.
rotateY
(
Math
.
PI
*
1
);
d4mesh
.
rotateZ
(
Math
.
PI
*
1
);
d4mesh
.
position
.
set
(
0
,
-
100
,
0
);
GCOLObject
.
add
(
d4mesh
);
// up zigrinatura
const
d5geometry
=
new
THREE
.
CylinderGeometry
(
70
,
70
,
50
,
15
);
const
d5mesh
=
new
THREE
.
Mesh
(
d5geometry
,
materialGrey
);
d5mesh
.
rotateX
(
Math
.
PI
*
1
);
d5mesh
.
rotateY
(
Math
.
PI
*
1
);
d5mesh
.
rotateZ
(
Math
.
PI
*
1
);
d5mesh
.
position
.
set
(
0
,
-
30
,
0
);
GCOLObject
.
add
(
d5mesh
);
//cil support1
const
d11geometry
=
new
THREE
.
CylinderGeometry
(
12
,
12
,
250
,
25
);
const
d11mesh
=
new
THREE
.
Mesh
(
d11geometry
,
materialGrey
);
d11mesh
.
position
.
set
(
-
125
,
-
50
,
75
);
GCOLObject
.
add
(
d11mesh
);
//cil support2
const
d12geometry
=
new
THREE
.
CylinderGeometry
(
12
,
12
,
250
,
25
);
const
d12mesh
=
new
THREE
.
Mesh
(
d12geometry
,
materialGrey
);
d12mesh
.
position
.
set
(
125
,
-
50
,
75
);
GCOLObject
.
add
(
d12mesh
);
//cil support3
const
d13geometry
=
new
THREE
.
CylinderGeometry
(
12
,
12
,
250
,
25
);
const
d13mesh
=
new
THREE
.
Mesh
(
d13geometry
,
materialGrey
);
d13mesh
.
position
.
set
(
0
,
-
50
,
-
125
);
GCOLObject
.
add
(
d13mesh
);
//internal block
const
d16geometry
=
new
THREE
.
CylinderGeometry
(
7
,
7
,
260
,
15
);
const
d16mesh
=
new
THREE
.
Mesh
(
d16geometry
,
materialGrey
);
d16mesh
.
position
.
set
(
0
,
-
50
,
0
);
d16mesh
.
rotateX
(
Math
.
PI
*
1
);
GCOLObject
.
add
(
d16mesh
);
//base triengle
const
trienglegeometry
=
new
THREE
.
CylinderGeometry
(
190
,
190
,
30
,
3
);
const
trienglemesh
=
new
THREE
.
Mesh
(
trienglegeometry
,
materialDarkGrey
);
trienglemesh
.
position
.
set
(
0
,
80
,
0
);
trienglemesh
.
rotateX
(
Math
.
PI
*
1
);
GCOLObject
.
add
(
trienglemesh
);
//up1
const
up1geometry
=
new
THREE
.
CylinderGeometry
(
30
,
30
,
70
,
15
);
const
up1mesh
=
new
THREE
.
Mesh
(
up1geometry
,
materialGrey
);
up1mesh
.
position
.
set
(
0
,
120
,
0
);
up1mesh
.
rotateX
(
Math
.
PI
*
1
);
GCOLObject
.
add
(
up1mesh
);
//up2
const
up2geometry
=
new
THREE
.
CylinderGeometry
(
30
,
30
,
110
,
15
);
const
up2mesh
=
new
THREE
.
Mesh
(
up2geometry
,
materialDarkGrey
);
up2mesh
.
position
.
set
(
0
,
210
,
0
);
up2mesh
.
rotateX
(
Math
.
PI
*
1
);
GCOLObject
.
add
(
up2mesh
);
GCOLObject
.
position
.
set
(
0
,
0
,
0
);
GCOLContiner
.
add
(
GCOLObject
);
GCOLContiner
.
rotateY
(
Math
.
PI
*
-
0.5
);
return
GCOLContiner
;
}
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