This file contains 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 * as THREE from 'three' | |
const video = document.createElement('video') | |
export const vidTexture = new THREE.VideoTexture(video) | |
vidTexture.center.set(0.5, 0.5) | |
const resize = () => { | |
const wWidth = document.body.offsetWidth | |
const wHeight = document.body.offsetHeight | |
const vWidth = video.videoWidth |
This file contains 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 viswanath = 1.1319882487943 | |
const numTurns = 5000 | |
const posNeg = () => Math.random() > 0.5 ? 1 : -1 | |
let prev = 1 | |
let curr = 1 | |
let temp | |
for (let i = 0; i < numTurns; i++) { |
This file contains 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 fs = require('fs') | |
const Wifi = require('rpi-wifi-connection') | |
const internetAvailable = require('internet-available') | |
const logIntervalMs = 1000 // 1000 * 60 * 10 | |
const errIntervalMs = 5000 | |
let lastLog = Date.now() | |
const wifi = new Wifi() |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, maximum-scale=1, user-scalable=no"/> | |
<title>Screenshot Test</title> | |
<style> | |
html, body { | |
height: 100%; | |
width: 100%; |
This file contains 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 { BloomEffect, EffectComposer, EffectPass, RenderPass } from 'postprocessing' | |
// Custom three pipeline module to try and implement postprocessing | |
// Can get scene rendering with camera feed background, but adding any other effect passes causes a white background | |
export const threePipelineModule = () => { | |
let scene3 | |
return { | |
name: 'customthreemodule', | |
onStart: ({ canvas, canvasWidth, canvasHeight, GLctx }) => { |
This file contains 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
// Custom three pipeline module because 8th wall's doesn't allow for custom renderer config | |
// also it has problems with raycasting when using three >= r103 because of this PR: | |
// https://github.com/mrdoob/three.js/pull/15996 | |
const threePipelineModule = () => { | |
let scene3 | |
return { | |
name: 'customthreemodule', | |
onStart: ({ canvas, canvasWidth, canvasHeight, GLctx }) => { | |
const scene = new window.THREE.Scene() |