Unity

VR in a Box – Recap

VR in a Box Last Wednessday, March 22th, I was given the opportunity to speak at an evening organized by the Dutch Mobile .NET meetup and hosted my Centric. Since I’ve been playing with the Google Cardboard and Unity3D for a while this was a nice opportunity to tell people about it. I started with a small introduction with a bit of my history with VR and I explained what Google Cardboard is and how it works in combination with Unity3D. The second part of the presentation was about converting a physical cardboard box into a 3D model. I talked…

JavaScript

Progressive Enhancement

Since last December I’ve been giving talks about Progressive Web apps. A couple of them where lightning talks of 10 minutes. One of the things I had to remove to fit the slides and the demo into those 10 minutes was the explanation of Progressive Enhancement, although it’s in the definition of a PWA. So, let me explain…

JavaScript, WinJs

Quick note on WinJS templates and controls

Today I was working streaming (https://livecoding.tv/sorskoot) building my new JavaScript Audio Workstation. I wanted to use a template in a custom WinJS control but found it wasn’t in the samples.  Also, the MSDN documentation contained an error which made it even harder to get it to work.

Visual Studio

Create project from existing code | Cordova, PhoneGap, Ionic, Visual Studio

When I start a new Cordova or Ionic project I normally start from the command line. I initialize the project and add some platforms and packages I need to use in my project. I sometimes start coding from VSCode, but there will be a point where I’d like to switch to Visual Studio, the full version. Until recently I started by creating a new project and move the existing code and config files into that. That was until I came across this awesome feature in Visual Studio: “Create New Project From Existing Code Files”. I don’t know when it was added, but I somehow missed it.

Cordova, Windows 10

Preventing Pinch-Zoom in Cordova on Windows 10 Mobile | Cordova

One of the most obvious ways to spot a Cordova app is a pinch-zoom inside the app. On Android and iOS you can use meta-tags and CSS to disable the pinch-zoom and over scroll. But for some reason I couldn’t get it disabled on Windows 10 mobile.

Angular, Cordova, JavaScript, Visual Studio

Debugging AngularJS in Visual Studio 2015

While working on the Cordova Drum Machine I’m currently streaming live at LiveCoding.tv/sorskoot, I ran into a few issues with Visual Studio debugger. Normally I debug my ‘normal’ AngularJS web applications inside Chrome using an extension on the debug tools that shows the context of the selected HTML element. In Visual Studio I do not have these tools available. Here’s how to get information on the Angular context of a selected element. Scope The first thing that’s really useful to gain insight to is the Angular scope. The scope has to be read from a specific DOM element. To select…

JavaScript

Poor Mans jQuery

A lot of people use jQuery in their HTML/JavaScript applications. There’s nothing wrong with that. But I’ve seen a lot of people use jQuery only to make it easy to find elements and they are not using any of the other jQuery functions. It’s pretty clear that writing a single ‘ $ ‘ instead of the way longer usages of various function on the ‘document‘ object, like getElementById. One of the functions on the ‘document’ object is the querySelectorAll function. This function brings a similar experience to vanilla JavaScript by taking selectors as a parameter.  So if we take a…

Angular, Cordova, Windows 10

Fix unsafe:ms-appx-web issues in Angular and Cordova on Windows 10

During a recent stream over at LiveCoding.TV I ran into some issues with displaying an image in a Cordova app I’m building. This image was stored inside my appx package, but the Content Security Policy blocked it anyways. It turned out I needed to whitelist the ms-appx and ms-appx-web protocols. I modified the initialization of the Angular module to whitelist these protocols for images and hrefs as you can see in the example below: angular.module(‘app’, [‘ngRoute’], function ($compileProvider) { $compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|chrome-extension|ms-appx-web|ms-appx):|data:image\//); $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|chrome-extension|ms-appx-web|ms-appx):/); });