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 Koa = require('koa'); | |
const path = require('path'); | |
const serve = require('koa-static'); | |
const http = require('http'); | |
const https = require('https'); | |
const fs = require('fs'); | |
const commonDir = path.join(__dirname, '..', 'Client'); | |
const app = new Koa(); |
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
webRtcPlayerObj.onWebRtcOffer = function (offer) { | |
if (ws && ws.readyState === WS_OPEN_STATE) { | |
removeExtmapAllowMixed(offer); | |
let offerStr = JSON.stringify(offer); | |
console.log(`-> SS: offer:\n${offerStr}`); | |
ws.send(offerStr); | |
} | |
}; | |
function removeExtmapAllowMixed(desc) { |
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
//HLSL Animated Normal Map for Unreal Engine material (custom node) | |
float2 uv = iCoord.xy / iResolution.xy; // iCoord - UV, iResolution - Float2(1,1) | |
float h = 0.6 * iTexture; // iTexture - RGBA (Float4) | |
float w = 40.0; | |
float3 n = normalize(float3(ddx(h) * w, ddy(h) * w, 1.0)); | |
return float4(n * 0.5 + 0.5,1.0); |
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
<html> | |
<head> | |
<title>SVG animation demo dy #BlondieCode</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
html, body{ | |
min-height: 100vh; | |
margin: 0; | |
padding: 0; |
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
<html> | |
<head> | |
<title>Lazy loading by #Blondiecode</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
body { | |
font-family: Arial, "Helvetica Neue", Helvetica, serif; | |
} | |
footer { |
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 request = require("request"); | |
const Promise = require('bluebird'); | |
const getUrl = Promise.promisifyAll(request); | |
let requestsSent = 0; | |
let requestsSuccess = 0; | |
//======================= jsonGet Function =======================// |
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 cluster = require('cluster'); | |
const http = require('http'); | |
const port = 6006; | |
const requestHandler = (request, response) => { | |
response.writeHead(200); | |
if (request.url === '/error') { | |
// uncaught exception |
NewerOlder