Skip to content

Commit f6ccb87

Browse files
committed
Rename app to Voxel
1 parent da465b0 commit f6ccb87

File tree

142 files changed

+233
-233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+233
-233
lines changed

blockly/Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var APPS = [
1313
'calc',
1414
'webapp',
1515
'eval',
16-
'minecraft'
16+
'voxel'
1717
];
1818

1919
if (process.env.MOOC_APP) {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

blockly/src/dev/app.html.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<link rel="stylesheet" type="text/css" href="../css/common.css">
1010
<link rel="stylesheet" type="text/css" href="../css/<%= app %>.css">
1111

12-
<% if (app === "minecraft") { %>
12+
<% if (app === "voxel") { %>
1313
<style>
1414
body {
1515
margin: 0px;

blockly/src/dev/index.html.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
<li><a href="/jigsaw?locale=en_us&dir=ltr&level=1&skin=jigsaw">Jigsaw</a></li>
1212
<li><a href="/calc?locale=en_us&dir=ltr&level=example1&skin=calc">Calc</a></li>
1313
<li><a href="/webapp?locale=en_us&dir=ltr&level=simple&skin=webapp">Webapp</a></li>
14-
<li><a href="/minecraft?locale=en_us&dir=ltr&level=minecraft1&skin=minecraft">Minecraft</a></li>
14+
<li><a href="/voxel?locale=en_us&dir=ltr&level=voxel1&skin=voxel">Voxel</a></li>
1515
</ul>

blockly/src/dev/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ app.get('/calc', function(req, res) {
7272
renderApp('calc', req, res);
7373
});
7474

75-
app.get('/minecraft', function(req, res) {
76-
renderApp('minecraft', req, res);
75+
app.get('/voxel', function(req, res) {
76+
renderApp('voxel', req, res);
7777
});
7878

7979
app.get('/webapp', function(req, res) {
File renamed without changes.

blockly/src/minecraft/blocks.js renamed to blockly/src/voxel/blocks.js

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11

22
/**
3-
* @fileoverview Demonstration of Blockly: Minecraft
3+
* @fileoverview Demonstration of Blockly: Voxel
44
* @author [email protected] (Neil Fraser)
55
*/
66
'use strict';
77

8-
var msg = require('../../locale/current/minecraft');
8+
var msg = require('../../locale/current/voxel');
99
var commonMsg = require('../../locale/current/common');
1010
var blockUtils = require('../block_utils');
1111
var utils = require('../utils');
1212

1313
var generateSetterCode = function (ctx, name) {
1414
var value = ctx.getTitleValue('VALUE');
15-
return 'Minecraft.' + name + '(\'block_id_' + ctx.id + '\', ' +
15+
return 'Voxel.' + name + '(\'block_id_' + ctx.id + '\', ' +
1616
value + ');\n';
1717
};
1818

@@ -24,11 +24,11 @@ exports.install = function(blockly, blockInstallOptions) {
2424

2525

2626
blockUtils.generateSimpleBlock(blockly, generator, {
27-
name: 'minecraft_log',
27+
name: 'voxel_log',
2828
helpUrl: 'http://google.com',
2929
title: "hello world", // TODO Localize
3030
tooltip: 'TODO Localize me', // TODO localize
31-
functionName: 'Minecraft.log'
31+
functionName: 'Voxel.log'
3232
});
3333

3434

@@ -39,7 +39,7 @@ exports.install = function(blockly, blockInstallOptions) {
3939
BlocklyApps.playAudio(utils.stripQuotes(soundValue), {volume: 1.0});
4040
}
4141

42-
blockly.Blocks.minecraft_playSound = {
42+
blockly.Blocks.voxel_playSound = {
4343
// Block for playing sound.
4444
helpUrl: '',
4545
init: function() {
@@ -53,14 +53,14 @@ exports.install = function(blockly, blockInstallOptions) {
5353
}
5454
};
5555

56-
blockly.Blocks.minecraft_playSound.K1_SOUNDS =
56+
blockly.Blocks.voxel_playSound.K1_SOUNDS =
5757
[
5858
['win', 'win'],
5959
['start', 'start'],
6060
['failure', 'failure']
6161
];
6262

63-
generator.minecraft_playSound = function() {
63+
generator.voxel_playSound = function() {
6464
return generateSetterCode(this, 'playSound');
6565
};
6666

@@ -74,7 +74,7 @@ exports.install = function(blockly, blockInstallOptions) {
7474
['Jupiter', (EARTH_GRAVITY * 4).toString()]
7575
];
7676

77-
blockly.Blocks.minecraft_setGravity = {
77+
blockly.Blocks.voxel_setGravity = {
7878
// Block for playing sound.
7979
helpUrl: '',
8080
init: function() {
@@ -88,7 +88,7 @@ exports.install = function(blockly, blockInstallOptions) {
8888
}
8989
};
9090

91-
generator.minecraft_setGravity = function() {
91+
generator.voxel_setGravity = function() {
9292
return generateSetterCode(this, 'setGravity');
9393
};
9494

@@ -102,7 +102,7 @@ exports.install = function(blockly, blockInstallOptions) {
102102
['Super Sprint', (WALK_SPEED * 8).toString()]
103103
];
104104

105-
blockly.Blocks.minecraft_setSpeed = {
105+
blockly.Blocks.voxel_setSpeed = {
106106
helpUrl: '',
107107
init: function() {
108108
this.setHSV(184, 1.00, 0.74);
@@ -115,19 +115,19 @@ exports.install = function(blockly, blockInstallOptions) {
115115
}
116116
};
117117

118-
generator.minecraft_setSpeed = function() {
118+
generator.voxel_setSpeed = function() {
119119
return generateSetterCode(this, 'setSpeed');
120120
};
121121

122-
generator.minecraft_setBlock = function() {
122+
generator.voxel_setBlock = function() {
123123
var value = Blockly.JavaScript.valueToCode(this, 'VALUE', Blockly.JavaScript.ORDER_NONE);
124124
var x = Blockly.JavaScript.valueToCode(this, 'VALUE_X', Blockly.JavaScript.ORDER_NONE);
125125
var y = Blockly.JavaScript.valueToCode(this, 'VALUE_Y', Blockly.JavaScript.ORDER_NONE);
126126
var z = Blockly.JavaScript.valueToCode(this, 'VALUE_Z', Blockly.JavaScript.ORDER_NONE);
127-
return 'Minecraft.setBlock(' + value + ', ' + x + ', ' + y + ', ' + z + ', \'block_id_' + this.id + '\');\n';
127+
return 'Voxel.setBlock(' + value + ', ' + x + ', ' + y + ', ' + z + ', \'block_id_' + this.id + '\');\n';
128128
};
129129

130-
var MINECRAFT_BLOCKS =
130+
var VOXEL_BLOCKS =
131131
[
132132
['Empty', '0'],
133133
['1', '1'],
@@ -169,7 +169,7 @@ exports.install = function(blockly, blockInstallOptions) {
169169
['37', '37']
170170
];
171171

172-
blockly.Blocks.minecraft_setBlock = {
172+
blockly.Blocks.voxel_setBlock = {
173173
helpUrl: '',
174174
init: function() {
175175
this.setHSV(184, 1.00, 0.74);
@@ -190,7 +190,7 @@ exports.install = function(blockly, blockInstallOptions) {
190190
}
191191
};
192192

193-
blockly.Blocks.minecraft_whenRightClick = {
193+
blockly.Blocks.voxel_whenRightClick = {
194194
// Block to handle event where mouse is clicked
195195
helpUrl: '',
196196
init: function () {
@@ -202,7 +202,7 @@ exports.install = function(blockly, blockInstallOptions) {
202202
}
203203
};
204204

205-
blockly.Blocks.minecraft_whenLeftClick = {
205+
blockly.Blocks.voxel_whenLeftClick = {
206206
// Block to handle event where mouse is clicked
207207
helpUrl: '',
208208
init: function () {
@@ -214,16 +214,16 @@ exports.install = function(blockly, blockInstallOptions) {
214214
}
215215
};
216216

217-
generator.minecraft_whenRightClick = function () {
217+
generator.voxel_whenRightClick = function () {
218218
// Generate JavaScript for handling click event.
219219
return '\n';
220220
};
221-
generator.minecraft_whenLeftClick = function () {
221+
generator.voxel_whenLeftClick = function () {
222222
// Generate JavaScript for handling click event.
223223
return '\n';
224224
};
225225

226-
blockly.Blocks.minecraft_adjacent_target_x = {
226+
blockly.Blocks.voxel_adjacent_target_x = {
227227
// adjacent target x.
228228
init: function () {
229229
this.setHSV(258, 0.35, 0.62);
@@ -234,13 +234,13 @@ exports.install = function(blockly, blockInstallOptions) {
234234
}
235235
};
236236

237-
generator.minecraft_adjacent_target_x = function () {
237+
generator.voxel_adjacent_target_x = function () {
238238
// Generate JavaScript for handling click event.
239239

240-
return ['Minecraft.getAdjacentTargetX()\n', Blockly.JavaScript.ORDER_ATOMIC];
240+
return ['Voxel.getAdjacentTargetX()\n', Blockly.JavaScript.ORDER_ATOMIC];
241241
};
242242

243-
blockly.Blocks.minecraft_adjacent_target_y = {
243+
blockly.Blocks.voxel_adjacent_target_y = {
244244
// adjacent target y.
245245
init: function () {
246246
this.setHSV(258, 0.35, 0.62);
@@ -251,12 +251,12 @@ exports.install = function(blockly, blockInstallOptions) {
251251
}
252252
};
253253

254-
generator.minecraft_adjacent_target_y = function () {
254+
generator.voxel_adjacent_target_y = function () {
255255
// Generate JavaScript for handling click event.
256-
return ['Minecraft.getAdjacentTargetY()\n', Blockly.JavaScript.ORDER_ATOMIC];
256+
return ['Voxel.getAdjacentTargetY()\n', Blockly.JavaScript.ORDER_ATOMIC];
257257
};
258258

259-
blockly.Blocks.minecraft_adjacent_target_z = {
259+
blockly.Blocks.voxel_adjacent_target_z = {
260260
// adjacent target z.
261261
init: function () {
262262
this.setHSV(258, 0.35, 0.62);
@@ -267,13 +267,13 @@ exports.install = function(blockly, blockInstallOptions) {
267267
}
268268
};
269269

270-
generator.minecraft_adjacent_target_z = function () {
270+
generator.voxel_adjacent_target_z = function () {
271271
// Generate JavaScript for handling click event.
272-
return ['Minecraft.getAdjacentTargetZ()\n', Blockly.JavaScript.ORDER_ATOMIC];
272+
return ['Voxel.getAdjacentTargetZ()\n', Blockly.JavaScript.ORDER_ATOMIC];
273273
};
274274

275275

276-
blockly.Blocks.minecraft_selected_target_x = {
276+
blockly.Blocks.voxel_selected_target_x = {
277277
// selected target x.
278278
init: function () {
279279
this.setHSV(258, 0.35, 0.62);
@@ -284,13 +284,13 @@ exports.install = function(blockly, blockInstallOptions) {
284284
}
285285
};
286286

287-
generator.minecraft_selected_target_x = function () {
287+
generator.voxel_selected_target_x = function () {
288288
// Generate JavaScript for handling click event.
289289

290-
return ['Minecraft.getSelectedTargetX()\n', Blockly.JavaScript.ORDER_ATOMIC];
290+
return ['Voxel.getSelectedTargetX()\n', Blockly.JavaScript.ORDER_ATOMIC];
291291
};
292292

293-
blockly.Blocks.minecraft_selected_target_y = {
293+
blockly.Blocks.voxel_selected_target_y = {
294294
// selected target y.
295295
init: function () {
296296
this.setHSV(258, 0.35, 0.62);
@@ -301,12 +301,12 @@ exports.install = function(blockly, blockInstallOptions) {
301301
}
302302
};
303303

304-
generator.minecraft_selected_target_y = function () {
304+
generator.voxel_selected_target_y = function () {
305305
// Generate JavaScript for handling click event.
306-
return ['Minecraft.getSelectedTargetY()\n', Blockly.JavaScript.ORDER_ATOMIC];
306+
return ['Voxel.getSelectedTargetY()\n', Blockly.JavaScript.ORDER_ATOMIC];
307307
};
308308

309-
blockly.Blocks.minecraft_selected_target_z = {
309+
blockly.Blocks.voxel_selected_target_z = {
310310
// selected target z.
311311
init: function () {
312312
this.setHSV(258, 0.35, 0.62);
@@ -317,9 +317,9 @@ exports.install = function(blockly, blockInstallOptions) {
317317
}
318318
};
319319

320-
generator.minecraft_selected_target_z = function () {
320+
generator.voxel_selected_target_z = function () {
321321
// Generate JavaScript for handling click event.
322-
return ['Minecraft.getSelectedTargetZ()\n', Blockly.JavaScript.ORDER_ATOMIC];
322+
return ['Voxel.getSelectedTargetZ()\n', Blockly.JavaScript.ORDER_ATOMIC];
323323
};
324324

325325
};

blockly/src/minecraft/controls.html.ejs renamed to blockly/src/voxel/controls.html.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<%
2-
var msg = require('../../locale/current/minecraft');
2+
var msg = require('../../locale/current/voxel');
33
var commonMsg = require('../../locale/current/common');
44
%>
55

File renamed without changes.

blockly/src/minecraft/levels.js renamed to blockly/src/voxel/levels.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
var msg = require('../../locale/current/minecraft');
1+
var msg = require('../../locale/current/voxel');
22
var blockUtils = require('../block_utils');
33

44
/**
55
* Information about level-specific requirements.
66
*/
77
module.exports = {
8-
'minecraft1': {
8+
'voxel1': {
99
ideal: Infinity,
1010
toolbox: blockUtils.createToolbox(
1111
blockUtils.blockOfType('when_run') +
12-
blockUtils.blockOfType('minecraft_whenRightClick') +
13-
blockUtils.blockOfType('minecraft_whenLeftClick') +
14-
blockUtils.blockOfType('minecraft_setGravity') +
15-
blockUtils.blockOfType('minecraft_setSpeed') +
16-
blockUtils.blockOfType('minecraft_setBlock') +
12+
blockUtils.blockOfType('voxel_whenRightClick') +
13+
blockUtils.blockOfType('voxel_whenLeftClick') +
14+
blockUtils.blockOfType('voxel_setGravity') +
15+
blockUtils.blockOfType('voxel_setSpeed') +
16+
blockUtils.blockOfType('voxel_setBlock') +
1717
'<block type="math_random_int"><value name="FROM"><block type="math_number"><title name="NUM">1</title></block></value><value name="TO"><block type="math_number"><title name="NUM">37</title></block></value></block>' +
18-
blockUtils.blockOfType('minecraft_adjacent_target_x') +
19-
blockUtils.blockOfType('minecraft_adjacent_target_y') +
20-
blockUtils.blockOfType('minecraft_adjacent_target_z') +
21-
blockUtils.blockOfType('minecraft_selected_target_x') +
22-
blockUtils.blockOfType('minecraft_selected_target_y') +
23-
blockUtils.blockOfType('minecraft_selected_target_z') +
24-
blockUtils.blockOfType('minecraft_log') +
18+
blockUtils.blockOfType('voxel_adjacent_target_x') +
19+
blockUtils.blockOfType('voxel_adjacent_target_y') +
20+
blockUtils.blockOfType('voxel_adjacent_target_z') +
21+
blockUtils.blockOfType('voxel_selected_target_x') +
22+
blockUtils.blockOfType('voxel_selected_target_y') +
23+
blockUtils.blockOfType('voxel_selected_target_z') +
24+
blockUtils.blockOfType('voxel_log') +
2525
'<block type="controls_repeat"><title name="TIMES">4</title></block><block type="controls_repeat_dropdown"><title name="TIMES" config="3-10">???</title></block><block type="controls_repeat_ext"><value name="TIMES"></value><statement name="DO"></statement></block>' +
2626
'<block type="math_number"></block><block type="math_number_dropdown"><title name="NUM" config="1-10">5</title></block><block type="math_arithmetic" inline="true"></block><block type="math_random_int"><value name="FROM"><block type="math_number"><title name="NUM">1</title></block></value><value name="TO"><block type="math_number"><title name="NUM">100</title></block></value></block><block type="math_random_float"></block>' +
2727
'<block type="variables_set" inline="false"><title name="VAR">x</title><value name="VALUE"><block type="math_number"><title name="NUM">???</title></block></value></block><block type="variables_get"><title name="VAR">x</title></block>'
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
var appMain = require('../appMain');
2-
window.Minecraft = require('./minecraft');
2+
window.Voxel = require('./voxel');
33
var blocks = require('./blocks');
44
var skins = require('../skins');
55
var levels = require('./levels');
66

7-
window.minecraftMain = function(options) {
7+
window.voxelMain = function(options) {
88
options.skinsModule = skins;
99
options.blocksModule = blocks;
10-
appMain(window.Minecraft, levels, options);
10+
appMain(window.Voxel, levels, options);
1111
};

blockly/src/minecraft/skins.js renamed to blockly/src/voxel/skins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var skinsBase = require('../skins');
99

1010
var CONFIGS = {
1111

12-
minecraft: {
12+
voxel: {
1313
}
1414

1515
};

0 commit comments

Comments
 (0)