Skip to content

Commit

Permalink
feat: Add development-only logging for material initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymousRecords committed Jan 7, 2025
1 parent f6268a4 commit 9d36320
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/shadergradient-v2/src/ShaderGradient/Mesh/Mesh.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
// import { vertexShader, fragmentShader } from '@/shaders/base'
import { dToRArr } from '@/utils'

declare const __DEV__: boolean;

export function Mesh({
animate,

Expand Down Expand Up @@ -56,7 +58,9 @@ export function Mesh({
vertexShader={type === 'sphere' ? vertexSphere : vertexShader}
fragmentShader={type === 'sphere' ? fragmentSphere : fragmentShader}
onInit={(material) => {
console.log('material (onInit)', material)
if (__DEV__) {
console.debug('material (onInit)', material);
}
}}
/>
</mesh>
Expand Down

0 comments on commit 9d36320

Please sign in to comment.