Skip to content

Instantly share code, notes, and snippets.

View fand's full-sized avatar
💭
🔪

AMAGI / Jun Yuri fand

💭
🔪
View GitHub Profile
@fand
fand / flux_history.md
Last active October 19, 2016 04:26
Flux戦争の歴史

Flux戦争の歴史メモ

Fluxxor by binarymuse

  • 2014/05/12 first commit
    • F8での "Flux" の登場からわずか4日
  • 素朴な実装
  • mixinベースの機能
    • 〜React v0.12という感じ

Reflux by spoike

@fand
fand / mome.md
Created November 12, 2016 03:49
Node Discussionメモ

Node Discussion

ゲスト

  • Douglas Crockford (https://github.com/douglascrockford)
    • PayPal
    • JavaScript Good Parts
  • James Snell (@jasnell)
    • IBM's Technical Lead for Node.js
    • Node.js TSC, CTC
  • Bradley Farias (@bradleymeck)
@fand
fand / flux_history_2.md
Last active November 29, 2016 06:40
めもだお

Fluxの歴史(Redux以後)

flux-utils

  • 2015-08-20に登場(facebook/flux@2.1.0)
  • ImmutableJSを利用
  • Reduxの影響おおきい
    • waitForは使える

facebook/relay

  • It was announced at React.js Conf (January 2015).
@fand
fand / codebase_overview.md
Last active December 12, 2016 03:17
ReactのCodebase Overview, Implementation Notes要約

Codebase Overview

https://facebook.github.io/react/contributing/codebase-overview.html

Custom Module System

  • FacebookではHasteというモジュールシステムを使っている
    • all filenames are globally unique
    • require('../foo/bar') の代わりに require('bar') とする
    • ファイル移動しても壊れない
    • Fuzzy Finder使いやすい
  • ビルド時に、全てのファイルを /lib 下にフラットに配置する
@fand
fand / gekidasa.js
Last active December 20, 2016 13:04
セミコロン付けるとダサい.js
import React from 'react';
export default class Foo extends React.Component {
constructor () {
super();
this.state = { count : 0 };
}
increment = () => this.setState({ count : this.state.count + 1 }) // ;付けるとダサい気がする
@fand
fand / Validator.js
Created January 17, 2017 06:31
input要素をラップしてsetCustomValidityしてくれる君
const React = require('react');
class Validator extends React.Component {
static propTypes = {
inputProps : React.PropTypes.object.required,
isValid : React.PropTypes.boolean.required,
message : React.PropTypes.object.required,
}
@fand
fand / metaball.frag
Created May 8, 2017 22:52
shader sample
#ifdef GL_ES
precision mediump float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
float metaball (in vec2 position) {
@fand
fand / log.txt
Last active May 12, 2017 04:57
npm cache clean && npm install -g webgl-workshop --verbose
❯ npm install -g webgl-workshop --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/Cellar/node/7.9.0/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'install',
npm verb cli '-g',
npm verb cli 'webgl-workshop',
npm verb cli '--verbose' ]
npm info using npm@4.2.0
npm info using node@v7.9.0
void main(void){
vec2 st = gl_FragCoord.xy/u_resolution.xy;
vec3 color = vec3(0.0);
// Divide the space in 4
st = tile(st,4.);
color += vec3(box(st,vec2(.96),0.01));
st = rotate2D(st,PI*0.25);
@fand
fand / base.glsl
Created May 22, 2017 15:32
1分でわかるglsl
#ifdef GL_ES
precision mediump float;
#endif
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
uniform sampler2D backBuffer;
#define PI 3.141592