mirror of
https://github.com/pissang/claygl.git
synced 2026-02-01 17:27:08 +00:00
fix window not defined
This commit is contained in:
parent
64af87bdce
commit
9b042bf9ff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "claygl-next",
|
||||
"version": "2.0.0-alpha.8",
|
||||
"version": "2.0.0-alpha.9",
|
||||
"description": "A 3D graphic library",
|
||||
"keywords": [
|
||||
"graphic",
|
||||
|
||||
@ -143,7 +143,7 @@ interface OrbitControl
|
||||
'autoRotate' | 'target' | 'distance' | 'orthographicSize' | 'alpha' | 'beta' | 'center'
|
||||
> {}
|
||||
|
||||
const useTouchEvent = 'ontouchstart' in window;
|
||||
const useTouchEvent = typeof window !== 'undefined' && 'ontouchstart' in window;
|
||||
|
||||
class OrbitControl extends Notifier {
|
||||
disabled = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user