The Unity3D scripting API is a collection of namespaces. API stands for Application Programming Interface. It allows 2 applications to talk to each other. A namespace is a collection of classes, events, enumerations, delegates, interfaces etc that handle a specific task each. So each namespace will handle a specific task each. The most common namespaces are: UnityEngine namespace: collection of pre-built classes, events, interfaces etc
VR Lesson #3: Grab items in VR with hands
The last tutorial focused on grabbing items in virtual reality using the raycaster with Unity3D’s new input system. In this tutorial we go over using hands prefab to grab objects in VR and throw them around. The full tutorial can be found here
VR Lessons #2: Grab items in Virtual Reality
Here is another short tutorial from my VR lesson series here This tutorial uses the new input system to create an interactor. An XR interactor is an object in a scene that can select or move another object in the scene. For example the pointer or your hands in VR. Check out all the full tutorial with steps here
Functions as objects
In JavaScript functions are a type of object known as function object. You can work with function objects as though they were objects. Functions may be assigned to objects, passed in as arguments to other functions, returned from other functions. Additionally a function can be passed into an array. And this gets me to earlier in my articles when I’ve stated “almost everything in JavaScript
Getters & Setters in JavaScript – part 3
Setters in JavaScript. Check out parts 1 and 2 Setters in JavaScript There are three ways you can use setters:1. Default method syntax2. get keyword3. Object.defineProperty() method We will now discuss the above three in detail. 1. Default method syntax The default method syntax can also be used for setters. Setters will set the property of theobject to the value passed in to the setter
Getters & Setters in JavaScript – part 2
carrying on from part 1 .. Getters in JavaScript Getters are functions that retrieve a value from static properties from an external source. You can only access properties and cannot access methods as they are functions of an object or class and are not static.There are three ways you can use getters and setters:1. Default method syntax2. get keyword3. Object.defineProperty() method We will now discuss
Classes in JavaScript – a newbie friendly introduction
Classes In object-oriented programming, class types are templates for creating objects. As we justlearned that in prototypal inheritance, objects inherit properties and methods from aprototype. Classes build upon prototypal inheritance. Classes were introduced in ES6 tomimic the class data type found in Java and other object-oriented programming languages. Till now developers used constructor functions to mimic object-oriented design patterns.JavaScript does not have the class type,
Setters and Getters in JavaScript – part 1
Accessors: Getters and Setters This is part 1 of a brief introduction to getters and setters in JavaScript. Getters and Setters are ES5 features. Objects have two types of properties: Static data property Accessor property So far we have come across static data properties in the objects that we have been making. For example: let blackLivesMatter = { status: true, usecase: ‘daily’ } In this
Playing with MRTK
Playing around with MRTK here It’s a nice succinct tutorial on setting up an XR project and manipulating objects with ObjectManipulator
The break and continue statements in JavaScript
Break and continue statements The break statement is used to exit a loop completely once a condition has been met, or after x number of iterations. As such it is commonly used within an if conditional block. Take as an example the following code: for (let i = 0; i <= 5; i++){ console.log(i); } This will print out the value of variable i from
- 1
- 2
- 3
- …
- 16
- Next Page »