Skip to content

Commit

Permalink
Fence models
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonsturges committed Nov 20, 2024
1 parent 680d57f commit e781e47
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
10 changes: 5 additions & 5 deletions src/models/fence/FenceColumn.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Mesh, MeshStandardMaterial } from "three";
import { FenceColumnGeometry } from "../../geometry/fence/FenceColumnGeometry";

export class FenceColumn extends Mesh {
export class FenceColumn extends Mesh<FenceColumnGeometry, MeshStandardMaterial> {
constructor({ height = 2.25 } = {}) {
super();

this.geometry = new FenceColumnGeometry({ height });
this.material = new MeshStandardMaterial({ color: 0x8b7d7b, flatShading: true });
super(
new FenceColumnGeometry({ height }),
new MeshStandardMaterial({ color: 0x8b7d7b, flatShading: true })
);
}
}
24 changes: 12 additions & 12 deletions src/models/fence/WroughtIronBar.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Mesh, MeshStandardMaterial } from "three";
import { WroughtIronBarGeometry } from "../../geometry/fence/WroughtIronBarGeometry";

export class WroughtIronBar extends Mesh {
export class WroughtIronBar extends Mesh<WroughtIronBarGeometry, MeshStandardMaterial> {
constructor({
barHeight = 2.0, //
barRadius = 0.05,
Expand All @@ -10,16 +10,16 @@ export class WroughtIronBar extends Mesh {
spikeScaleZ = 1.0,
radialSegments = 8,
} = {}) {
super();

this.geometry = new WroughtIronBarGeometry({
barHeight,
barRadius,
spikeHeight,
spikeRadius,
spikeScaleZ,
radialSegments,
});
this.material = new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 });
super(
new WroughtIronBarGeometry({
barHeight,
barRadius,
spikeHeight,
spikeRadius,
spikeScaleZ,
radialSegments,
}),
new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 }),
);
}
}
34 changes: 17 additions & 17 deletions src/models/fence/WroughtIronFence.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Mesh, MeshStandardMaterial } from "three";
import { WroughtIronFenceGeometry } from "../../geometry/fence/WroughtIronFenceGeometry";

export class WroughtIronFence extends Mesh {
export class WroughtIronFence extends Mesh<WroughtIronFenceGeometry, MeshStandardMaterial> {
constructor({
count = 20, //
spacing = 0.4,
Expand All @@ -15,21 +15,21 @@ export class WroughtIronFence extends Mesh {
railOffset = 0.0,
radialSegments = 8,
} = {}) {
super();

this.geometry = new WroughtIronFenceGeometry({
count,
spacing,
barHeight,
barRadius,
spikeHeight,
spikeRadius,
spikeScaleZ,
railHeight,
railDepth,
railOffset,
radialSegments,
});
this.material = new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 });
super(
new WroughtIronFenceGeometry({
count,
spacing,
barHeight,
barRadius,
spikeHeight,
spikeRadius,
spikeScaleZ,
railHeight,
railDepth,
railOffset,
radialSegments,
}),
new MeshStandardMaterial({ color: 0x333333, metalness: 0.8, roughness: 0.4 }),
);
}
}

0 comments on commit e781e47

Please sign in to comment.