Skip to content

Fyrestar/THREE.ShaderKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

sk2

THREE.ShaderKit

Minimal shader code editor plugin for quick edit on demand. Only needs to be placed in the code and will be available as global variable, specifically to be used with Devtools.

In Devtools open the overlay this way. You might also implement it in your app or game for a debug mode context menu to open by click selection.

sk.edit( mesh.material )

Only after first calling for the editor it will be created so it can stay in the codebase while development. If full is enabled before first being used, it will inject Codemirror, otherwise it's a plain text editor. sk1

To always inject Codemirror enable it in your code. The Codemirror editor is setup with basic functionality and a search plugin, i might restructure it so it can be extended more easily. The js and css files for codemirror can be set in sk.editor.jsand sk.editor.css both being array of URLs, which you might set yourself as i could not find a CDN link for the GLSL mode for Codemirror and hosted it on my server.

// Somewhere in code after plugin is included to use Codemirror
sk.full = true;

Demo

https://codepen.io/Fyrestar/embed/QWQPjQL

About

Minimal shader code editor plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published