Skip to content

Instantly share code, notes, and snippets.

View AskingQuestions's full-sized avatar
🔨
Building a light weight animation lib for TS

Jeremy Frank AskingQuestions

🔨
Building a light weight animation lib for TS
View GitHub Profile
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=dc2b62ba69a96858fd29f0d00864e0f1)
* Config saved to config.json and https://gist.github.com/dc2b62ba69a96858fd29f0d00864e0f1
*//*!
@AskingQuestions
AskingQuestions / formExample.php
Last active February 2, 2017 23:31
Example of a form in websom
<?php
$form = new Form("MyFormName"); //Create the form
$text = new Text();//Create the text input
$text->max_characters = 10; //Set the max number of chars allowed to 10
$text->blank = false; //Do not allow blank input
$text->placeholder = "Example text box";
$form->addInput("textName", $text); //Add the text input above and use textName to reference it.
$form->structure = new Structure("%textName%".Theme::input_submit("Submit to server", "")->get()); //Set the html structure.
a.trigger {
display:inline-block;
background: #26a69a;
padding: .4em .8em;
color: white;
outline: 0;
cursor: pointer;
transition: .3s;
-webkit-box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3);
box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.3);
@AskingQuestions
AskingQuestions / Mesh.cpp
Last active February 27, 2023 20:17
Bezier Triangle Patch Approximation in Unreal Engine
// The following is extracted from a larger system that renders dynamically subdivided limit surfaces at runtime via indirect dispatch.
//
// Evaluating a bezier triangle patch is trivial but first we need to generate them.
// I opted to use a quick heuristic to find values that closely approximate a higher-cost loop subdivision surface.
//...
void UTerraMesh::GenerateBezierTriangles()
{
FTerraMeshLimitSurface SmoothSurface = GeneratePreviewLimitSurface(5);
@AskingQuestions
AskingQuestions / prompt.txt
Created April 24, 2024 23:40
Shadeup lang prompt
The following is a specification for a language. This language is called Shadeup
Shadeup is a language that makes writing shaders and computer graphics code easier, it's built on Typescript and looks similar to hlsl.
Core values:
- Easy to read, boilerplate is abstracted away
- CPU/GPU Sharing of functions and data-structures. Write code once and reuse on the cpu or gpu.
- Runs on webgpu
Some basic syntax:

Shadeup Crash Course

If you're familiar with APIs like DirectX or vulkan, then this quick intro is for you, shadeup aims to bring the power of those APIs but without as much hassle. It's still a work in progress, but it's usable today.

Core values

  • Bridging Worlds: Shadeup smoothly connects CPU and GPU code, making it easier for them to work in tandem. You can write a function once and share it between the two without the need to hand-transpile.

  • Cleaner Syntax: One of the core principals while designing shadeup was the ability to distil an algorithm to its fundemental parts and keep the boilerplate hidden. With shadeup, you’ll find a more streamlined way to handle uniforms, buffer modifications, and texture drawings. Less clutter, more clarity.