1
0
Fork
You've already forked spill
0
A brand new live coding language that doesn’t exist yet.
  • JavaScript 100%
2025年12月08日 23:54:50 +00:00
.vscode go 2025年12月06日 23:57:04 +00:00
assets fix merging 2025年09月25日 15:12:28 +02:00
examples tabs 2025年12月08日 23:54:50 +00:00
reference better rounding lol 2025年08月26日 22:50:16 +01:00
.gitignore work refactorrr 2025年08月25日 23:00:03 +01:00
declare.d.ts tabs placeholders 2025年12月03日 23:55:05 +00:00
index.html fix tab bar layout 2025年12月07日 22:18:09 +00:00
jsconfig.json split into an image (just for fun) 2025年08月31日 10:28:09 +01:00
LICENSE AGPL 2025年06月27日 14:35:13 +02:00
MIT.txt AGPL 2025年06月27日 14:35:13 +02:00
README.md bit of juggling 2025年12月03日 22:10:55 +00:00
script.js tabs 2025年12月08日 23:54:50 +00:00
spill.css fix tab bar layout 2025年12月07日 22:18:09 +00:00
spill.js tabs 2025年12月08日 23:54:50 +00:00
style.css fix tab bar layout 2025年12月07日 22:18:09 +00:00

spill

a brand new live coding language that doesn’t exist yet.

see the emerging engine at pastagang.codeberg.page/spill.

run this repo

this repo is a full-screen example of spill.

try it locally by running it as a file server.

i like to use deno's file server to do this but you can use any. for example... if you have node, you can run npx serve from your terminal.


the spill language

omg it's work in progress! there's gonna be a text editor in front of the world! you will be able to type spill into it!


the spill library

under the hood, the spill language uses the spill library to do things. you can also use the spill library directly, if you want.

use the spill library

add spill.js to your project and use the createSpill function.

import { createSpill } from "spill.js";
const spill = createSpill();

to actually see the spill, you need to add the spill's element to somewhere in your document.

document.body.append(spill.element);

now you can do things with the spill. let's draw a pink dot in the center of the world.

import { setCellAppearanceAtScreenPosition } from "spill.js";
setCellAppearanceAtScreenPosition(
 spill,
 { x: 0.5, y: 0.5 },
 { colour: { red: 255, green: 0, blue: 255, alpha: 255 } }
);

you can get the things to happen on their own by adding behaviours. let's make a behaviour that increases the brightness of each cell.

function BrightenBehaviour(_spill, cell) {
 const { colour } = cell.appearance;
 setCellAppearance(cell, {
 colour: {
 red: colour.red + 10,
 green: colour.green + 10,
 blue: colour.blue + 10,
 alpha: colour.alpha,
 },
 });
}

use the behaviour by passing it to the createSpill function when you run it.

const spill = createSpill({
 behaviours: [BrightenBehaviour],
});

to find out all the available functions from spill, try exporting everything into a single object. then you can use your editor's autocomplete to see everything.

import * as Spill from "spill.js";
Spill.setWorldToFill(
 spill,
 { width: 100, height: 100 },
 { colour: { red: 255, green: 0, blue: 0, alpha: 255 } }
);

history

spill started as jam-written documentation for an imaginary language. it's out of date now but you can read it here.