Skip to content

Instantly share code, notes, and snippets.

View nitin42's full-sized avatar
👋

Nitin Tulswani nitin42

👋
View GitHub Profile
{
Expression: {
BinaryExpression: {
left: {
LiteralExpression: {
value: 12
}
},
operator: '*',
right: {
@nitin42
nitin42 / Result.js
Last active February 26, 2018 18:36
const CarVisitor = {
accelerate: function(visitor) {
console.log(`Yeah! I am driving a ${visitor.name}.`)
},
brake: function(visitor) {
console.log(`Brakes failed in ${visitor.name}.`)
}
}
@nitin42
nitin42 / Cartype.js
Last active February 26, 2018 16:39
class Sedan extends Car {
constructor(name) {
super()
this.name = name
}
operate(visitor=CarVisitor) {
visitor.accelerate(this)
}
}
@nitin42
nitin42 / Cars.js
Last active February 26, 2018 18:11
class Car {
// Concrete method for operating different types of cars
operate(carVisitor) {}
}
interface CarVisitor {
void accelerate(Sedan sedan),
void brake(Hatchback hatchback)
}
abstract class Cars {
abstract void operate(CarVisitor carVisitor);
}
const CarVisitor = {
accelerate: function(visitor) {
console.log(`Yeah! I am driving a ${visitor.name}.`)
},
brake: function(visitor) {
console.log(`Brakes failed in ${visitor.name}.`)
}
}
@nitin42
nitin42 / Example.js
Last active February 26, 2018 15:40
Base car class
// Class definitions for types of cars.
class Car {
}
class Sedan {
}
var THREEx = THREEx || {}
THREEx.Portal360 = function(videoImageURL, doorWidth, doorHeight){
var doorCenter = new THREE.Group
doorCenter.position.y = doorHeight/2
this.object3d = doorCenter
//////////////////////////////////////////////////////////////////////////////
// build texture360
//////////////////////////////////////////////////////////////////////////////
// arjs-hit-testing
//////////////////////////////////////////////////////////////////////////////
AFRAME.registerComponent('arjs-portal-door', {
schema: {
url : { // Url of the content - may be video or image
type: 'string',
},
doorWidth : { // width of the door
type: 'number',

API Reference

API for ReactArToolKit component is experimental

ReactArToolKit component props

toolKitSource

Property Type Default Supported values