Skip to content

Instantly share code, notes, and snippets.

@tkmn0
tkmn0 / keymap.c
Last active January 8, 2019 02:12
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "keymap_jis.h"
#include "keymap_german.h"
#include "keymap_nordic.h"
//メンバ変数を用意する
var videoFrame: CGRect? = nil
//向きを伝える
override func viewDidAppear(_ animated: Bool) {
NotificationCenter.default.addObserver(self, selector: #selector(ChatViewController.onOrientationChange(notification:)), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
@tkmn0
tkmn0 / gist:b4e93ec238b0d2945e8756a6eae712b1
Created May 24, 2017 15:57
simple manipulator for scenekit (just vector)
func createVectorNode() -> SCNNode{
let vectorX: SCNGeometry = SCNBox(width: 1, height: 0.02, length: 0.02, chamferRadius: 10)
vectorX.materials.first?.diffuse.contents = UIColor.red
let vectorXNode: SCNNode = SCNNode(geometry: vectorX)
vectorXNode.position = SCNVector3(x: 0.5, y: 0, z: 0)
let vectorY: SCNGeometry = SCNBox(width: 0.02, height: 1, length: 0.02, chamferRadius: 10)
vectorY.materials.first?.diffuse.contents = UIColor.green
let vectorYNode: SCNNode = SCNNode(geometry: vectorY)
vectorYNode.position = SCNVector3(x: 0, y: 0.5, z: 0)