Skip to content

Instantly share code, notes, and snippets.

View cecilemuller's full-sized avatar

Cecile Muller cecilemuller

View GitHub Profile
@toji
toji / motion-controllers-example.js
Created January 23, 2020 18:36
Using motion-controllers.modules.js
// A barebones example of how to use the motion-controllers library and assets repository to load controller models in yor WebXR app
// This gist will not go into the details of how to set up a WebXR app (See https://immersive-web.github.io/webxr-samples/ for that)
// but will instead focus on the parts needed to find and load the appropriate controller.
// The motion-controllers library is small enough that it can easily be dropped into your own codebase if you wish, but loading it
// directly from a CDN like jsdelivr is an even easier route to getting up and running.
import { fetchProfile } from 'https://cdn.jsdelivr.net/npm/@webxr-input-profiles/motion-controllers@1.0.0/dist/motion-controllers.module.js';
// The assets package (https://www.npmjs.com/package/@webxr-input-profiles/assets) is larger, about 67Mb at time of writing,
// so it may be more beneficial to always use a CDN for it, especially since that will enable your app to pick up new controllers
@cecilemuller
cecilemuller / tasks.json
Last active July 14, 2019 05:45
VSCode: Compile Typescript on file save
{
"version": "2.0.0",
"tasks": [
{
"label": "Delete Output Folder",
"type": "shell",
"options": {
"cwd": "${workspaceRoot}"
@cecilemuller
cecilemuller / cubemap.bat
Created May 1, 2019 11:32
Generate a DDS cubemap from 6 JPEG images
texassemble cube -w 1024 -h 1024 -o cubemap.dds px.jpg nx.jpg py.jpg ny.jpg pz.jpg nz.jpg
texconv cubemap.dds -m 0 -y -f BC1_UNORM
@cecilemuller
cecilemuller / photoshop-functions.js
Created April 6, 2019 16:53
Photoshop Scripting
/* eslint-env photoshop */
/**
* New 3D Layer from File.
* @param {String} modelFilepath Absolute path to the 3D file
*
* Examples:
* `addLayer3D('C:\\example\\scene.wrl');`
* `addLayer3D('C:\\example\\scene.dae');`
* `addLayer3D('C:\\example\\scene.obj');`
@fakuivan
fakuivan / dishonored2_cvars.txt
Last active October 7, 2023 22:39
All cvars for Dishonored 2 as of version ``1.77.9.0``, in the format: <cvar struct address> | <cvar name> = <cvar default value> | <cvar int value address> -> <current int value>\n<cvar description>
Dishonored2.exe+3BFC7F0 | aas_subdivisionSize = 64 | Dishonored2.exe+3BFC818 -> 64
the size of subdivisions to use for debug drawing
Dishonored2.exe+340CC20 | achievements_Verbose = 0 | Dishonored2.exe+340CC48 -> 0
debug spam for achievements
Dishonored2.exe+3BFA570 | ai_debugCam = 0 | Dishonored2.exe+3BFA598 -> 0
enable debug camera
Dishonored2.exe+3BFA470 | ai_debugScript = -1 | Dishonored2.exe+3BFA498 -> 4294967295
@cecilemuller
cecilemuller / getMaterialThumbnail.ms
Created January 3, 2019 14:35
Maxscript: get the Material Editor thumbnail for an arbitrary material
-- Reads the 88x88 thumbnail from Material Editor for an arbitrary material.
-- Note that it renders faster when the material editor is closed,
-- so you could call `MatEditor.Close()` first.
--
-- Parameters:
-- mat: a material instance (StandardMaterial, Universal_Material, etc..)
--
-- Returns:
-- a Bitmap or `undefined`
--
@cecilemuller
cecilemuller / marmoset-bake-maps-properties.md
Created December 18, 2018 15:53
Marmoset Toolbag: Bake maps properties

Marmoset Toolbag: Bake maps properties

Example:

import mset

baker = mset.findObject("Baker")
baker.loadPreset("All")
baker.getMap("Normals").enabled = True
@cecilemuller
cecilemuller / marmoset-material-fields.md
Last active January 2, 2022 04:08
Marmoset Toolbag: Shader subroutine fields
#version 410 core
uniform float fGlobalTime; // in seconds
uniform vec2 v2Resolution; // viewport resolution (in pixels)
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing
uniform sampler2D texChecker;
uniform sampler2D texNoise;
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 24, 2024 12:46
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).