facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.22k forks source link

Module not found: Can't resolve 'AmbientLight' in 'E:\reactproject\v5\dva-boot-admin\node_modules\react-360\Libraries' #795

Open linhuisheng opened 4 years ago

linhuisheng commented 4 years ago

I yarn add react-360 and yarn add react-360-web Writing a component(Hello360.js): import React from 'react'; import { AppRegistry, StyleSheet, Text, View, VrButton, Image, Environment } from 'react-360'; import './style/index.less';

export default class extends React.Component { state = { url: './static_assets/360_world.jpg', img: './static_assets/360_world1.jpg' } handleClick(){ let newUrl = '' let newImg = '' if(this.state.url === './static_assets/360_world.jpg'){ newUrl = './static_assets/360_world.jpg' newImg = './static_assets/360_world1.jpg' }else{ newUrl = './static_assets/360_world1.jpg' newImg = './static_assets/360_world.jpg' } this.setState({ url:newUrl, img:newImg }) Environment.setBackgroundImage(newUrl) } render() { return (

);

} }; Direct error: ./node_modules/react-360/Libraries/react-360.js Module not found: Can't resolve 'AmbientLight' in 'E:\rea 60\Libraries' image

fax1ty commented 4 years ago

Any news?

kgirma commented 3 years ago

Having the same issues