feat: vr poster

This commit is contained in:
bartosz-lipinski 2021-06-27 20:30:57 -05:00
parent 35dd76e03d
commit 503b0e6ca4
1 changed files with 5 additions and 2 deletions

View File

@ -10,16 +10,18 @@ import { getLast } from '../../utils/utils';
const MeshArtContent = ({
uri,
animationUrl,
className,
style,
files,
}: {
uri?: string;
animationUrl?: string;
className?: string;
style?: React.CSSProperties;
files?: (MetadataFile | string)[];
}) => {
const renderURL = files && files.length > 0 && typeof files[0] === 'string' ? files[0] : uri;
const renderURL = files && files.length > 0 && typeof files[0] === 'string' ? files[0] : animationUrl;
const { isLoading } = useCachedImage(renderURL || '', true);
if (isLoading) {
@ -187,7 +189,8 @@ export const ArtContent = ({
if (allowMeshRender && (category === 'vr' || animationUrlExt === 'glb' || animationUrlExt === 'gltf')) {
return <MeshArtContent
uri={animationURL}
uri={uri}
animationUrl={animationURL}
className={className}
style={style}
files={files}/>;