• Stars
    star
    2,303
  • Rank 19,998 (Top 0.4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 9 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple WebGL Fragment Shader Editor

GlslEditor

Donate

Friendly GLSL Shader editor based on Codemirror compatible with glslViewer (C++/OpenGL ES) and glslCanvas (JS/WebGL).

Was originally develop to work as a embedded editor for The Book of Shaders. But now have grown as a stand alone Web app. Thanks to their compatibility with other apps of this ecosystems like glslViewer that runs in the RaspberryPi directly from console, GlslEditor interact with other projects like OpenFrame.io allowing the user to export the shaders to frames with only one button.

You can use it directly from editor.thebookofshaders.com or host one on your own website by including the two build files: glslEditor.css and glslEditor.js:

<link type="text/css" rel="stylesheet" href="https://rawgit.com/patriciogonzalezvivo/glslEditor/gh-pages/build/glslEditor.css">
<script type="application/javascript" src="https://rawgit.com/patriciogonzalezvivo/glslEditor/gh-pages/build/glslEditor.js"></script>

You can also install it through npm:

npm install glslEditor --save

And then you are ready to use it by passing an DOM element or query selector string, and a set of options;

<body>
    <div id="glsl_editor"></div>
</body>
<script type="text/javascript">
    const glslEditor = new GlslEditor('#glsl_editor', { 
        canvas_size: 500,
        canvas_draggable: true,
        theme: 'monokai',
        multipleBuffers: true,
        watchHash: true,
        fileDrops: true,
        menu: true
    });
</script>

This is a list of all the options you can set up:

Property type description default
canvas_size number Initial square size of the shader canvas 250
canvas_width number Initial width of the shader canvas 250
canvas_height number Initial height of the shader canvas 250
canvas_draggable bool Enables dragging, resizing and snaping capabilities to the shader canvas false
canvas_follow bool Enables the shader canvas to follow the curser false
theme string Codemirror style to use on the editor "default"
menu bool Adds a menu that contain: 'new', 'open', 'save' and 'share' options false
multipleBuffers bool Allows the creation of new tabs false
fileDrops bool Listen to Drag&Drop events false
watchHash bool Listen to changes on the wash path to load files false
frag_header string Adds a hidden header to every shader before compiling ""
frag_footer string Adds a hidden footer to every shader before compiling ""
indentUnit number How many spaces a block should be indented 4
tabSize number The width of a tab character 4
indentWithTabs bool Whether, when indenting, the spaces should be replaced by tabs false
lineWrapping bool Whether CodeMirror should wrap for long lines true
autofocus bool Can be used to make CodeMirror focus itself on initialization true

Some of the features features

  • Inline Color picker and 3D vector picker for '''vec3''

  • Inline Trackpad for '''vec2'''

  • Slider for floats

  • Inline error display

  • Breakpoints for variables

Electron Version

When developing use this to automatically reload Electron on every change

npm run dev

For use just do:

npm run start

TODOs

  • Twitter sharing options

  • Facebook sharing options

  • Open modal from url, log or file

  • Uniform widgets

  • Time widget

  • Texture inspector

Author

Patricio Gonzalez Vivo: github | twitter | website

Acknowledgments

Special thanks to:

More Repositories

1

thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.
GLSL
6,031
star
2

glslViewer

Console-based GLSL Sandbox for 2D/3D shaders
C++
4,208
star
3

lygia

LYGIA, it's a granular and multi-language (GLSL, HLSL, WGSL, MSL and CUDA) shader library designed for performance and flexibility
GLSL
2,492
star
4

glslCanvas

Simple tool to load GLSL shaders on HTML Canvas using WebGL
JavaScript
1,753
star
5

PixelSpiritDeck

GLSL
483
star
6

glslGallery

JavaScript
363
star
7

glslTexture

Blender addon to create 2D textures from GLSL. It follows the same nomenclature that glslViewer, glslCanvas, glslEditor, ofxShader and PixelSpirit
Python
341
star
8

ofxFX

Unlocking the GPU Power on openFrameworks with this add-on for that make easy to use GLSL Shaders
C++
330
star
9

OpenLiDAR

DIY 3D LiDAR Scanner
C++
207
star
10

ofxStreetView

OF scraper for GoogleStreetView panoramas and depthmap
C++
185
star
11

sublime-glslViewer

Sublime Text 2/3 plugin for live coding GLSL Shaders
Python
147
star
12

ada

A general porpose OpenGL app library
C++
120
star
13

KinectCoreVision

Kinect Implementation of CCV
C++
100
star
14

hilma

library to generate 2D/3D geometries
C++
89
star
15

MidiGyver

C++
77
star
16

ofxFluid

GPU Fluid Simulation with a collisions layer
C++
76
star
17

vera

C++/WASM GL Framework
C++
65
star
18

vPlotter

Wireless vPlotter for RaspberryPi
C++
64
star
19

ofxComposer

Set of connecting boxes that let you load and processes different type of data on the GPU by using shaders.
C++
59
star
20

hypatia

Geo-Astronomical library for artist
C++
58
star
21

ofxVoro

OpenFrameworks wrapper of Voro++ that do 3D Voronoi Tessellation
C++
55
star
22

ofxPTAMM

Parallel Tracking and Multiple Mapping (PTAMM by Robert Castle) wrapper for openFrameworks.
C++
53
star
23

cursoOF

Curso en espaรฑol de openFrameworks aplicado a la creaciรณn
C++
53
star
24

Shell-Initiation

Exoteric *nix terminal tutorial
51
star
25

ofxShader

Objective-C
50
star
26

LineOfSight

What are the satellites in your line of sight?
JavaScript
47
star
27

ss2015

C++
46
star
28

.glslScreenSaver

Make your own custom ScreenSaver in linux using GlslViewer
GLSL
46
star
29

libopz

non official API library for the OP-Z
C++
46
star
30

lygia_threejs_examples

GLSL
40
star
31

sims2014

Simulation Studio, creative coding course taught at parsons school of design, MFADT
C++
40
star
32

ofxInteractiveSurface

For Mapping ofTextures to surfaces making transformations and masking all in one process
C++
37
star
33

ofxBlobTracker

Classic and simple blobTracker implementation used on CCV ( Created by Ramsin Khoshabeh ) + Finger Tracking
C++
33
star
34

tangram-sandbox

JavaScript
32
star
35

ofxThermalPrinter

OpenFrameworks library to control mini thermal printers (https://www.adafruit.com/products/597)
C++
29
star
36

ofxBundle

Import bundle files with cameras and point clouds.
C++
29
star
37

lygia_unity_examples

ShaderLab
28
star
38

Meshes

Simple Python Module to load, construct, parse, transform, save meshes in OBJ/PLY format
Python
26
star
39

ofxBlackBox

Minimal aesthetic orientation GUI for openFrameworks with MultiTouch/TUIO compatibility
C
24
star
40

OFPlay

Simple and Easy Tool for install and manage openFrameworks libraries and projects
C++
24
star
41

ofxGame

Group of handy classes for making Interactive 2D Games. With time and work it could be a decent game engine
C++
24
star
42

sfpc_ll16

Lux Lingua introduction at SFPC
JavaScript
23
star
43

lygia_p5_examples

GLSL
22
star
44

HeNerator

script to generate HeN ipfs app exports of GLSL shaders
Python
22
star
45

ofxTuio

Old TUIO Wrapper
C
21
star
46

ofxPro

C++
19
star
47

AxiSurface

Python module to make 100% vector line compositions and export them as SVG or G-Code files
Python
18
star
48

lygia_of_examples

GLSL
18
star
49

RandomCity

JavaScript
18
star
50

patriciogv_algo2012

Algorithmic Animation Homework Parsons New School MFA DT 2012
C++
17
star
51

sNodes

Syphon Nodes EcoSystem wrote using openFrameworks for life coding of GLSL Shaders
C++
14
star
52

vscode-pickers

GLSL/HLSL Float, 2D/3D Vector and Color picker for vscode
JavaScript
14
star
53

vim-glslViewer

Vim pluging for glslViewer which allow you to live-code shaders from your RaspberryPi
Vim Script
13
star
54

ofxEliza

Wrapper for "Chatterbot Eliza 2.0" made by Gonzales Cenelia. With is a C++ implementation of this well know chatbot
C++
12
star
55

patriciogv_avsys2013

Audio/Video Systems Homework Parsons New School MFA DT 2013
C++
12
star
56

itp17

HTML
11
star
57

joyOfLight

application that provides a means for people to play with light-painting in an intuitive and colorful way.
C++
11
star
58

ofxKeyboard

openFrameworks Virtual Keyboard implementation using ofxTUIO
C
10
star
59

.dotfiles

CSS
10
star
60

ofxPiTFT

PiTFT addon for your RaspberryPi projects
Objective-C
10
star
61

ofxGlmTools

a set of tools that use glm library
C++
10
star
62

ISS

view of OpenStreetMap from the ISS
JavaScript
9
star
63

bootcamp2013_code

Processing
9
star
64

eyeo16

JavaScript
9
star
65

ofxTimelinePro

C++
9
star
66

Skylines03

City point cloud
C++
8
star
67

hilma_raymarcher

Cuda
8
star
68

ada_example3D

JavaScript
8
star
69

ofxPulseSensor

openFrameworks addon of PulseSensor ( for Arduino and RaspberryPi )
C++
7
star
70

ofxKinectStreamer

Multi-platform Kinect depth information streamer that use native openFrameworks addons
C
7
star
71

ofxMd2

Md2 viewer ported to openFrameworks byJellyFish.com and TheoWatson.com
C
7
star
72

Timeline

C++
6
star
73

ada_example

Simple example of an ADA program
HTML
6
star
74

AxiPrinter

Stand alone RaspberryPi controller for my AxiDraw A3
Python
6
star
75

wgpu_sandbox

rust/wgpu sandbox
Rust
6
star
76

opz_experiments

GLSL
4
star
77

openVis16

OpenVis 16' Talk about Maps and Shaders
JavaScript
4
star
78

Communitas

Interactive multiTouch table made using openFrameworks and TUIO protocol.
C++
4
star
79

ofxMapsPro

C++
4
star
80

oscLab

OSC client for the OP-Z (through libopz)
C
4
star
81

lygia_minecraft

Kotlin
4
star
82

ofxMtPhotoGallery

Mouse/TUIO moultiTouch PhotoGallery
C++
4
star
83

ofxKinectUsers

Kinect addon for re-programable gesture tracking
C++
4
star
84

glslBenchmark

JavaScript
4
star
85

RaspistillAPI

PHP Raspistill API
C++
4
star
86

patriciogonzalezvivo.com

Personal Portfolio
JavaScript
4
star
87

edenControl

iOS app for remote controlling EDEN software. That itยดs an Interactive Ecosystem Simulation made specially for Efecto Mariposa.
Objective-C
4
star
88

ofxSubtitles

openFrameworks addon for working with .srt movie subtitles format
C++
4
star
89

lygia_examples

GLSL
4
star
90

mary

Open Source C++ Library for different telemetry sensors with Python bindings
C
3
star
91

PixelSpiritEditor

JavaScript
3
star
92

hawkeye

Refurnishing a Kodak Brownie Hawkeye with a RaspberryPi and RasbperryCam
GLSL
3
star
93

mesaDelTiempo

C++
3
star
94

ofxWiiOSC

Wiimote addon that connects to DarwiinOSC
C++
3
star
95

AlgorithmicNaturalis

3
star
96

southUp

http://southupmap.com/
HTML
3
star
97

ofxFXPro

C++
2
star
98

HardCodeAPaper

Write like you code. Write your academic paper in MarkDown and then export them to PDF in correct Chicago Style.
TeX
2
star
99

MotionRecorder

iOS Motion Recorder
Objective-C
2
star
100

OpenNI2TUIO

C++
2
star