- 電源を入れる。
- 適当に初期設定をする。アカウント作成などはしない。Googleアカウントも不要。
- Wi-Fiに接続する。
- 端末をGear VRに接続する。そしてすぐ外す。
- Gear VRセットアップを行う。適当に同意しつつ必要なアプリをインストールする。Oculusアカウントのセットアップまで来たら、終了して良い
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Runtime.InteropServices; | |
public class VideoPlayer: MonoBehaviour { | |
public string videoPath; | |
public bool autoPlay = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.Matrix; | |
public class MatrixUtils { | |
public static Info decomposition(Matrix matrix, boolean reverseOrder) { | |
double dx, dy, sx, sy, theta; | |
float[] values = new float[9]; | |
matrix.getValues(values); |
{
"Version": "2012-10-17",
"Statement": [{
"Action": [
"sns:CreatePlatformEndpoint"
],
"Effect": "Allow",
"Resource": "arn:aws:sns:****"
}, {
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'), | |
Promise = require('promise'), | |
extend = require('extend'); | |
module.exports = QueuedRequest; | |
function QueuedRequest(interval) { | |
this.interval = interval; | |
this.queue = []; | |
this.loop = loop.bind(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = [1, 2, 3, 4, 5]; | |
// shift は先頭を取り出す | |
a.shift(); // -> 1 | |
console.log(a); // -> [2, 3, 4, 5] | |
// push は末尾に入れる | |
a.push(111); | |
console.log(a); // -> [2, 3, 4, 5, 111] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/myapp'); | |
var schema = new mongoose.Schema({ | |
name: String | |
}); | |
var model = mongoose.model('MyModel', schema); | |
new model({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.SurfaceTexture; | |
import android.media.MediaPlayer; | |
import android.os.Bundle; | |
import android.renderscript.Allocation; | |
import android.renderscript.RenderScript; | |
import android.view.Surface; | |
import android.view.TextureView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Activity; | |
import android.graphics.SurfaceTexture; | |
import android.os.Bundle; | |
import android.renderscript.Allocation; | |
import android.renderscript.Element; | |
import android.renderscript.RenderScript; | |
import android.renderscript.Type; | |
import android.view.Surface; | |
import android.view.TextureView; | |
import android.view.View; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyFaceDetectionListener implements Camera.FaceDetectionListener { | |
private Matrix m = new Matrix(); | |
private RectF rect = new RectF(); | |
// Call this before startFaceDetection(). | |
// targetWidth and targetHeight are usually size of view which shows camera preview. | |
public void setup(boolean useFrontCamera, int displayOrientation, float targetWidth, float targetHeight) { | |
m.setScale(useFrontCamera ? -1 : 1, 1); | |
m.postRotate(displayOrientation); | |
m.postTranslate(1000, 1000); |