

<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My Angular from Scratch</title> | |
<style> | |
.my-component { | |
font-family: Arial, sans-serif; |
node_modules | |
build | |
package-lock.json |
<script> | |
import { Color, Slider, Props } from "txl"; | |
export let inner = 0.5; | |
export let outer = 0.75; | |
export let vertices = 10; | |
function enter ({ context, width, height }) { | |
const cx = width / 2; | |
const cy = height / 2; |
<script> | |
import { Props, Color, Slider } from "txl"; | |
export let positions = []; | |
export let cells = []; | |
export let strokeStyle = '#000000'; | |
export let lineJoin = 'round'; | |
export let lineCap = 'round'; | |
export let lineWidth = 1; |
<script> | |
import LinearGradient from '@mattdesl/components/LinearGradient.txl'; | |
import NoiseLines from '@mattdesl/components/NoiseLines.txl'; | |
</script> | |
<LinearGradient /> | |
<NoiseLines /> |
// Processing code by Etienne JACOB | |
// motion blur template by beesandbombs | |
// opensimplexnoise code in another tab might be necessary | |
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
// inspired by a tweet by Joanie Lemercier : https://twitter.com/JoanieLemercier/status/1146851204875661313 | |
// also : related tutorial : https://necessarydisorder.wordpress.com/2019/02/20/distortion-or-smoke-effect-on-parametric-curves/ | |
int[][] result; | |
float t, c; |
Some things that are "better" with this BetterPromise
implementation:
BetterPromise # then(..)
accepts a BetterPromise
(or Promise
) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.
var p = BetterPromise.resolve(42);
var q = Promise.resolve(10);
p.then(console.log).then(q).then(console.log);
Shader "RedBlueGames/Lighting/LightMapCutout" | |
{ | |
Properties | |
{ | |
_MainTex ("Texture", 2D) = "white" {} | |
_DarknessColor ("Darkness Color", Color) = (0,0,0.18,.24) | |
} | |
SubShader | |
{ |