Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pdehaan/roboblocks

Blockly blocks repository for robots programming
https://github.com/pdehaan/roboblocks

Last synced: 7 days ago
JSON representation

Blockly blocks repository for robots programming

Awesome Lists containing this project

README

        

RoboBlocks
==========

[![Build Status](https://secure.travis-ci.org/bq/roboblocks.png?branch=master)](http://travis-ci.org/bq/roboblocks)

Blockly blocks repository used in [bitbloq](http://bitbloq.bq.com)

Getting Started
---------------

This project requires [blockly-bq](https://github.com/bq/blockly) or [blockly](https://developers.google.com/blockly/) to work.

### Include Roboblocks in your project

#### **With Bower & RequireJS**

- Install roboblocks

```
bower install roboblocks --save-dev
bower install blocklybq --save-dev
```

- Declare in RequireJS

```html



RoboBlocks




'use strict';
/* global require */
require.config({
deps: [
'main'
],
paths: {
'blockly': '../bower_components/blockly/blockly_compressed',
'blockly.blocks': '../bower_components/blockly/blocks_compressed',
'blockly.lang': '../bower_components/blockly/msg/js/en',
'blockly.arduino': '../bower_components/blockly/arduino_compressed',
roboblocks: '../bower_components/roboblocks/dist/roboblocks'
},
shim: {
blockly: {
exports: 'Blockly'
},
'blockly.blocks': [
'blockly'
],
'blockly.lang': [
'blockly'
],
'blockly.arduino': [
'blockly',
'blockly.blocks'
],
'roboblocks': [
'blockly',
'blockly.arduino'
]
}
});

define(['blockly', 'roboblocks'], function(Blockly, RoboBlocks) {
// RoboBlocks loader
RoboBlocks.load({
zoom: 1,
otherParameter: true
});
var target = document.querySelector('.blockly');
Blockly.inject(target, {
trashcan: true,
toolbox: Blockly.createToolbox(),
scrollbars: false
});

});



// RoboBlocks loader
RoboBlocks.load({
zoom: 1,
otherParameter: true
});

var target = document.querySelector('.blockly');
Blockly.inject(target, {
trashcan: true,
toolbox: Blockly.createToolbox(),
scrollbars: false
});