live-tour-lab
Version:
Create VR tours. Built on React VR. LiveTourLab is the #1 open source framework and ecosystem for creating Live Tours. Extend with your own VR components in minutes.
33 lines (27 loc) • 456 B
JavaScript
import React from 'react';
import {
asset,
Image,
} from 'react-vr';
export default class Preload extends React.Component {
static defaultProps = {
src: null, // File to preload
};
constructor(props) {
super();
this.state = {
};
}
render() {
return(
<Image
style={{
width: 0,
height: 0,
opacity: 0,
}}
source={asset(this.props.src)}
/>
);
}
}