11. VIRTUAL REALITY
“…A computer-generated simulation
of a three-dimensional image or
environment that can be interacted
with in a seemingly real or physical
way by a person using special
electronic equipment.”
15. Mixed Reality
“…Is the merging of real and virtual worlds
to produce new environments and visualisations
where physical and digital objects co-exist and interact in real time.”
20. Mobile Augmented Reality could become the primary
driver of a $108 billion VR/AR market by 2021
(underperform $94 billion, outperform $122 billion)
https://www.digi-capital.com/news/2017/01/after-mixed-year-mobile-ar-to-drive-108-billion-vrar-market-by-2021
29. WHY
- It’s much more immersive than AR/VR
- The commercetools API is flexible and
allows us to
- We wanted to experiment something
New; Never done before
- Why not?
47. CollisionAPIRequest.js
function addLineItem(productId) {
changeTextAndColor("Loading...", Color.yellow);
var requestUrl = "https://api.sphere.io/medimux-shop/carts/" + loggedUserCartId;
var getUserCart = gameObject.Find("API").GetComponent.<GetAPI>().Get(requestUrl);
yield getUserCart;
if (getUserCart.error) {
// If it fails to return the information, logs the error in the console
Debug.Log(getUserCart.error);
} else {
var currentCartVersion = JSON.Parse(getUserCart.text)["version"];
var cartVersionNumber = int.Parse(currentCartVersion);
// Builds body for the POST request
var requestBody = "{"version":" + cartVersionNumber
+ ", "actions": [{ "action": "addLineItem","
+ ""productId": "" + productId
+ "", "variantId": 1 }]}";
var postAddLineItem = gameObject.Find("API").GetComponent.<GetAPI>().Post(requestUrl, requestBody);
yield postAddLineItem;
if (!postAddLineItem.error) {
gameObject.Find("cartInSuccessSound").GetComponent.<AudioSource>().Play();
changeTextAndColor("Product added", Color.green);
} else {
// Plays feedback Audio
gameObject.Find("cartInErrorSound").GetComponent.<AudioSource>().Play();
changeTextAndColor("Product cannot be added", Color.red);
};
}
}
addLineItem
58. API.js
function Get(url) {
var form = new WWWForm();
var headers = form.headers;
headers["Accept"] = "application/json";
headers["Content-Type"] = "application/json";
headers["Authorization"] = generatedToken;
return new WWW(url, null, headers);
}
function Post (url, payload : String) {
var form = new WWWForm();
var headers = form.headers;
var encoding = new System.Text.UTF8Encoding();
var rawData = encoding.GetBytes(payload);
headers["Accept"] = "application/json";
headers["Content-Type"] = "application/json";
headers["Authorization"] = generatedToken;
return new WWW(url, rawData, headers);
}
getProductInfo();
getToken();
getUserCart();
getHologramsList();
postRemoveLineItem();
postAddLineItem();
60. DEVELOPING FOR HOLOLENS
WHERE TO START
- Follow step-by-step tutorials
https://developer.microsoft.com/en-us/windows/mixed-reality/academy
- Grab the tools
Unity, Visual Studio, Windows OS
- Deep dive on the documentation
https://docs.microsoft.com/en-us/hololens/