在纵向模式/ AR.js中单击对象外的区域

时间:2018-11-20 09:08:48

标签: augmented-reality aframe ar.js

我正在尝试处理 we are presenting the custom overlay using // The callback for when the timeout was fired. func applicationDidTimout(notification: NSNotification) { let storyboard = UIStoryboard(name: "MyStoryboard", bundle: nil) let vc = storyboard.instantiateViewControllerWithIdentifier("myStoryboardIdentifier") UIApplication.shared.keyWindow?.rootViewController = vc } 上的点击事件,请参见下一页。
https://medium.com/chialab-open-source/how-to-handle-click-events-on-ar-js-58fcacb77c4

但是如果手机处于纵向模式,则会出现下图所示的问题。
https://i.stack.imgur.com/3PuXY.jpg

AR.js

该如何解决?

1 个答案:

答案 0 :(得分:0)

嗨,您应该在描述组件之前注册它。

放入

    AFRAME.registerComponent('markerhandler', { ...

加载ar.js后

然后标记一个标记,一个实体,...