2014-03-05 1 views

답변

0

또한 JS 기반 Wikitude의 AR-View는 PhoneGap 기능과 분리되어 있습니다. PhoneGap과 AR-View간에 상호 작용할 urlListeners를 정의 할 수 있지만 Wikitude와 PhoneGap의 JavaScript 기능을 하나의 html/js 파일에 결합 할 방법이 없습니다.

친절하게 제공합니다.

하는 폰갭 주위의 내용과 여기 http://www.wikitude.com/developer/documentation

0

당신이 이것을 달성 할 수 architectsdk 사용하여 증강 현실 (Augmented Reality)을 (를) 찾기 : //.

  • 먼저 위키 튜드 (Wikitude) 세상을 만들기 전에 app.wikitudePlugin.setOnUrlInvokeCallback를 통해 리스너를 설정합니다.

    var app = { 
    // Define other functions like device onDeviceReady, onDeviceNotSupportedCallback 
    // Add a listener before creating world 
    onDeviceSupportedCallback: function() { 
    
        //Set listener 
        app.wikitudePlugin.setOnUrlInvokeCallback(app.onURLInvoked); 
    
        // Create the world 
        WikitudePlugin.loadARchitectWorld("www/world.html"); 
    }, 
    
    // This listener will be invoked everytime you call document.location = architectsdk://.. in ARchitectWorld 
    onURLInvoked: function(url) {  
        var scheme = 'architectsdk://'; 
        if (url.search(scheme) === 0) { 
         // Remove architectsdk://from string and evaluate function 
         var func = decodeURIComponent(url.substr(scheme.length)); 
         eval(func); 
        }  
    },  
    

    }};

  • 그런 document.location에 = architectsdk와 청취자 전화 : //

    $('a').click(function() { 
    var func = encodeURIComponent("window.open('"+this.href+"','_system');"); 
    document.location = "architectsdk://" + func; 
    return false; 
    

    });