UNPKG

cloud-blocks

Version:

Cloud Blocks is a library for building scratch computing interfaces with Luxrobo MODI.

110 lines (103 loc) 3.04 kB
/** * @license * Visual Blocks Editor * * Copyright 2016 Massachusetts Institute of Technology * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ 'use strict'; goog.require('Blockly.Blocks'); goog.require('Blockly.Colours'); goog.require('Blockly.constants'); Blockly.Blocks['action_boatstart'] = { /** * Start Boat * @this Blockly.Block */ init: function () { this.jsonInit({ message0: Blockly.Msg.ACTION_BOAT_START, category: Blockly.Categories.action, extensions: ['shape_statement'], colour: Blockly.Colours.output.primary, colourSecondary: Blockly.Colours.output.secondary, colourTertiary: Blockly.Colours.output.tertiary }); } }; Blockly.Blocks['action_boatstop'] = { /** * Stop Boat * @this Blockly.Block */ init: function () { this.jsonInit({ message0: Blockly.Msg.ACTION_BOAT_STOP, category: Blockly.Categories.action, extensions: ['shape_statement'], colour: Blockly.Colours.output.primary, colourSecondary: Blockly.Colours.output.secondary, colourTertiary: Blockly.Colours.output.tertiary }); } }; Blockly.Blocks['action_turnofflights'] = { /** * Turn off the lights * @this Blockly.Block */ init: function () { this.jsonInit({ message0: Blockly.Msg.ACTION_TRUN_OFF_LIGHTS, category: Blockly.Categories.action, extensions: ['shape_statement'], colour: Blockly.Colours.output.primary, colourSecondary: Blockly.Colours.output.secondary, colourTertiary: Blockly.Colours.output.tertiary }); } }; Blockly.Blocks['action_turnonlights'] = { /** * Turn on the lights * @this Blockly.Block */ init: function () { this.jsonInit({ message0: Blockly.Msg.ACTION_TRUN_ON_LIGHTS, category: Blockly.Categories.action, extensions: ['shape_statement'], colour: Blockly.Colours.output.primary, colourSecondary: Blockly.Colours.output.secondary, colourTertiary: Blockly.Colours.output.tertiary }); } }; Blockly.Blocks['action_turnonlightsweakly'] = { /** * Turn on the lights weakly * @this Blockly.Block */ init: function () { this.jsonInit({ message0: Blockly.Msg.ACTION_TRUN_ON_LIGHTS_WEAKLY, category: Blockly.Categories.action, extensions: ['shape_statement'], colour: Blockly.Colours.output.primary, colourSecondary: Blockly.Colours.output.secondary, colourTertiary: Blockly.Colours.output.tertiary }); } };