我刚拿到 Leap Motion Controller 。但我必须承认,我不知道如何在 SmartMS 中启动和运行基本初始化!?
我已经包含了来自 https://github.com/logotype/LeapMotionTS 的 leapmotionts-1.0.9+8391.js并将 leap.Core 添加到我项目的 uses 子句中。 Sms 接受这样的初始化:
Controller:=New JController();
但是我不知道如何设置事件监听器?
最佳答案
我修复了生成的库并重新生成了 javascript(所以它也适用于浏览器) https://github.com/andremussche/AndrewsDelphiStuff/tree/master/Smart/LeapMotion
示例代码:
uses
leap.core;
{$R 'leapmotionts-1.0.9+8391.js'}
var j = new JController;
j.addEventListener(JLeapEvent.LEAPMOTION_CONNECTED,
procedure(event: JLeapEvent)
begin
do something
end);
关于javascript - 开始使用 Leap Motion,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23169813/