Skip to content

Instantly share code, notes, and snippets.

View n0mimono's full-sized avatar

Ryota Yokote n0mimono

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Copy Link P</title>
<link rel="stylesheet" type="text/css" href="../styles/popup.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
import * as React from 'react'
import { Dispatch } from 'redux'
import { connect } from 'react-redux'
import { AppState, history } from '../store'
import * as Common from '../modules/common'
const Menu: React.SFC<Common.PageProps> = (props) => {
let key = Common.PathIndeces.indexOf(props.path)
@n0mimono
n0mimono / Home.tsx
Last active June 9, 2018 15:00
Example: React + Redux + Router + TypeScript
import * as React from 'react'
import { Dispatch } from 'redux'
import { connect } from 'react-redux'
import { AppState } from '../store'
import * as Home from '../modules/home'
// container component
type Props = Home.State & Home.Actions
@n0mimono
n0mimono / YtlClient.cs
Created February 12, 2018 06:22
Unity script example for YouTube Live Streaming
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEngine;
using UnityEngine.Networking;
using SimpleJSON;
namespace YouTubeLive {
public class Chat {
public class Msg {
@n0mimono
n0mimono / YouTubeLiveController.cs
Created February 12, 2018 06:10
Unity script example for YouTube Live Streaming API
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System;
using System.Net;
using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.Networking;
using SimpleJSON;
namespace UnityChan {
public class SpringManagerForVRIK : SpringManager {
void Start() {
springBones = GetComponentsInChildren<SpringBone>();
}
void LateUpdate() {
var solver = GetComponent<RootMotion.FinalIK.VRIK>();
solver.UpdateSolverExternal();
resources
// ref: https://wgld.org/
// ref: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm
// ref: http://blog.hvidtfeldts.net/
// ref: https://www.shadertoy.com/view/lsl3W2
Shader "Raymarch_Object_Deferred_World_Fractal_02" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_Value ("Value", Vector) = (1,1,1,1)
_Iteration ("Iteration", Float) = 32
Shader "Raymarch_Deferred" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_Albedo ("Albedo", Color) = (1,1,1,1)
_Specular ("Specular", Color) = (0.5, 0.5, 0.5, 0.9)
_Emission ("Emission", Color) = (0, 0, 0, 0)
}
/////////////////////////////////////////////////////
CGINCLUDE
// ref: https://wgld.org/
// ref: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm
// ref: http://blog.hvidtfeldts.net/
Shader "Raymarch_Object_Deferred_World_Fractal_02" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
_Value ("Value", Vector) = (1,1,1,1)
}
SubShader {