Forked from here
A complete cookies reader/writer framework with full unicode support.
This framework is released under the GNU Public License, version 3 or later.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<script src="jquery.js"></script> | |
<script src="tabs.js"></script> | |
<style> | |
nav { | |
border-bottom: 1px solid gray; cursor: default; |
module.exports = function (proc) { | |
const timeout = 3000; | |
const events = new Map(); | |
const rec_events = new Map(); | |
var id = 0; | |
proc.on('message', (message) => { | |
if (message.type == 'request') { | |
var reply = { id: message.id, type: 'reply' } |
const currentTime = () => process.hrtime()[0] * 1000 + process.hrtime()[1] / 1000000; | |
module.exports = class StopWatch { | |
constructor() { | |
this.startTime = 0; | |
this.pauseTime = 0; | |
this.running = false; | |
} | |
start() { | |
this.startTime = currentTime(); |
const fileRegex = /\.(frag|vert|fs|vs|glsl)$/ | |
import fs from "fs"; | |
import path from "path"; | |
function processShader(src, id) { | |
const lines = src.split("\n"); | |
let result = ""; | |
for (const line of lines) { | |
if (line.startsWith("#include ")) { | |
const relativeFile = line.split(" ")[1]; |
import numpy as np | |
def get_tf_mat(i, dh): | |
a = dh[i][0] | |
d = dh[i][1] | |
alpha = dh[i][2] | |
theta = dh[i][3] | |
q = theta |
import { Mesh } from "../mesh"; | |
export async function loadOBJ(url) { | |
const res = await fetch(url); | |
if (res.status == 200) { | |
const text = await res.text(); | |
const vertices = []; | |
const uv = []; |
<canvas id="c"></canvas> | |
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r105/three.min.js"></script> | |
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r105/js/controls/OrbitControls.js"></script> | |
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r105/js/loaders/LoaderSupport.js"></script> | |
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r105/js/loaders/OBJLoader2.js"></script> | |
<script src="https://threejsfundamentals.org/threejs/resources/threejs/r105/js/loaders/MTLLoader.js"></script> |
import { forEach as _forEach } from 'lodash/collection'; | |
import { | |
isObject as _isObject, | |
isString as _isString, | |
isInteger as _isInteger | |
} from 'lodash/lang'; | |
function _reduce(collection, keypath, accumulator) { | |
_forEach(collection, (value, key) => { | |
if (_isObject(value)) { |
A complete cookies reader/writer framework with full unicode support.
This framework is released under the GNU Public License, version 3 or later.
Element.prototype.hasClass = function (className) { | |
return new RegExp(' ' + className + ' ').test(' ' + this.className + ' '); | |
}; | |
Element.prototype.addClass = function (className) { | |
if (!this.hasClass(className)) { | |
this.className += ' ' + className; | |
} | |
}; |