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
99f2b35d
Commit
99f2b35d
authored
10 months ago
by
Lucio Zambon
Browse files
Options
Downloads
Patches
Plain Diff
Add new file
parent
3c98a1d6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/src/rcpremium.js
+68
-0
68 additions, 0 deletions
components/src/rcpremium.js
with
68 additions
and
0 deletions
components/src/rcpremium.js
0 → 100644
+
68
−
0
View file @
99f2b35d
import
*
as
THREE
from
'
three
'
;
// Control rack
export
function
rcpremium
(
width
=
800
,
height
=
2500
,
depth
=
600
)
{
const
rc_rackObject
=
new
THREE
.
Object3D
();
const
bluematerial
=
new
THREE
.
MeshLambertMaterial
({
color
:
0x0053d9
});
const
softbluematerial
=
new
THREE
.
MeshLambertMaterial
({
color
:
0x2b7cff
});
const
target
=
new
THREE
.
MeshLambertMaterial
({
color
:
0xfbe928
});
//rack
const
rrgeometry
=
new
THREE
.
BoxGeometry
(
width
,
height
,
depth
);
const
rrmesh
=
new
THREE
.
Mesh
(
rrgeometry
,
softbluematerial
);
rrmesh
.
position
.
set
(
0
,
0
,
-
10
);
rc_rackObject
.
add
(
rrmesh
);
//front yellow target
const
Ftarget
=
new
THREE
.
BoxGeometry
(
2
,
90
,
500
);
const
Ftargetmesh
=
new
THREE
.
Mesh
(
Ftarget
,
target
);
Ftargetmesh
.
position
.
set
(
-
451
,
1200
,
-
15
);
rc_rackObject
.
add
(
Ftargetmesh
);
//Rear yellow target
const
Rtarget
=
new
THREE
.
BoxGeometry
(
2
,
90
,
500
);
const
Rtargetmesh
=
new
THREE
.
Mesh
(
Rtarget
,
target
);
Rtargetmesh
.
position
.
set
(
401
,
1200
,
-
15
);
rc_rackObject
.
add
(
Rtargetmesh
);
//edge le
const
llegeometry
=
new
THREE
.
BoxGeometry
(
width
-
750
,
height
,
depth
-
550
);
const
llemesh
=
new
THREE
.
Mesh
(
llegeometry
,
bluematerial
);
llemesh
.
position
.
set
(
-
425
,
0
,
-
285
);
rc_rackObject
.
add
(
llemesh
);
//edge re
const
lregeometry
=
new
THREE
.
BoxGeometry
(
width
-
750
,
height
,
depth
-
550
);
const
lremesh
=
new
THREE
.
Mesh
(
lregeometry
,
bluematerial
);
lremesh
.
position
.
set
(
-
425
,
0
,
265
);
rc_rackObject
.
add
(
lremesh
);
//edge ue
const
luegeometry
=
new
THREE
.
BoxGeometry
(
width
-
750
,
height
-
2450
,
depth
-
50
);
const
luemesh
=
new
THREE
.
Mesh
(
luegeometry
,
bluematerial
);
luemesh
.
position
.
set
(
-
425
,
1225
,
-
7
);
rc_rackObject
.
add
(
luemesh
);
//edge de
const
ldegeometry
=
new
THREE
.
BoxGeometry
(
width
-
750
,
height
-
2450
,
depth
-
50
);
const
ldemesh
=
new
THREE
.
Mesh
(
ldegeometry
,
bluematerial
);
ldemesh
.
position
.
set
(
-
425
,
-
1230
,
-
7
);
rc_rackObject
.
add
(
ldemesh
);
//base and build texture
const
drawer1geometry
=
new
THREE
.
BoxGeometry
(
10
,
2450
,
550
);
const
textureLoader
=
new
THREE
.
TextureLoader
();
const
texture
=
textureLoader
.
load
(
'
./components/rcscreenfoto.jpg
'
);
texture
.
wrapS
=
texture
.
wrapT
=
THREE
.
RepeatWrapping
;
texture
.
repeat
.
set
(
1
,
1
);
const
material
=
new
THREE
.
MeshBasicMaterial
({
map
:
texture
});
const
gridgeometrymesh
=
new
THREE
.
Mesh
(
drawer1geometry
,
material
);
gridgeometrymesh
.
rotateX
(
Math
.
PI
*
1
);
gridgeometrymesh
.
rotateY
(
Math
.
PI
*
1
);
gridgeometrymesh
.
rotateZ
(
Math
.
PI
*
1
);
gridgeometrymesh
.
position
.
set
(
-
400
,
0
,
-
10
);
rc_rackObject
.
add
(
gridgeometrymesh
);
return
rc_rackObject
;
}
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