未验证 提交 56ca942a 编写于 作者: M Michael Herzog 提交者: GitHub

DeviceOrientationControls: Add isSecureContext check. (#21528)

上级 9ce67faf
......@@ -4,6 +4,12 @@
THREE.DeviceOrientationControls = function ( object ) {
if ( window.isSecureContext === false ) {
console.error( 'THREE.DeviceOrientationControls: DeviceOrientationEvent is only available in secure contexts (https)' );
}
var scope = this;
var changeEvent = { type: 'change' };
var EPS = 0.000001;
......
......@@ -12,6 +12,12 @@ import {
var DeviceOrientationControls = function ( object ) {
if ( window.isSecureContext === false ) {
console.error( 'THREE.DeviceOrientationControls: DeviceOrientationEvent is only available in secure contexts (https)' );
}
var scope = this;
var changeEvent = { type: 'change' };
var EPS = 0.000001;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册