Skip to content

Instantly share code, notes, and snippets.

View andreyrd's full-sized avatar

Andrey Radchishin andreyrd

View GitHub Profile

Keybase proof

I hereby claim:

  • I am andreyrd on github.
  • I am andreyrd (https://keybase.io/andreyrd) on keybase.
  • I have a public key ASCGDaKqHCkPsKkN9zExfA-Y2xuJIdNcu7_EDIfnphDJpwo

To claim this, I am signing this object:

@andreyrd
andreyrd / aframe-ar.js
Created March 2, 2019 01:06
AR.js Builds Commit 4669d09
This file has been truncated, but you can view the full file.
((function(){"use strict";var ARController=(function(width,height,camera){var id;var w=width,h=height;this.orientation="landscape";this.listeners={};if(typeof width!=="number"){var image=width;camera=height;w=image.videoWidth||image.width;h=image.videoHeight||image.height;this.image=image}this.defaultMarkerWidth=1;this.patternMarkers={};this.barcodeMarkers={};this.transform_mat=new Float32Array(16);this.canvas=document.createElement("canvas");this.canvas.width=w;this.canvas.height=h;this.ctx=this.canvas.getContext("2d");this.videoWidth=w;this.videoHeight=h;if(typeof camera==="string"){var self=this;this.cameraParam=new ARCameraParam(camera,(function(){self._initialize()}),(function(err){console.error("ARController: Failed to load ARCameraParam",err)}))}else{this.cameraParam=camera;this._initialize()}});ARController.prototype.dispose=(function(){artoolkit.teardown(this.id);for(var t in this){this[t]=null}});ARController.prototype.process=(function(image){this.detectMarker(image);var markerNum=this.getMarkerNu
@andreyrd
andreyrd / nibs.swift
Created February 23, 2018 03:25
Doesn't work with Swift4
var topLevelObjects = NSArray()
Bundle.main.loadNibNamed(NSNib.Name("MyCustomView"), owner: self, topLevelObjects: &topLevelObjects)
let views = (topLevelObjects as Array).filter { $0 is NSView }
let content = views[0] as! NSView
content.frame = bounds
addSubview(content)
@andreyrd
andreyrd / keybase.md
Created June 27, 2017 04:03
keybase.md

Keybase proof

I hereby claim:

  • I am andreyrd on github.
  • I am andreyrd (https://keybase.io/andreyrd) on keybase.
  • I have a public key ASCJ9VtFvlTaIQpxduofTFAwTMvPP0pZ_ADTVWqcVN9y_go

To claim this, I am signing this object: