File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
import { isLockedDownDemoRoom } from "../utils/hub-utils" ;
2
2
import { paths } from "./userinput/paths" ;
3
+ import { shouldUseNewLoader } from "../utils/bit-utils" ;
4
+ import { addComponent } from "bitecs" ;
5
+ import { Inspected , Inspectable } from "../bit-components" ;
6
+ import { INSPECTABLE_FLAGS } from "../bit-systems/inspect-system" ;
3
7
export class InspectYourselfSystem {
4
8
tick ( scene , userinput , cameraSystem ) {
5
9
if ( ! scene . is ( "entered" ) ) return ;
6
10
if ( userinput . get ( paths . actions . startInspectingSelf ) && ! isLockedDownDemoRoom ( ) ) {
7
11
const rig = document . getElementById ( "avatar-rig" ) ;
12
+ if ( shouldUseNewLoader ( ) ) {
13
+ addComponent ( APP . world , Inspected , rig . eid ) ;
14
+ Inspectable . flags [ rig . eid ] |= INSPECTABLE_FLAGS . TARGET_CHANGED ;
15
+ }
8
16
cameraSystem . inspect ( rig . object3D , 1.5 ) ;
9
17
}
10
18
}
You can’t perform that action at this time.
0 commit comments