Skip to content

Instantly share code, notes, and snippets.

View akfish's full-sized avatar
🎯
刻舟求剑

大芡猫 akfish

🎯
刻舟求剑
View GitHub Profile
@akfish
akfish / !PEROOF.md
Last active April 3, 2017 17:23
Peroof Storage Format
@akfish
akfish / react-usage.jsx
Last active November 22, 2016 19:39
hypercube.css
import React from 'react'
import Hypercube from 'react-hypercube'
// Use normal `style` attributes
class My3DComponent extends React.Component {
render() {
return (
<div style={{
width: '800px',
height: '800px',
@akfish
akfish / shader-def-no-keywords.js
Last active March 14, 2016 09:56
GLSL in JavaScript with Babel
// flow type alias
// see http://flowtype.org/docs/type-aliases.html
type MVP = {
m: vec4,
v: vec4,
p: vec4
}
@uniform
const UFoo _.extends(UMVP, {
@akfish
akfish / mock.js
Created May 24, 2015 13:06
JavaScript Fractal Mock Up
var opts = {
background: { b: -0.1, s: 0.25, h:44 }
};
var AncientMap = Shape.Declare()
.Rule(function() {
new Wall()
.adjust({b: 0.1, h: 34});
new Wall()
.translateY(0.95)
@akfish
akfish / api.js
Created May 23, 2015 13:11
Context Free JS Port High Level API Mock-up
// The compiler
var AK = require('ak'),
// Render target
canvas = require('ak/target/node');
// This compiles a CFDG file into a JavaScript class
var Art = AK.Generate('path/to/src.cfdg');
// Create an instance with canvase target
var art = new Art(canvas);
@akfish
akfish / controllor.lua
Last active August 29, 2015 14:17
PID Controllor for Hypnotizd's Reactor Controller
----------------------------------------------------------
-- Active Cooling Big Reactor Monitor --
-- --
-- Minecraft HermitCraft FTB Infinity Episode 28 --
-- https://www.youtube.com/watch?v=cIPxwZJWOiE --
-- --
-- YouTube Channel http://youtube.com/hypnotizd --
-- --
-- Add PID Algorithm By AKFish --
-- https://github.com/akfish --
@akfish
akfish / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@akfish
akfish / concept.coffee
Created July 30, 2014 15:48
seajs-worker map-reduce concept
# Implement worker class
class FooWorker extends SeaWorker
@worker_service 'fac', (n) -> do_stuff_with n
# Simple Array, maxiumn 10 workers
FooWorker.map [0, 1, 2, n], 'fac', 10
# Reduce
@akfish
akfish / concept.md
Created July 27, 2014 08:44
Sea.js worker support concept

Manually

Module

# foo.coffee
# This module can be required in both browser and worker 
define (require, exports, module) ->
  bar = require 'bar'
 
@akfish
akfish / comsumer.coffee
Created June 24, 2014 06:59
Shared object in sea.js
define (require, exports, module) ->
# Get shared object container
shared = require './shared'
# Get things out
# As long as this code is run after producer, everything will be there
console.assert shared.flag?
console.assert shared.flag
console.assert shared.doggy == 'wow'