Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/core/shaderMaterial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as THREE from 'three'
import { type ConstructorRepresentation } from '@react-three/fiber'
import { type MeshBVHUniformStruct } from 'three-mesh-bvh'

type UniformValue =
type UniformBaseValue =
| THREE.Texture
| THREE.TypedArray
| THREE.Matrix4
Expand All @@ -17,6 +17,8 @@ type UniformValue =
| boolean
| null

type UniformValue = UniformBaseValue | Record<string, UniformBaseValue>

type Uniforms = Record<string, UniformValue | Record<string, UniformValue> | Array<UniformValue>>

export function shaderMaterial<U extends Uniforms, M extends THREE.ShaderMaterial & U>(
Expand Down