feat: vr poster
This commit is contained in:
parent
35dd76e03d
commit
503b0e6ca4
|
@ -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}/>;
|
||||||
|
|
Loading…
Reference in New Issue