( splats: SplatMesh, minDepth: number, maxDepth: number, reverse?: boolean, )
| 36 | } |
| 37 | |
| 38 | export function setDepthColor( |
| 39 | splats: SplatMesh, |
| 40 | minDepth: number, |
| 41 | maxDepth: number, |
| 42 | reverse?: boolean, |
| 43 | ) { |
| 44 | splats.enableWorldToView = true; |
| 45 | const dynoMinDepth = dynoConst("float", minDepth); |
| 46 | const dynoMaxDepth = dynoConst("float", maxDepth); |
| 47 | const dynoReverse = dynoConst("bool", reverse ?? false); |
| 48 | splats.worldModifier = makeDepthColorModifier( |
| 49 | splats.context.worldToView, |
| 50 | dynoMinDepth, |
| 51 | dynoMaxDepth, |
| 52 | dynoReverse, |
| 53 | ); |
| 54 | splats.updateGenerator(); |
| 55 | return { |
| 56 | minDepth: dynoMinDepth, |
| 57 | maxDepth: dynoMaxDepth, |
| 58 | reverse: dynoReverse, |
| 59 | }; |
| 60 | } |
nothing calls this directly
no test coverage detected