Skip to content

Instantly share code, notes, and snippets.

@sommerper
sommerper / Scene.svelte
Created January 21, 2024 20:17
Threlte Preloading texture and gltf
<script lang="ts">
import Lenis from '@studio-freight/lenis';
import DeviceDetector from 'device-detector-js';
import { Canvas } from '@threlte/core';
import { onMount } from 'svelte';
import { injectLookAtPlugin } from '$lib/threlteplugins/lookat';
import { Environment } from '@threlte/extras';
import { OrbitControls } from '@threlte/extras';
import { Group } from 'three';
import * as THREE from 'three';
@sommerper
sommerper / +page.svelte
Last active January 19, 2024 20:02
threlte preload
<script lang="ts">
export const trailingSlash = 'always';
import { Canvas } from '@threlte/core';
import Lenis from '@studio-freight/lenis';
import { onMount } from 'svelte';
import Scene from '$lib/3d/Scene.svelte';
import Stats from 'three/examples/jsm/libs/stats.module';
import { T, forwardEventHandlers, useThrelte, useRender, useFrame } from '@threlte/core';
import { createPreloader } from 'asset-preloader';
@sommerper
sommerper / colemak-dh-hummingbird.md
Last active May 19, 2023 00:17
Colemak-DH for hummingbird type keyboards
/*
 * Copyright (c) 2020 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
@sommerper
sommerper / MultiplayersBuildAndRunMac.cs
Last active May 23, 2020 18:25
Some example files for building and running multiple instances of a multiplayer Unity game
using System;
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Diagnostics;
public static class MultiplayersBuildAndRun
@sommerper
sommerper / cloudSettings
Last active March 8, 2022 15:47
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-03-07T21:34:47.405Z","extensionVersion":"v3.4.3"}