Skip to content

Instantly share code, notes, and snippets.

@Trass3r
Trass3r / torch.ts
Last active September 2, 2024 14:15
Babylon Playground Torch
class Torch {
private holderInstance: BABYLON.InstancedMesh; // Instance of the torch holder
private flameSprite: BABYLON.Sprite; // Sprite for the flame
private torchLight: BABYLON.PointLight; // Light for the torch flame
private torchTransform: BABYLON.TransformNode; // Transform node for grouping
private static torchHolderBaseMesh: BABYLON.Mesh;
private static flameManager: BABYLON.SpriteManager;
constructor(
scene: BABYLON.Scene,
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOGEN_ORIGIN_DEPENDS OFF)
set(CMAKE_GLOBAL_AUTOGEN_TARGET ON)
set(CMAKE_UNITY_BUILD OFF CACHE BOOL "")
set(CMAKE_UNITY_BUILD_BATCH_SIZE 4)
add_compile_options("$<$<CONFIG:Debug>:-Og;-fno-omit-frame-pointer>" -fvisibility-inlines-hidden) # -ftime-trace) # ;-gsplit-dwarf
link_libraries(debug -Wl,--gdb-index)
link_libraries(debug -Wl,--gc-sections)
[
"-i",
"VID.mp4",
"-map", "0:a", "-c:a", "copy",
"rec.m4a"
]
cd %USERPROFILE%\Desktop\ViVeTool-v0.3.3
ViVeTool.exe /query /id:36354489,37634385,39145991
vivetool /fullreset
vivetool /disable /id:40729001,37634385
@Trass3r
Trass3r / docker-wsl.sh
Created August 1, 2023 16:44
setup Docker in WSL2
# https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
@Trass3r
Trass3r / CMakeLists.txt
Last active April 23, 2024 10:59
boost stacktrace enabler
#target_compile_definitions(${TARGET} PRIVATE BOOST_STACKTRACE_USE_BACKTRACE)
target_link_libraries(${TARGET} PRIVATE dl)
#target_link_libraries(${TARGET} PRIVATE backtrace)
ldmd2 -i -O -release -inline -L--gc-sections -Xcc=-static-libgcc dustmite.d -v
docker run --rm -it -v `pwd`:/workspace/ ubuntu:rolling
sudo chown 1000:1000 dustmite
var createScene = function() {
var scene = new BABYLON.Scene(engine);
var camera = new BABYLON.ArcRotateCamera("Camera", - Math.PI / 2, Math.PI / 4, 10, BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, true);
var light1 = new BABYLON.DirectionalLight("DirectionalLight", new BABYLON.Vector3(0, -1, 1), scene);
var light2 = new BABYLON.HemisphericLight("HemiLight", new BABYLON.Vector3(0, 1, 0), scene);
light1.intensity =0.75;
light2.intensity =0.5;
@Trass3r
Trass3r / test.wpaProfile
Last active February 7, 2023 13:23
WPA profile for exporting template instantiation statistics via `wpaexporter build.etl -profile test.wpaProfile -delimiter "\t"`
<?xml version="1.0" encoding="utf-8"?>
<WpaProfileContainer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="2" xmlns="http://tempuri.org/SerializableElement.xsd">
<Content xsi:type="WpaProfile2">
<Sessions>
<Session Index="0">
<FileReferences />
</Session>
</Sessions>
<Views>
<View Guid="ab3305f1-304e-4545-9f85-0b7488072055" IsVisible="true" Title="Analysis">
@Trass3r
Trass3r / base.json
Created November 9, 2022 16:15
magic enum base benchmark
{
"traceEvents": [
{
"pid": 8058,
"tid": 8058,
"ph": "X",
"ts": 3546,
"dur": 108,
"name": "Source",
"args": {