Code Monkey home page Code Monkey logo

wikitude-sdk-samples's Introduction

Augmented Reality - Wikitude SDK JavaScript Samples

by Wikitude GmbH - www.wikitude.com

Sample content for the Wikitude SDK JavaScript API

Requries Wikitude SDK.

LICENSE

   Copyright 2012-2021 Wikitude GmbH, https://www.wikitude.com

wikitude-sdk-samples's People

Contributors

andreasschacherbauerwikitude avatar pnagele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wikitude-sdk-samples's Issues

requiredFeatures

I'm unable to find a list of what can / should be placed in the requiredFeatures array. The only ones I'm aware of are geo and ir.

can't build the project

Hi,
I'm trying to buid the project "wikitude-sdk-samples" in my XamarinStudio verion 5.9.3(build 1). I have Xamarin Android Player - Nexus 5 (Lollipop) Android 5.1.0, API 21.

I have been following the steps under "Wikitude Sample App - Getting Started quickly" on:
http://www.wikitude.com/external/doc/documentation/latest/xamarin/setupguidexamarin.html

However, the errors after lunching the debugger are:

  1. File not found: C:\prj_XAMARIN AR\wikitude-xamarin-master\wikitude-xamarin-master\source\binding\Android\JARTOXML

2)File not found: C:\prj_XAMARIN AR\wikitude-xamarin-master\wikitude-xamarin-master\source\binding\Android\BINDINGSGENERATOR

