1. Write your JavaScript
Your tenk runs inside a page that's already set up for you:
- A full-size
<canvas>is ready asc(also available asa), andbisdocument.body. - Animate with
requestAnimationFrame. Pointer, touch and keyboard events all work, so tenks can be interactive. - The canvas fills the frame, so read
c.widthandc.heightrather than assuming a size.
A tiny starting point:
const x = c.getContext('2d');
let t = 0;
(function loop() {
x.fillStyle = 'rgba(5,5,10,.2)';
x.fillRect(0, 0, c.width, c.height);
for (let i = 0; i < 60; i++) {
const a = i / 60 * Math.PI * 2 + t;
x.fillStyle = `hsl(${i * 6 + t * 50}, 90%, 60%)`;
x.fillRect(c.width / 2 + Math.cos(a * 3) * 200, c.height / 2 + Math.sin(a * 2) * 200, 6, 6);
}
t += 0.01;
requestAnimationFrame(loop);
})();
2. Keep it under 10 KB
The limit is 10,240 bytes for the whole file. Minifiers such as Terser help, and for extra headroom many creators use tricks from code golf: short variable names, reusing maths, and generating content procedurally instead of storing it. You don't have to golf: plenty of great tenks are just tidy, readable code.
3. Stay inside the sandbox
Tenks run in an isolated sandbox. Uploads that use any of these are rejected automatically:
- Network access:
fetch,XMLHttpRequest, WebSockets, WebRTC, or external images and scripts. - Storage: cookies,
localStorage,sessionStorage, IndexedDB or the Cache API. - Running strings as code:
evalor theFunctionconstructor. - Workers, popups, navigation, or reaching outside the frame (
top,parent,opener). - Sound, camera, microphone, screen capture, location, clipboard or notifications.
Everything else that runs on a canvas, from 2D drawing to WebGL shaders, is fair game.
4. Upload and preview
On the submit page, drop in your .js file. It's checked instantly and
runs in a live preview, so you can see exactly what viewers will see. Any problems are listed with a
plain-English explanation so you can fix them and try again.
5. Pick portrait or landscape
- Portrait (9:16): phone-shaped, perfect for vertical toys and the classic TikTok-style feed.
- Landscape (16:9): widescreen, great for scenes and games.
6. Make it discoverable
- Title (up to 60 characters): short and memorable.
- Description (up to 280 characters): what it does and any controls.
- Tags (1 to 5): such as generative, game, 3d or particles, so people can find it.
- Creator name (optional): shown as @yourname.
7. Verify your email and go live
Enter your email and we'll send you a verification link. Click it within 3 days and your tenk is published to the feed. Your email is never shown publicly. Nothing is published until you verify.
The same email contains your master key. Keep it safe: together with your email, it lets you post new versions of your tenk later from the update page. We can't show you the key again.
Tips for a great tenk
- Make the first second count: viewers are swiping, so start with motion and colour straight away.
- Respond to input. A tap or drag that changes something makes people stay.
- Handle any frame size, and test both on a phone and a desktop.
- Mention the controls in your description.
- Check the content policy before you post.