Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
webgl25
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Villard PierreFrederic
webgl25
Commits
b2eb776b
Commit
b2eb776b
authored
4 months ago
by
Thomas KANY
Browse files
Options
Downloads
Patches
Plain Diff
poteau
parent
0227c412
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
ALVARIZA-BILLAR_DESERT_KANY/projet.js
+30
-1
30 additions, 1 deletion
ALVARIZA-BILLAR_DESERT_KANY/projet.js
with
30 additions
and
1 deletion
ALVARIZA-BILLAR_DESERT_KANY/projet.js
+
30
−
1
View file @
b2eb776b
...
@@ -117,6 +117,35 @@ function fillScene() {
...
@@ -117,6 +117,35 @@ function fillScene() {
scene
.
add
(
capsuleMesh
);
scene
.
add
(
capsuleMesh
);
// Matériaux
const
redMaterial
=
new
THREE
.
MeshStandardMaterial
({
color
:
0xff0000
});
// Rouge
const
grayMaterial
=
new
THREE
.
MeshStandardMaterial
({
color
:
0x888888
});
// Gris
// Bas du poteau (rouge)
const
bottomPoleGeometry
=
new
THREE
.
CylinderGeometry
(
30
,
30
,
1500
,
32
);
const
bottomPole
=
new
THREE
.
Mesh
(
bottomPoleGeometry
,
redMaterial
);
bottomPole
.
position
.
set
(
-
5000
,
750
,
6000
);
scene
.
add
(
bottomPole
);
// Haut du poteau (gris)
const
topPoleGeometry
=
new
THREE
.
CylinderGeometry
(
30
,
30
,
1500
,
32
);
const
topPole
=
new
THREE
.
Mesh
(
topPoleGeometry
,
grayMaterial
);
topPole
.
position
.
set
(
-
5000
,
2250
,
6000
);
scene
.
add
(
topPole
);
// Enseigne (panneau plus petit)
const
signTexture
=
new
THREE
.
TextureLoader
().
load
(
'
textures/sign.png
'
);
const
signGeometry
=
new
THREE
.
PlaneGeometry
(
400
,
300
);
// Réduction de taille
const
signMaterial
=
new
THREE
.
MeshStandardMaterial
({
map
:
signTexture
,
side
:
THREE
.
DoubleSide
});
const
sign
=
new
THREE
.
Mesh
(
signGeometry
,
signMaterial
);
// enseigne comme un drapeau
sign
.
position
.
set
(
-
4800
,
2500
,
6000
);
sign
.
rotation
.
y
=
0
;
// Ajouter l'enseigne
scene
.
add
(
sign
);
// ARBRES
// ARBRES
new
MTLLoader
()
new
MTLLoader
()
...
@@ -144,7 +173,7 @@ function fillScene() {
...
@@ -144,7 +173,7 @@ function fillScene() {
}
}
// Arbres à droite de la route
// Arbres à droite de la route
var
numTreesX
=
20
,
numTreesZ
=
100
,
spacingX
=
2000
,
spacingZ
=
1000
,
startX
=
3000
,
var
numTreesX
=
19
,
numTreesZ
=
100
,
spacingX
=
2000
,
spacingZ
=
1000
,
startX
=
3000
,
startZ
=
-
50000
;
startZ
=
-
50000
;
startX
=
-
10000
;
startX
=
-
10000
;
for
(
var
x
=
0
;
x
<
numTreesX
;
x
++
)
{
for
(
var
x
=
0
;
x
<
numTreesX
;
x
++
)
{
...
...
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
register
or
sign in
to comment