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
c53dd504
Commit
c53dd504
authored
3 months ago
by
MattheoCo
Browse files
Options
Downloads
Patches
Plain Diff
modification du .md de repartition
parent
84b6449b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
COGNET/Répartition.md
+3
-0
3 additions, 0 deletions
COGNET/Répartition.md
COGNET/main.js
+16
-2
16 additions, 2 deletions
COGNET/main.js
with
19 additions
and
2 deletions
COGNET/Répartition.md
+
3
−
0
View file @
c53dd504
...
@@ -34,6 +34,9 @@ Ce projet est une scène 3D créée avec Three.js, présentant une nature morte
...
@@ -34,6 +34,9 @@ Ce projet est une scène 3D créée avec Three.js, présentant une nature morte
## Fonctionnalités editées par Matthéo Cognet
## Fonctionnalités editées par Matthéo Cognet
### Skybox
-
Un skybox avec des textures pour le sol, les murs et le plafond.
### Pièce
### Pièce
-
Une pièce avec des murs, un sol et un plafond.
-
Une pièce avec des murs, un sol et un plafond.
-
Une fenêtre avec un cadre et une porte.
-
Une fenêtre avec un cadre et une porte.
...
...
This diff is collapsed.
Click to expand it.
COGNET/main.js
+
16
−
2
View file @
c53dd504
import
*
as
THREE
from
'
three
'
;
import
*
as
THREE
from
'
three
'
;
import
{
OrbitControls
}
from
'
three/addons/controls/OrbitControls.js
'
;
import
{
OrbitControls
}
from
'
three/addons/controls/OrbitControls.js
'
;
import
{
OBJLoader
}
from
'
three/addons/loaders/OBJLoader.js
'
;
import
{
OBJLoader
}
from
'
three/addons/loaders/OBJLoader.js
'
;
// Initialisation de la scène, de la caméra et du rendu
// Initialisation de la scène, de la caméra et du rendu
const
scene
=
new
THREE
.
Scene
();
const
scene
=
new
THREE
.
Scene
();
...
@@ -66,6 +66,9 @@ function init() {
...
@@ -66,6 +66,9 @@ function init() {
// Call the function to load the skull
// Call the function to load the skull
loadSkull
();
loadSkull
();
// Add the skybox
addSkybox
();
}
}
function
createRoom
()
{
function
createRoom
()
{
...
@@ -258,6 +261,17 @@ function loadSkull() {
...
@@ -258,6 +261,17 @@ function loadSkull() {
});
});
}
}
function
addSkybox
()
{
const
loader
=
new
THREE
.
CubeTextureLoader
();
scene
.
background
=
loader
.
load
([
'
textures/skybox/bkg1_right.png
'
,
// Right
'
textures/skybox/bkg1_left.png
'
,
// Left
'
textures/skybox/bkg1_top.png
'
,
// Top
'
textures/skybox/bkg1_bot.png
'
,
// Bottom
'
textures/skybox/bkg1_front.png
'
,
// Front
'
textures/skybox/bkg1_back.png
'
// Back
]);
}
function
loadBookStack
()
{
function
loadBookStack
()
{
const
textureLoader
=
new
THREE
.
TextureLoader
();
const
textureLoader
=
new
THREE
.
TextureLoader
();
...
...
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