import * as THREE from "three" ; import Space from "../Space" ; import Events from "./Events" ; import Stats from "./Stats" ; interface IStatsInterface { dom : Element ; new ( ) : any ; update ( ) : any ; } class Inspector { public gui : any ; public raycasterEvent : any ; public space : Space ; public stats : any ; public statsAnimate : ( ) => void ; constructor ( space ) { this . space = space ; return this ; } public showAxesHelp ( len ) { this . space . scene . add ( new THREE . AxesHelper ( len || 20 ) ) ; } public showStats ( ) { this . stats = new Stats ( ) ; this . space . element . appendChild ( this . stats . dom ) ; this . statsAnimate = function statsAnimate ( ) { this . stats . update ( ) ; } ; this . space . on ( Events . animate , this . statsAnimate ) ; } } export default Inspector ;