瀏覽代碼

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 年之前
父節點
當前提交
94abecfb9e
共有 1 個文件被更改,包括 3 次插入3 次删除
  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