diff --git a/src/components/Avatar/Avatar.component.tsx b/src/components/Avatar/Avatar.component.tsx index 41cf0ede..5a0f5848 100644 --- a/src/components/Avatar/Avatar.component.tsx +++ b/src/components/Avatar/Avatar.component.tsx @@ -87,6 +87,8 @@ export interface AvatarProps extends LightingProps, EnvironmentProps, Omit = ({ {shadows && } {background?.src && } {capture && } - {style?.background && } + {background?.color && } console.info('EVENT: static avatar loaded'), onLoading: () => console.info('EVENT: loading static avatar') @@ -127,7 +130,9 @@ Showcase.args = { intensity: 1, materialIntensity: 1 }, - style: { background: '#282038' }, + background: { + color: '#282038' + }, dpr: 2, ambientLightColor: '#ffffff', dirLightColor: '#ffffff', diff --git a/src/components/Avatar/Examples.stories.tsx b/src/components/Avatar/Examples.stories.tsx index a0b3c343..8b29df82 100644 --- a/src/components/Avatar/Examples.stories.tsx +++ b/src/components/Avatar/Examples.stories.tsx @@ -39,8 +39,8 @@ export const Bloom: StoryFn = (args: BloomConfiguration | un dirLightIntensity={2.2} spotLightIntensity={0.5} environment="apartment" - style={{ - background: 'rgb(9,20,26)' + background={{ + color: 'rgb(9,20,26)' }} /> ); @@ -110,7 +110,7 @@ SpawnEffectAndAnimation.args = { cameraInitialDistance: CAMERA.CONTROLS.FULL_BODY.MAX_DISTANCE, modelSrc: getStoryAssetPath('male-emissive.glb'), animationSrc: getStoryAssetPath('male-idle.glb'), - style: { background: 'rgb(9,20,26)' } + background: { color: 'rgb(9,20,26)' } }; SpawnEffectAndAnimation.argTypes = { ...ignoreArgTypesOnExamples, diff --git a/src/components/Background/Box/Box.component.tsx b/src/components/Background/Box/Box.component.tsx index 7e821678..d8b3fa2f 100644 --- a/src/components/Background/Box/Box.component.tsx +++ b/src/components/Background/Box/Box.component.tsx @@ -3,7 +3,7 @@ import { Mesh, TextureLoader } from 'three'; import { useLoader } from '@react-three/fiber'; import { MeshProps } from '@react-three/fiber/dist/declarations/src/three-types'; -export type Background = { src?: string } & MeshProps; +export type Background = { src?: string; color?: string } & MeshProps; export const Box: FC = ({ src = '', ...baseProps }) => { const ref = useRef(null); diff --git a/src/components/BaseCanvas/BaseCanvas.component.tsx b/src/components/BaseCanvas/BaseCanvas.component.tsx index 2780c39d..7769de3b 100644 --- a/src/components/BaseCanvas/BaseCanvas.component.tsx +++ b/src/components/BaseCanvas/BaseCanvas.component.tsx @@ -24,7 +24,7 @@ export const BaseCanvas: FC = ({ key={fov} className={`${styles['base-canvas']} ${className ?? ''}`} shadows="soft" - gl={{ preserveDrawingBuffer: true, toneMappingExposure: 0.5 }} + gl={{ preserveDrawingBuffer: true, toneMappingExposure: 0.5, alpha: true }} dpr={dpr} camera={{ fov, position }} resize={{ scroll: true, debounce: { scroll: 50, resize: 0 } }}