Skip to content

Instantly share code, notes, and snippets.

View andybak's full-sized avatar

Andy Baker andybak

View GitHub Profile
// ==UserScript==
// @name Gitbook
// @match https://docs.openbrush.app/*
// @description Adds edit link to gitbook pages on 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==
// 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,
<!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;}
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(
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.
Brush
Bubbles
Cel Vinyl
Chromatic Wave
Coarse Bristles
Comet
Concave Hull
Dance Floor
Diamond
Disco
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
<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>
Bubbles has FloatProperties/_ScrollRate?: True
Bubbles has FloatProperties/_ScrollJitterIntensity?: True
Bubbles has FloatProperties/_ScrollJitterFrequency?: True
Bubbles has FloatProperties/_SpreadRate?: True
Bubbles has TextureProperties/_MainTex?: True
CelVinyl has FloatProperties/_Cutoff?: True
CelVinyl has ColorProperties/_Color?: True
CelVinyl has TextureProperties/_MainTex?: True
"FloatProperties":{
"_Bulge":2.25,
"_DisplacementAmount":1.45,
"_DisplacementExponent":2.84,
"_EmissionScroll1":15.0,
"_EmissionScroll2":-10.0,
"_FlameFadeMax":30.0,
"_FlameFadeMin":8.53,
"_Metallic":0.0,
"_NumSides":4.0,