This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| // open terminal with cmd-t | |
| { | |
| "context": "Workspace", | |
| "bindings": { | |
| "cmd-t": "terminal_panel::ToggleFocus" | |
| } | |
| }, | |
| // close terminal with cmd-t | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "description": "Map swedish äåö to Right Option + qao", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "q", | |
| "modifiers": { "mandatory": ["right_option"] } | |
| }, | |
| "to": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "profiles": [ | |
| { | |
| "complex_modifications": { | |
| "rules": [ | |
| { | |
| "description": "Navigate using Left Control + hjkl", | |
| "manipulators": [ | |
| { | |
| "from": { | |
| "key_code": "h", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sketch = function(p){ | |
| p.setup = function(){ | |
| p.createCanvas(p.windowWidth*0.8, 100); | |
| } | |
| p.draw = function(){ | |
| p.background(0); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src = "{{site.baseurl}}/assets/js/instance-mode-example-one.js"></script> | |
| <script src = "{{site.baseurl}}/assets/js/instance-mode-example-two.js"></script> | |
| <script src = "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js"></script> | |
| <div class = "p5js-script-div" id = "script-1"></div> | |
| <div class = "p5js-script-div" id = "script-2"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //instance mode | |
| //map and random functions | |
| var sketch = function(p){ | |
| var bcol = 0; | |
| //objects | |
| //in c++ this would be a struct | |
| var spot = { | |
| x : 100, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let bubble1, bubble2; //global variables | |
| function setup(){ | |
| createCanvas(640, 200); | |
| bubble1 = new Bubble(320, 50, 20, 'red', 2); //start at the center of the canvas | |
| bubble2 = new Bubble(160, 50, 10, 'blue', 1); //new bubble2 to the left of bubble1 | |
| //print(bubble.x, bubble.y); | |
| } | |
| function draw(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //instance mode | |
| //template for creating a p5 sketch (kind of) | |
| var sketch = function(p){ | |
| //RGB rainbow colors | |
| p.rainbowR = [248, 255, 255, 254, 208, 105, 18, 68, 59]; | |
| p.rainbowG = [12, 51, 102, 174, 195, 208, 189, 68, 12]; | |
| p.rainbowB = [18, 17, 68, 45, 16, 37, 185, 221, 189]; | |
| var i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //RGB rainbow colors | |
| var rainbowR = [248, 255, 255, 254, 208, 105, 18, 68, 59]; | |
| var rainbowG = [12, 51, 102, 174, 195, 208, 189, 68, 12]; | |
| var rainbowB = [18, 17, 68, 45, 16, 37, 185, 221, 189]; | |
| var i; | |
| var canvas; | |
| var t = rainbowR.length; | |
| function setup() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src = "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/p5.min.js"></script> | |
| <script src = "https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.0/addons/p5.dom.min.js"></script> | |
| <div id = "script-holder"> | |
| <script src = "{{site.baseurl}}/js/this-is-a-test.js"></script> | |
| </div> |
NewerOlder