Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "Human Scene",
"type": "Object",
"version": 4.4
},
"object": {
"uuid": "1e1a56f6-c7e7-5793-b50f-cb5bcce219a1",
"name": "Human_Scene",
"type": "Scene",
This file has been truncated, but you can view the full file.
{"metadata":{"name":"Human Scene","type":"Object","version":4.4},"object":{"name":"Human_Scene","type":"Scene","background":4144959,"fog":{"type":"Fog","color":4144959,"near":5,"far":30},"children":[{"name":"SkyBox","type":"Mesh","geometry":"9e162647","material":"c43b2dcd","castShadow":false,"receiveShadow":false,"visible":false},{"name":"Spot","type":"SpotLight","color":16773603,"intensity":0.5,"distance":25,"angle":0.3622,"penumbra":0.4833,"matrix":[1,0,0,0,0,1,0,0,0,0,1,0,-2.1699,3.7721,6.4856,1]},{"name":"Ground","type":"Mesh","geometry":"1a37f5b9","material":"1fe84c1b","castShadow":false,"receiveShadow":true},{"name":"DirectorCamera","type":"PerspectiveCamera","aspect":1.7778,"fov":28.8415,"near":0.1,"far":100,"matrix":[0.6022,-0.0119,0.7982,0,0.1125,0.9912,-0.1321,0,-0.7904,0.0701,0.5982,0,-6.8622,1.9626,4.7532,1]},{"name":"Hemi","type":"HemisphereLight","color":13170687,"groundColor":5132800,"intensity":0.75,"matrix":[1,0,0,0,0,1,0,0,0,0,1,0,-4.2919,7.964,-2.466,1]},{"name":"Human","type":"Group","user
@satori99
satori99 / object-format-4-example.json
Created January 14, 2017 04:00
An example of Three.JS Object Format 4 JSON
{
"metadata": {
"name": "Plane",
"type": "Object",
"version": 4.4
},
"object": {
"uuid": "99685005-92eb-5f74-b441-5e5d3366fa9d",
"name": "Plane",
"type": "Mesh",
@satori99
satori99 / GLSL-Noise.md
Created July 3, 2017 23:18 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@satori99
satori99 / suzanne.json
Created January 22, 2018 21:16
Suzanne Mesh - Three.JS Object Format 4
{
"metadata": {
"name": "Suzanne",
"type": "Object",
"version": 4.5
},
"object": {
"uuid": "235e2a72-b8ea-5757-9bba-3d249b2e21cb",
"name": "Suzanne",
"type": "Mesh",
@satori99
satori99 / hdmioff.service
Created March 18, 2018 23:46
Raspberry Pi - HDMI Off Service
# Raspberry Pi - HDMI Off Service
#
# This is a systemd one shot service to disable (power off) the HDMI port
# on a raspberry pi at boot to save a tiny amount of power (30mw)
#
# save this file as `/etc/systemd/system/hdmioff.service`, then run the
# following commands:
#
# $ sudo systemctl enable hdmioff.service
# $ sudo systemctl start hdmioff.service
@satori99
satori99 / fancontrol.sh
Last active March 20, 2018 13:36
Raspberry Pi Cooling Fan Control via GPIO
#!/bin/bash
#
# Raspberry Pi Fan Control Script
#
# This script toggles a GPIO output pin when a system temperature limit is exceed to control a cooling fan.
#
# usage:
#
# $ ./fancontrol.sh
#
@satori99
satori99 / pi3-dlna-setup.md
Last active March 21, 2018 08:14
Raspberry Pi 3 DLNA Server

Raspberry Pi 3 DLNA Server

These are my install notes to configure a Raspberry Pi with an External USB hard drive as super lightweight media server for smart TV's.

Create a Base Image

I have started off with Raspbian-lite Stretch

user@local: ~$ wget http://director.downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2018-03-14/2018-03-13-raspbian-stretch-lite.zip
@satori99
satori99 / app.js
Last active April 17, 2024 09:36
This is a proof-of-concept for using ffmpeg as a HTTP video stream proxy that can reduce the volume of ad-breaks
/**
* This is a proof-of-concept for using ffmpeg as a HTTP video stream proxy
* that can reduce ad volume.
*
* It only works on streams containing SCTE35 data packets.
* You can check a stream using:
*
* ffmpeg -hide_banner -i <SOURCE_URL> 2>&1 | grep scte_35
*
* Start the demo:
@satori99
satori99 / ssdp.js
Last active June 16, 2019 06:08
A simple SSDP server class which responds to M-SEARCH messages
/**
* @file ssdp.js
* @author satori99
*/
const debug = require( 'debug' )( 'SSDP' );
const EventEmitter = require( 'events' );
const dgram = require( 'dgram' );
const net = require( 'net' );