Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lemaik/code-blast-ace
Particles blast while typing in Ace (based on code-blast-codemirror)
https://github.com/lemaik/code-blast-ace
Last synced: 2 days ago
JSON representation
Particles blast while typing in Ace (based on code-blast-codemirror)
- Host: GitHub
- URL: https://github.com/lemaik/code-blast-ace
- Owner: leMaik
- Created: 2015-12-07T23:55:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-17T10:52:59.000Z (over 7 years ago)
- Last Synced: 2024-12-21T02:22:39.457Z (5 days ago)
- Language: JavaScript
- Homepage:
- Size: 7.25 MB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Code-blast plugin for Ace
This is a quick Ace port of the quick [Codemirror port](https://github.com/chinchang/code-blast-codemirror) of [lovely experiement by Joel Besada](https://twitter.com/JoelBesada/status/670343885655293952).
Note that the latter is already for ace, and this is somewhat a combination
of both approaches. Other than Code in the Dark, this supports any theme (no hard-coded colors).Simply put `code-blast.js` in your project and set the `blastCode` option to true when initializing ace. This library comes with inbuilt 2 types of effect.
[Live Demo](https://rawgit.com/leMaik/code-blast-ace/master/demo/index.html)
![Demo](/demo.gif)
## Usage
Import Ace and code-blast-ace by either including the scripts with `` tags or by using a module loader of your
choice. Then run the following code once (before using code-blast-ace) to add the plugin to Ace.```js
// Browser (global `ace` and `codeBlastAce`)
codeBlastAce(ace) // initialize code-blast-ace once// UMD, Browserify, ...
var ace = require('brace');
require('code-blast-ace')(ace); // initialize code-blast-ace once
```Activate code blast on your Ace editor as shown in the following example.
```js
var editor = ace.edit("editor");
editor.setOption('blastCode', { effect: 1 }); // `effect` can be 1 or 2
```### Coming up
- Configurable options