This file contains hidden or 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
const path = require("path") | |
const glob = require("glob") | |
const { map } = require("lodash") | |
// specify html files by magic path | |
const htmlFilePath = "public/**/*.html" | |
function readFile(path, encode = "utf-8") { | |
return new Promise((resolve, reject) => { | |
fs.readFile(path, encode, (err, data) => { |
This file contains hidden or 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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Microsoft.Azure.Kinect.Sensor; | |
using System; | |
public class KinectTest : MonoBehaviour | |
{ | |
private Device device = null; |
This file contains hidden or 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 System; | |
using System.IO; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// ex1. CSVReader.getData(csvFile) | |
// ex2. CSVReader.getData(csvFile, ",") | |
public class CSVReader | |
{ |
This file contains hidden or 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 _ from 'lodash'; | |
function exec(obj, cb) { | |
switch (obj.type) { | |
case 'Mesh': | |
case 'SkinnedMesh': | |
case 'LineSegments': | |
cb(obj); | |
break; | |
default: |
This file contains hidden or 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 _ from 'lodash'; | |
export default function traverseMaterials(object, callback) { | |
// multi material | |
if (_.isArray(object.material)) { | |
_.forEach(object.material, (material) => { | |
callback(material); | |
}); | |
return; |
This file contains hidden or 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
// 実際の画像の大きさに合わせてfilterのshader側でuvを[0-1]に収めるための関数 | |
// 参考: http://www.html5gamedevs.com/topic/23790-uv-in-filters/ | |
export default (vert, frag, uniforms = {}) => { | |
if (!uniforms.mappedMatrix) { | |
uniforms.mappedMatrix = { | |
type: 'mat3', | |
value: new PIXI.Matrix(), | |
}; |
NewerOlder