import React, { Component } from "react"; import { BrowserRouter as Router, Switch, Route } from "react-router-dom"; import Header from "./Header"; import View3D, { ControlBar, LoadingBar, View3DPlugin } from "../src"; import "./App.css"; import "@egjs/view3d/css/view3d-bundle.css" export default class App extends Component<{}, { skybox: string | null }> { public plugins: View3DPlugin[]; public view3DRef: View3D; public constructor(props) { super(props); this.plugins = [new LoadingBar(), new ControlBar()]; this.state = { skybox: null } } public render() { return (
{ console.log("loaded", e); }} /> { if (ref) { this.view3DRef = ref; } }} src="https://naver.github.io/egjs-view3d/model/RobotExpressive.glb" className="view3d-3by1" onReady={e => { console.log(e.target); e.target.animator.play(1); }} />
); } }