3)C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.
System.InvalidOperationException: Sequence contains no matching element
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at MonoDroid.Tuner.PreserveApplications.PreserveTypeProperty(CustomAttribute attribute, String property)
at MonoDroid.Tuner.PreserveApplications.ProcessAttributeProvider(ICustomAttributeProvider provider)
at MonoDroid.Tuner.PreserveApplications.ProcessAssembly(AssemblyDefinition assembly)
at Mono.Tuner.SubStepDispatcher.DispatchAssembly(AssemblyDefinition assembly)
at Mono.Tuner.SubStepDispatcher.BrowseAssemblies(IEnumerable`1 assemblies)
at Mono.Tuner.SubStepDispatcher.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() (MSB4018) (WikitudeSampleAndroid)

An idea on why 1) and 2) files are missing, and why the linker gives errors despite Targe Framework of both projects is Android 5.0 (Lollipop) would be appreciated.

Wikitude SDK not available on Nuget.org

Hi,
I am using visual studio for mac. As per new update of Wikitude SDK it should available on Nuget.org but I cannot find it. I also checked it on Visual Studio 2017 in Windows but no result.

Till now I have manually added the SDK to my project. Am I missing something that I cannot find it on Nuget.org? Thanks

architect.js

Hi
index.html can not reference to architect.js .
the path is invalid also <script src="architect://architect.js"></script> doesn't work either.

http-404 error for architect.js

Hello,

Trying to run "08_PointOfInterest_1_PoiAtLocation" sample, but getting the http-404 error for architect.js file from url: https://www.wikitude.com/libs/architect.js

this document says "The actual file will be injected by the Wikitude SDK on run-time, so don't worry if you see a 404 - Not found in case you try to download the file. Even if it looks like the Wikitude SDK is loading this file remotely, it will only be replaced locally without any network connection opening up."

is that true ? because I end up with blank page...

where can I find this file ?

3d models too old to open in encoder

I can't open the 3D models in wikitude encoder:

The imported .wt3 file is too old to be opened with this version of the application. Open source file and open a new.

(I'd like to test animations with the demo models.)

Location Based using wikitude

Hello , i need help to finish my master thesis using wikitude ,
my idea is to place marker above specific buildings when they are shown in camera . I implement your example 08_PointOfInterest_2_PoiWithLabel , but i dont know how to place specific location (coordinates or Longitude , Latitude)
Thanks In advance

target

hello, I am developing an augmented reality application and I am using wikitude however I would like to recognize several target (.wtc) in the js not only that recognizes one at a time, is that possible with wikitude?

Image Target Question

Hello

We tried the Image on Target sample from GitHub (was updated two month ago).
The address https://www.wikitude.com/libs/architect.js is not working anymore and another question is where should the file src="../ade.js" be found? It's not in the sample folder...

Thanks for a feedback

Update: Just found the hint "The actual file will be injected by the Wikitude SDK". So I assume it's all good. Anyways there is an error message "Loading AR web view failed..." It looks like it adds "file:///andorid_asset/" before the address to the www folder. Is this correct?

Location based AR - Accuracy

Hi, I would like to use your sdk to build an Geolocated AR experience for mobile. I have tow questions:
1.- Does the accuracy depends only on the mobile GPS?
2.- Does it have maps and 3D buildings to mask objects in real life with buildings?

Thanks!

Image orientation problem

some of images have orientation problem while showing in camera preview as point of interest in android sdk

How to open a javascript sample project?

Hi!

Any way to open and test a javascript sample project? this one for example:
https://github.com/Wikitude/wikitude-sdk-samples/tree/master/05_InstantTracking_2_3dModelOnPlane

I also tried following this guide (after downloading the Javascript SDK):
https://www.wikitude.com/external/doc/documentation/7.2/android/setupguideandroid.html

But i got stuck on this step:
'you have to include'

<script src="https://wikitude.com/libs/architect.js"></script>

Because nowhere in my entire project is an HTML file, no clue where to include this, it's not clear from the guide.

In step 1 in the guide i already got lost actually, it says: Copy the file libs/wikitudesdk.aar into the libs folder of your module. (//libs)

i did find a folder named "Library" which contained the wikitudesdk.aar so i guessed thats what was meant in the guide? I just put that here:
C:\tools\wikitudeSLAMSDK\Examples\SDKExamples\wikitude-sdk-samples\libs
I'm probably doing this wrong...

I'm sorry if i missed something obvious! Thank you for your time.

ObjectTracking using own Webservice (Android Javascript)

Hi, I need help for my project. I want to make a project like GeoAR sample in Wikitude but in my project I want to do :

  1. ObjectTracking using Webserver
  2. Get the data (.wto files, name, description as json data) of the object from my Webserver
  3. I'm using Android JavaScript SDK 8.10

I have try it a lot but it didn't work

How to stop/exit from AR world programmatically from JS code?

I have an application developed which uses wikitude React native plugin. I have requirement of internal redirection upon scanning images. Therefore I need to close/stop the AR experience. Can you please tell me how it can be possible? Thanks!

Multiple .wtc files

Hello there! I am developing an application with AR. In one section I need to have several .wtc files to recognise any target from the 10 .wtc files that I have, I've been watching the dinosaurs example (several targets) but in fact this is not the thing I need, because I don't want to recognise them all at once, but one at a time in the same js. Furthermore, in that example, they only use one .wtc file, but I have created 10 (because each one represents one sculpture in a museum or a dinosaur).

I mean, I don't want all the dinosaurs in the screen, I want them one by one but in the same screen depending on the QR that I would be focusing.

architect.js not working

Hi,

I am following the guides from the wikitude cordova documentation. When I am running my application, I am getting an error when trying to load a AR object. The actual error code I get is:

[console.log] Error in Success callbackId: WikitudePlugin1329171891 : ReferenceError: AR is not defined

explore.html
`

<script src="https://www.wikitude.com/libs/architect.js"></script>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="js/explore.js"></script>
    <title>Explore</title>
</head>
<body>
   
    
</body>
`

explore.js
`var app = {

//true once data is fetched
initiallyLoadedData: false,

//POI-Marker Assets
markerDrawable_idle: null,

//URL/Path to the augmented reality experience you would like to load
arExperienceUrl: "../explore.html",

//The features your augmented reality experience requires, only define the ones you really need
requiredFeatures: ["2d_tracking", "geo"],

//Represents the device capabilities of launching AR experiences with specific features
isDeviceSupport: false,

//Additional startup settings, for now the only setting available is camera_position
startupConfiguration:
{
	"camera_position": "back"
},

// Application Constructor
initialize: function() {
    this.bindEvents();
},

bindEvents: function(){
	document.addEventListener('deviceready', this.onDeviceReady, false);
},

// deviceready Event Handler
//
// Bind any cordova events here. Common events are:
// 'pause', 'resume', etc.
onDeviceReady: function() {
    app.wikitudePlugin = cordova.require("com.wikitude.phonegap.WikitudePlugin.WikitudePlugin");
    app.wikitudePlugin.isDeviceSupported(app.onDeviceSupported, app.onDeviceNotSupported, app.requiredFeatures);
},

onDeviceSupported: function(){
	alert("Device Supported");
	app.wikitudePlugin.loadARchitectWorld(
		app.onARExperienceLoadedSuccessful,
		app.onARExperienceLoadError,
		app.arExperienceUrl,
		app.requiredFeatures,
		app.startupConfiguration
	);
},

onDeviceNotSupported: function(errorMessage){
	alert("No support for device: " + errorMessage);
},

loadPoisFromJsonData: function(poiData){
	alert(poiData.latitude + " : " + poiData.longitude);
	// start loading marker assets
	app.markerDrawable_idle = new AR.ImageResource("../assets/marker_idle.png");
	
	var markerLocation = new AR.GeoLocation(poiData.latitude, poiData.longitude, poiData.altitude);
	var markerImageDrawable_idle = new AR.ImageDrawable(markerDrawable_idle, 2.5, {
		zOrder: 0,
		opacity: 1.0
	});
	
	//create GeoObject
	var markerObject = new AR.GeoObject(markerLocation, {
		drawable:{
			cam: [markerImageDrawable_idle]
		}
	});
	
	
	console.log('1 place loaded');
},

onARExperienceLoadedSuccessful: function(loadedURL){
	alert("AR experience loaded");
	
	// request data if not already present
	if(!app.initiallyLoadedData){
		var poiData = {
			"id": 1,
			"longitude": 2.992115,
			"latitude": 55.959722,
			"altitude": 100.0
		};
		app.loadPoisFromJsonData(poiData);
		app.initiallyLoadedData = true;
	}
	
},
onARExperienceLoadError: function(errorMessage){
	alert("Error in Loading AR experience: " + errorMessage);
}

};

app.initialize();`

Image Tracking Crash on Vuzix M400

Hello,

The sample app crashes on Vuzix M400 glasses when I try to use image and object tracking features before starting the camera. This occurs both with Native Android and Javascript SDKs. There is no problem in instant tracking, face detection and many other features on the same device. All features work perfectly on my smartphone. The error messages are:

2021-09-10 15:26:03.810 590-765/? E/CamX: [ERROR][ISP ] camxifecrop10.cpp:689 ValidateDependenceParams() Invalid Crop window 8, 24, 4032, 3024, input dimension 4032 * 3024
2021-09-10 15:26:03.897 590-765/? E/CamX: [ERROR][STATS_AF ] af_core_input.cpp:167: af_map_input_pdaf_info input is invalid
2021-09-10 15:26:03.898 590-765/? E/CamX: [ERROR][ISP ] camxifemnds16.cpp:884 ValidateDependenceParams() Crop window 8, 24, 4032, 3024, input dimension 4032 * 3024
2021-09-10 15:26:03.898 590-765/? E/CamX: [ERROR][ISP ] camxifecrop10.cpp:689 ValidateDependenceParams() Invalid Crop window 8, 24, 4032, 3024, input dimension 4032 * 3024
2021-09-10 15:26:03.898 590-765/? E/CamX: [ERROR][ISP ] camxifemnds16.cpp:884 ValidateDependenceParams() Crop window 8, 24, 4032, 3024, input dimension 4032 * 3024
2021-09-10 15:26:03.898 590-765/? E/CamX: [ERROR][ISP ] camxifecrop10.cpp:689 ValidateDependenceParams() Invalid Crop window 8, 24, 4032, 3024, input dimension 4032 * 3024 

and

Abort message: 'java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: JNI GetObjectClass called with pending exception java.lang.RuntimeException: Fail to get camera info'

Thanks.

Moverio 200

When I start the Samples my screen goes black!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.