Skip to content

Commit

Permalink
Mesh shadows
Browse files Browse the repository at this point in the history
Temporary update
  • Loading branch information
jasonsturges committed Nov 18, 2024
1 parent 03bbcab commit ce54ce3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/models/science/Bottle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class Bottle extends Group {

// Meshes
const bottle = new Mesh(bottleGeometry, glassMaterial);
bottle.castShadow = true;

const liquid = new Mesh(bottleGeometry, liquidMaterial);
const cork = new Mesh(corkGeometry, corkMaterial);

Expand Down
1 change: 1 addition & 0 deletions src/models/science/Flask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class Flask extends Group {

// Meshes
const flask = new Mesh(flaskGeometry, glassMaterial);
flask.castShadow = true;
const cork = new Mesh(corkGeometry, corkMaterial);

// Position cork on top of the flask
Expand Down
2 changes: 2 additions & 0 deletions src/models/science/MortarAndPestle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class MortarAndPestle extends Group {

// Meshes
const mortar = new Mesh(mortarGeometry, mortarMaterial);
mortar.castShadow = true;
const pestle = new Mesh(pestleGeometry, pestleMaterial);
pestle.castShadow = true;

// Position and rotate the pestle to rest in the mortar
pestle.position.set(0.3, 1.3, 0);
Expand Down

0 comments on commit ce54ce3

Please sign in to comment.