Răsfoiți Sursa

Do not require a camera for DeviceOrientationControls

Based on a quick look at the source code of DeviceOrientationControls.js, a camera is not needed for the controls to work, since the controls do not use any methods or properties that are only available on cameras.

Case in point: for the [jsdoom](https://github.com/pineapplemachine/jsdoom) 3D view, I am using the DeviceOrientationControls to change the orientation of a "view head" object, which has some cameras as its children.
Kevin Caccamo 5 ani în urmă
părinte
comite
94abecfb9e
1 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 3 3
      examples/jsm/controls/DeviceOrientationControls.d.ts

+ 3 - 3
examples/jsm/controls/DeviceOrientationControls.d.ts

@@ -1,12 +1,12 @@
 import {
-	Camera
+	Object3D
 } from '../../../src/Three';
 
 export class DeviceOrientationControls {
 
-	constructor( object: Camera );
+	constructor( object: Object3D );
 
-	object: Camera;
+	object: Object3D;
 
 	// API