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 = ({ const MeshArtContent = ({
uri, uri,
animationUrl,
className, className,
style, style,
files, files,
}: { }: {
uri?: string; uri?: string;
animationUrl?: string;
className?: string; className?: string;
style?: React.CSSProperties; style?: React.CSSProperties;
files?: (MetadataFile | string)[]; 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); const { isLoading } = useCachedImage(renderURL || '', true);
if (isLoading) { if (isLoading) {
@ -187,7 +189,8 @@ export const ArtContent = ({
if (allowMeshRender && (category === 'vr' || animationUrlExt === 'glb' || animationUrlExt === 'gltf')) { if (allowMeshRender && (category === 'vr' || animationUrlExt === 'glb' || animationUrlExt === 'gltf')) {
return <MeshArtContent return <MeshArtContent
uri={animationURL} uri={uri}
animationUrl={animationURL}
className={className} className={className}
style={style} style={style}
files={files}/>; files={files}/>;