Skip to content

Instantly share code, notes, and snippets.

View wonglok's full-sized avatar
🙏
Thank you Jesus for the new life

Wong Lok wonglok

🙏
Thank you Jesus for the new life
View GitHub Profile
@wonglok
wonglok / vat.py
Created August 9, 2023 03:29
avatar fake crowd vat
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@wonglok
wonglok / blender-socket.py
Last active March 28, 2023 09:15
websocket with blender
import asyncio
import websockets
async def echo(websocket):
async for message in websocket:
await websocket.send(message)
async def main():
async with websockets.serve(echo, "localhost", 8173):
await asyncio.Future() # run forever
@wonglok
wonglok / pattern xyy.glsl
Created March 1, 2023 10:11
pattern xyy.glsl
const float MY_PI = 3.14159265;
const float MY_SCALE = 1.0;
const mat3 m = mat3(
cos(MY_PI * MY_SCALE), -sin(MY_PI * MY_SCALE), 0.0,
sin(MY_PI * MY_SCALE), cos(MY_PI * MY_SCALE), 0.0,
0.0, 0.0, 1.0
);
float noise( in vec3 p ) {
return cos(p.x) * sin(p.y) * cos(p.z);
@wonglok
wonglok / index.html
Created June 14, 2022 08:56 — forked from BlueMagnificent/index.html
Javascript 3D Physics Snippet Four
<html>
<head>
<meta charset="utf-8">
<title>JS 3D Physics</title>
<style>
body { margin: 0; }
</style>
</head>
<body>
<script src="js/three.js"></script>
@wonglok
wonglok / tryme.js
Last active February 14, 2022 01:26
tryme.js
import { OrbitControls } from "@react-three/drei";
import { Canvas } from "@react-three/fiber";
import { Bloomer } from "../vfx-library/Bloomer";
import { ENLogicGraphAutoLoad } from "../vfx-runtime/ENLogicGraph";
export default function TryMe() {
let REPLACE_ME = `-MvpfxG3QZ37safQAPJS`;
return (
<Canvas dpr={3}>
{/* content-sphere */}
@wonglok
wonglok / effect node by you rules json.js
Last active February 14, 2022 00:59
effect node by you rules json
{
"rules": {
".read": true,
".write": false,
//
//
"profile": {
"$owner_user_id": {
".read": "true",
@wonglok
wonglok / AppExample.js
Last active February 12, 2022 03:42
Per-Pixel-Glow-Threejs with FXAA
<AppMiniAPI>
{({ api }) => {
return (
<Starter reducedDPI={2}>
<GLMiniAPI api={api}>
{({ gpi }) => {
return (
<LinkGLToDOMAPI
init={() => {
api.now.renderMode = "pixel"; // pixel, mesh, none
@wonglok
wonglok / fun fun face funz.js
Created November 22, 2021 08:14
ReadyPlayerMe + FaceCap App
import { useFBX, useGLTF, OrbitControls as DOrbit } from "@react-three/drei";
import { useFrame, useLoader, useThree } from "@react-three/fiber";
import { Suspense, useEffect, useRef } from "react";
import {
AnimationMixer,
FileLoader,
NumberKeyframeTrack,
AnimationClip,
NormalAnimationBlendMode,
Audio,
@wonglok
wonglok / video.js
Last active November 22, 2021 02:38
export const videoStuff = {
day1: {
lounge: {
screen1:
"https://res.cloudinary.com/loklok-keystone/video/upload/v1637548204/capitalcode-artbasel-2021/day1/screen1-day-1.mp4",
screen2:
"https://res.cloudinary.com/loklok-keystone/video/upload/v1637548203/capitalcode-artbasel-2021/day1/screen2-day-1.mp4",
screen3:
"https://res.cloudinary.com/loklok-keystone/video/upload/v1637548203/capitalcode-artbasel-2021/day1/screen3-day-1.mp4",
screen4:
@wonglok
wonglok / test.json
Last active November 22, 2021 01:59
test
{
"day": 1,
"data": "abc",
"link":"http://google.com"
}