Skip to content

Instantly share code, notes, and snippets.

View naoyashiga's full-sized avatar

Naoya naoyashiga

View GitHub Profile
@naoyashiga
naoyashiga / Tween-Cube-Formation.markdown
Created October 24, 2013 15:56
A Pen by naoyashiga.

Tween Cube Formation

Cubes move in formaiton,Mix,Line,Circle,Cube and Spiral.

using by Three.js and Tween.js.

A Pen by naoyashiga on CodePen.

License.

@naoyashiga
naoyashiga / Catch-the-Particles..markdown
Created October 16, 2013 15:14
A Pen by naoyashiga.
@naoyashiga
naoyashiga / test.js
Created October 10, 2013 14:12
Cubeの各面に異なるマテリアルを使うときはTHREE.jsのバージョンに注意! ref: http://qiita.com/naoyashiga/items/269a9bc3658956afc379
var cube_geo = new THREE.CubeGeometry(
CUBE_WIDTH,
CUBE_HEIGHT,
CUBE_DEPTH,
CUBE_WIDTH_SEGMENTS,
CUBE_HEIGHT_SEGMENTS,
CUBE_DEPTH_SEGMENTS
);
//空のマテリアル
var cube_material = new THREE.MeshFaceMaterial(materials);
@naoyashiga
naoyashiga / gulpfile.js
Last active December 22, 2015 12:42
Bootstrap + Gulp + Jade Setting
var gulp = require('gulp'),

sass = require('gulp-ruby-sass')

notify = require("gulp-notify")

bower = require('gulp-bower'),
jade = require('gulp-jade'),
webserver = require('gulp-webserver');
var config = {

 sassPath: './resources/sass',

 jadePath: './resources/jade',
@naoyashiga
naoyashiga / BaseParticleWithVector.pde
Created November 2, 2015 08:42
Grid Display Processing
class BaseParticleWithVector implements BaseParticleWithVectorInterface {
PVector location;
PVector velocity;
float scalarVelocity;
float r;
BaseParticleWithVector() {
location = new PVector(random(width), random(height));
velocity = new PVector(0, 0);
@naoyashiga
naoyashiga / file0.swift
Last active October 4, 2015 14:39
[Swift]省略記法で$0.0と$0.1を使う例 ref: http://qiita.com/naoyashiga/items/4f06692c2c9a652f36ba
let array = ["カレー","ラーメン","ハンバーグ"]
array.enumerate().forEach { (index, element) in
print("index:\(index) element:\(element)")
}
//省略記法
array.enumerate().forEach {
print("index:\($0.0) element:\($0.1)")
}
@naoyashiga
naoyashiga / BaseParticleWithVector.pde
Last active August 29, 2015 14:28
Trigonometric function(三角関数) ~ Interactive Coding workshop at Tokyo ~
class BaseParticleWithVector implements BaseParticleWithVectorInterface {
PVector location;
PVector velocity;
float scalarVelocity;
float r;
BaseParticleWithVector() {
location = new PVector(random(width), random(height));
velocity = new PVector(0, 0);
@naoyashiga
naoyashiga / SampleViewController.swift
Created August 1, 2015 06:15
rootViewControllerのときだけNavigationBarを非表示にさせる ref: http://qiita.com/naoyashiga/items/c1dc03a60df085321fe3
override func viewWillDisappear(animated: Bool) {
navigationController?.setNavigationBarHidden(true, animated: true)
}
override func viewWillAppear(animated: Bool) {
navigationController?.setNavigationBarHidden(false, animated: true)
}
@naoyashiga
naoyashiga / main.js
Created May 16, 2015 10:14
Convert Photoshop Textlayer text to json
(function(){
"use strict";
var PLUGIN_ID = require("./package.json").name,
MENU_ID = "tutorial",
MENU_LABEL = "$$$/JavaScripts/Generator/Tutorial/Menu=Tutorial";
var _generator = null,
_currentDocumentId = null,
_config = null;