Skip to content

Commit

Permalink
Rock
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonsturges committed Nov 4, 2024
1 parent af53aab commit 8fee2a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/models/rocks/Rock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Mesh, MeshStandardMaterial } from "three";
import { RockGeometry } from "../../geometry/rocks/RockGeometry.js";

export class Rock extends Mesh {
constructor(radius = 1, widthSegments = 4, heightSegments = 4) {
super();

// Create a rock geometry
this.geometry = new RockGeometry(radius, widthSegments, heightSegments);
this.material = new MeshStandardMaterial({ color: 0x808080, flatShading: true });
}
}

0 comments on commit 8fee2a3

Please sign in to comment.