All Projects → htor → repeat-editor

htor / repeat-editor

Licence: MIT License
editor for live coding graphics

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to repeat-editor

Planck.js
2D JavaScript Physics Engine
Stars: ✭ 4,149 (+24305.88%)
Mutual labels:  canvas, 2d
G
A powerful rendering engine which providing Canvas and SVG draw for G2 & G6
Stars: ✭ 556 (+3170.59%)
Mutual labels:  canvas, 2d
Spritejs
A cross platform high-performance graphics system.
Stars: ✭ 4,712 (+27617.65%)
Mutual labels:  canvas, 2d
Zrender
A lightweight graphic library providing 2d draw for Apache ECharts
Stars: ✭ 5,122 (+30029.41%)
Mutual labels:  canvas, 2d
Wechart
Create all the [ch]arts by cax or three.js - Cax 和 three.js 创造一切图[表]
Stars: ✭ 152 (+794.12%)
Mutual labels:  canvas, 2d
awesome-canvas
Canvas资源库大全中文版。An awesome Canvas packages and resources.
Stars: ✭ 288 (+1594.12%)
Mutual labels:  canvas, 2d
okeevis-render
a fast lightweight 2d graphic library
Stars: ✭ 22 (+29.41%)
Mutual labels:  canvas, 2d
React Particles Webgl
🔆 A 2D/3D particle library built on React, Three.js and WebGL
Stars: ✭ 330 (+1841.18%)
Mutual labels:  canvas, 2d
Cax
HTML5 Canvas 2D Rendering Engine - 小程序、小游戏以及 Web 通用 Canvas 渲染引擎
Stars: ✭ 1,864 (+10864.71%)
Mutual labels:  canvas, 2d
Plutovg
Tiny 2D vector graphics library in C
Stars: ✭ 141 (+729.41%)
Mutual labels:  canvas, 2d
Gcanvas
A lightweight cross-platform graphics rendering engine. (超轻量的跨平台图形引擎) https://alibaba.github.io/GCanvas
Stars: ✭ 1,705 (+9929.41%)
Mutual labels:  canvas, 2d
Pencil.js
✏️ Nice modular interactive 2D drawing library
Stars: ✭ 204 (+1100%)
Mutual labels:  canvas, 2d
Black
World's fastest HTML5 2D game engine   🛸
Stars: ✭ 174 (+923.53%)
Mutual labels:  canvas, 2d
Picasso
Picasso is a high quality 2D vector graphic rendering library. It support path , matrix , gradient , pattern , image and truetype font.
Stars: ✭ 205 (+1105.88%)
Mutual labels:  canvas, 2d
city-tour
A procedurally generated city built with WebGL and three.js
Stars: ✭ 57 (+235.29%)
Mutual labels:  canvas
ux-charts
Simple, responsive, modern Charts with zero dependencies
Stars: ✭ 22 (+29.41%)
Mutual labels:  canvas
canvas-td
A fully featured tower defense game built with <canvas>.
Stars: ✭ 31 (+82.35%)
Mutual labels:  canvas
Dot-World-Maker
Online web role playing game (RPG) engine let you build your own game directly from your browser.
Stars: ✭ 25 (+47.06%)
Mutual labels:  2d
js-confetti
JS Confetti library that supports emojis 🦄 🎉 ⚡️
Stars: ✭ 343 (+1917.65%)
Mutual labels:  canvas
JustDraw
A Test for Android Canvas Painting with JavaScript Engine
Stars: ✭ 42 (+147.06%)
Mutual labels:  canvas

repeat-editor

An editor for live coding canvas graphics in the browser.

repeat: editor for live coding

example

To draw something on the canvas use the shorthand functions or standard canvas functions on the ctx global. Press F1 to get a list of shorthand functions.

// using shorthand
fstyle('orange')
frect(500, 500, 100, 100)
// using standard
ctx.fillStyle('orange')
ctx.fillRect(500, 500, 100, 100)

To run code for each frame, define a function draw(n). This function will be called for each frame. Current frame number is passed as n:

fps(6)
fstyle('orange')
var s=20,x=0,y=0

function draw (n) {
 for (x=0;x<w;x+=s) {
   for (y=0;y<h;y+=s) {
     frect(x, y, s-5, s-5)
   }
 }
}

Control the number of frames per second with fps(n). Look inside the examples directory for examples and inspiration. Press F1 for more help.

usage

f1

Show/hide help window

f2

Toggle hiding code and output

f3

Toggle fullscreen mode

cmd/ctrl+enter

Save and evaluate code. If the code errors, the error is displayed on the lower left. The URL is updated with a shareable link.

cmd/ctrl+shift+d

Duplicate current line

cmd/ctrl+shift+k

Comment/uncomment current line

cmd/ctrl+l

Select current line(s)

back/forward

Back and forward buttons in the browser moves through save history.

installing

Clone this repo and with npm do:

npm install
npm start

It should open in your browser.

inspiration

Inspired by https://hydra-editor.glitch.me made by https://github.com/ojack and the programming module at https://www.khanacademy.org/computer-programming/new/pjs and http://processingjs.org/.

license

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].