Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Baker andybak

View GitHub Profile
View manifest.json
{
"dependencies": {
"com.unity.ide.vscode": "1.2.5",
"com.unity.textmeshpro": "3.0.6",
"com.unity.timeline": "1.6.4",
"com.unity.ugui": "1.0.0",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
View Open_Brush.cfg
{
"User": {
"Author": "Full of Eyes"
},
"YouTube": {
"ChannelID": "UC3ojcJYTaWaGFiy-UqA8LrQ"
},
"Video": {
"Resolution": 1280,
"Offlineresolution": 1920,
View Gitbook.user.js
// ==UserScript==
// @name Gitbook
// @include https://docs.openbrush.app/*
// @version 0.1
// @match https://www.tampermonkey.net/index.php?version=4.13.6136&ext=fire&updated=true
// @icon https://www.google.com/s2/favicons?domain=tampermonkey.net
// @grant none
// ==/UserScript==
(function() {
View TextureLister.cs
// Copyright 2021 The Tilt Brush Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
View spectator.html
<!doctype html>
<html lang="en">
<head>
<meta charset='UTF-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<style>
div.container {line-height: 1.6; padding-bottom: 20px;}
textarea, input, select {margin: 4px;}
View TestImport.cs
public void TestImport(string filename, Vector3 position, Quaternion rotation)
{
path = Path.Combine(App.MediaLibraryPath(), "Models", path);
var model = new Model(Model.Location.File(path));
model.LoadModel();
var tr = new TrTransform();
tr.translation = position;
tr.rotation = rotation;
CreateWidgetCommand createCommand = new CreateWidgetCommand(
View 1919
path = "m 10.2,65.5 29.2,-1.5 29.3,-0.5 28.3,2 11.6,-2 13.6,1 7.6,-3 4,2.5 12.1,-1 12.6,4 8.6,-5.6 8.1,2 h 5.6 l 5.6,-2 11.6,-2.5 7.1,-1.5 18.2,4.5 12.6,2 c 0,0 13.1,-4.5 15.2,-5.1 2,-0.5 19.2,-9.1 19.2,-9.1 l 8.6,-4.5 5.1,-4 7.6,-2.5 11.6,-1 7.6,1.5 10.1,6.1 10.6,4 9.1,-1.5 h 5.6 l 6.6,0.5 10.1,-4.5 11.1,-1 12.1,-2 7.6,-0.5 h 3 l 8.1,7.6 10.6,2 11.6,5.6 14.6,4.5 20.2,5.1 16.7,-1 11.1,-0.5 38.4,1 h 15 14.1 l 6.6,0.5 3.5,-2 8.6,1.5 11.1,-1 26.3,0.5 h 5.6 l 14.6,0.5";
path = "M 10.2,66 39.5,64.5 68.7,64 97,66 l 11.6,-2 13.6,1 7.6,-3 4,2.5 12.1,-1 12.6,4 8.6,-5.6 8.1,2 h 5.6 l 5.6,-2 11.6,-2.5 7.1,-1.5 18.2,4.5 12.6,2 c 0,0 13.1,-4.5 15.2,-5.1 2,-0.5 19.2,-9.1 19.2,-9.1 l 8.6,-4.5 5.1,-4 7.6,-2.5 11.6,-1 7.6,1.5 10.1,6.1 10.6,4 9.1,-1.5 h 5.6 l 6.6,0.5 10.1,-4.5 11.1,-1 12.1,-2 7.6,-0.5 h 3 l 8.1,7.6 10.6,2 11.6,5.6 14.6,4.5 20.2,5.1 16.7,-1 11.1,-0.5 38.4,1 h 15 14.1 l 6.6,0.5 3.5,-2 8.6,1.5 11.1,-1 26.3,0.5 h 5.6 l 14.6,0.5 v 7.7 H 10.2 Z";
path = "m 10.2,74.6 h 25.7 7.6 33.3 l 29.3,-0.5 h 22.7 l 7.6,-1.5 v 1.
View brushes.txt
Brush
Bubbles
Cel Vinyl
Chromatic Wave
Coarse Bristles
Comet
Concave Hull
Dance Floor
Diamond
Disco
View ob api commands
draw.path: string jsonString
draw.text: string text
draw.svg: string pathString
brush.type: string brushId
brush.color.shift: Vector3 hsv
brush.color: string colorString
brush.size: float size
brush.enlarge: float size
brush.reduce: float size
camera.teleport: Vector3 translation
View example.html
<html>
<head><meta charset='UTF-8'></head>
<body>
<label>Turn: <input id='turn' value='45'></label>
<label>Length: <input id='length' value='2'></label>
<label>Repeats: <input id='repeats' value='6'></label>
<button onclick='run();'>Run</button>