various tweaks and now trying to build heatmaps in two different ways

This commit is contained in:
csawatzky 2026-04-28 17:00:09 -06:00
parent 6f6a062106
commit 61aa93aabd
12 changed files with 932 additions and 244 deletions

View file

@ -15,10 +15,11 @@ interface Props {
roofHeight: number
hopperHeight?: number
wireframe?: boolean
renderOrder?: number
}
export default function BinShell(props: Props) {
const { radialSegments, binBodyColour, binMetalness, binRoughness, binOpacity, diameter, sidewallHeight, roofHeight, hopperHeight, wireframe } = props
const { radialSegments, binBodyColour, binMetalness, binRoughness, binOpacity, diameter, sidewallHeight, roofHeight, hopperHeight, wireframe, renderOrder } = props
const cylinderGeometry = React.useMemo(() => ({
radiusTop: diameter / 2,
radiusBottom: diameter / 2,
@ -86,7 +87,10 @@ export default function BinShell(props: Props) {
position={roofPosition}
roughness={binRoughness}
side={2}
opacity={binOpacity}/>
opacity={binOpacity}
depthWrite={false}
depthTest={false}
renderOrder={renderOrder}/>
{/* bin sidewall - cylinder (open ended for the roof and bottom)*/}
<Cylinder
geometry={cylinderGeometry}
@ -94,7 +98,10 @@ export default function BinShell(props: Props) {
wireframe= {wireframe}
metalness={binMetalness}
roughness={binRoughness}
opacity={binOpacity}/>
opacity={binOpacity}
depthWrite={false}
depthTest={false}
renderOrder={renderOrder}/>
{/* bin bottom - cone -OR- circle depending on the bins shape*/}
{hopperHeight !== undefined && hopperHeight > 0 ?
<Cone
@ -107,6 +114,9 @@ export default function BinShell(props: Props) {
roughness={binRoughness}
opacity={binOpacity}
side={2}
depthWrite={false}
depthTest={false}
renderOrder={renderOrder}
/>
:
<Circle
@ -119,6 +129,9 @@ export default function BinShell(props: Props) {
roughness={binRoughness}
opacity={binOpacity}
side={2}
depthWrite={false}
depthTest={false}
renderOrder={renderOrder}
/>
}
</React.Fragment>