-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["ms-edu.pxt-vscode-web"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"editor.formatOnType": true, | ||
"files.autoSave": "afterDelay", | ||
"files.watcherExclude": { | ||
"**/.git/objects/**": true, | ||
"**/built/**": true, | ||
"**/node_modules/**": true, | ||
"**/yotta_modules/**": true, | ||
"**/yotta_targets": true, | ||
"**/pxt_modules/**": true, | ||
"**/.pxt/**": true | ||
}, | ||
"files.associations": { | ||
"*.blocks": "html", | ||
"*.jres": "json" | ||
}, | ||
"search.exclude": { | ||
"**/built": true, | ||
"**/node_modules": true, | ||
"**/yotta_modules": true, | ||
"**/yotta_targets": true, | ||
"**/pxt_modules": true, | ||
"**/.pxt": true | ||
}, | ||
"files.exclude": { | ||
"**/pxt_modules": true, | ||
"**/.pxt": true | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source 'https://rubygems.org' | ||
gem 'github-pages', group: :jekyll_plugins |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
all: deploy | ||
|
||
build: | ||
pxt build | ||
|
||
deploy: | ||
pxt deploy | ||
|
||
test: | ||
pxt test |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
> Open this page at [https://thsparks.github.io/aquarium-test/](https://thsparks.github.io/aquarium-test/) | ||
## Use as Extension | ||
|
||
This repository can be added as an **extension** in MakeCode. | ||
|
||
* open [https://minecraft.makecode.com/](https://minecraft.makecode.com/) | ||
* click on **New Project** | ||
* click on **Extensions** under the gearwheel menu | ||
* search for **https://github.com/thsparks/aquarium-test** and import | ||
|
||
## Edit this project | ||
|
||
To edit this repository in MakeCode. | ||
|
||
* open [https://minecraft.makecode.com/](https://minecraft.makecode.com/) | ||
* click on **Import** then click on **Import URL** | ||
* paste **https://github.com/thsparks/aquarium-test** and click import | ||
|
||
#### Metadata (used for search, rendering) | ||
|
||
* for PXT/minecraft | ||
<script src="https://makecode.com/gh-pages-embed.js"></script><script>makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");</script> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
makecode: | ||
target: minecraft | ||
platform: minecraft | ||
home_url: https://minecraft.makecode.com/ | ||
theme: jekyll-theme-slate | ||
include: | ||
- assets | ||
- README.md |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"entries":[{"timestamp":1717468545613,"editorVersion":"1.7.28","changes":[{"type":"edited","filename":"custom.ts","patch":[{"diffs":[[-1,"-"],[0,"/**\n * C"]],"start1":0,"start2":0,"length1":9,"length2":8}]}]},{"timestamp":1717468568873,"editorVersion":"1.7.28","changes":[{"type":"edited","filename":"main.blocks","patch":[{"diffs":[[0,"y/xml\"><"],[1,"block type=\"minecraftOnChat\" x=\"0\" y=\"0\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" numargs=\"0\"></mutation><value name=\"command\"><shadow type=\"text\"><field name=\"TEXT\">run</field></shadow></value><statement name=\"HANDLER\"><block type=\"zoo_aquarium\"><value name=\"size\"><shadow type=\"math_number_minmax\"><mutation min=\"6\" max=\"100\" label=\"Size\" precision=\"0\"></mutation><field name=\"SLIDER\">6</field></shadow></value></block></statement></block><"],[0,"/xml>"]],"start1":48,"start2":48,"length1":13,"length2":461}]},{"type":"edited","filename":"pxt.json","patch":[{"diffs":[[0," ],\n"],[-1," \"testFiles\": [\n \"test.ts\"\n ],\n"],[0," "]],"start1":223,"start2":223,"length1":52,"length2":8}]},{"type":"added","filename":"test.ts","value":"// tests go here; this will not be compiled when this package is used as an extension.\n"}]}],"snapshots":[{"timestamp":1717468545612,"editorVersion":"1.7.28","text":{"main.blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"minecraftOnChat\" x=\"0\" y=\"0\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" numargs=\"0\"></mutation><value name=\"command\"><shadow type=\"text\"><field name=\"TEXT\">run</field></shadow></value><statement name=\"HANDLER\"><block type=\"zoo_aquarium\"><value name=\"size\"><shadow type=\"math_number_minmax\"><mutation min=\"6\" max=\"100\" label=\"Size\" precision=\"0\"></mutation><field name=\"SLIDER\">6</field></shadow></value></block></statement></block></xml>","main.ts":"player.onChat(\"run\", function () {\n zoo.aquarium(6)\n})\n","README.md":"","custom.ts":"/**\n * Custom blocks\n */\n//% color=#FA1234 icon=\"\"\nnamespace zoo {\n \n //% block=\"build glow squid tank of size $size\"\n //% size.defl=6\n //% size.min=6 size.max=100\n export function aquarium(size: number) {\n blocks.fill(GLASS, pos(0, 0, 0), pos(size, size, size), FillOperation.Replace);\n blocks.fill(WATER, pos(1, 1, 1), pos(size-1, size-1, size-1), FillOperation.Replace);\n mobs.spawn(GLOW_SQUID, pos(size/2, size/2, size/2));\n }\n\n}\n","pxt.json":"{\n \"name\": \"Aquarium\",\n \"description\": \"\",\n \"dependencies\": {\n \"core\": \"*\",\n \"builder\": \"*\"\n },\n \"files\": [\n \"main.blocks\",\n \"main.ts\",\n \"README.md\",\n \"custom.ts\"\n ],\n \"targetVersions\": {\n \"branch\": \"v1.7.28\",\n \"tag\": \"v1.7.28\",\n \"commits\": \"https://github.com/microsoft/pxt-minecraft/commits/43da08b76c2f6625ff14c4dd6110a975e16396e8\",\n \"target\": \"1.7.28\",\n \"pxt\": \"9.2.8\"\n },\n \"preferredEditor\": \"tsprj\"\n}\n"}}],"shares":[]} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-/** | ||
* Custom blocks | ||
*/ | ||
//% color=#FA1234 icon="" | ||
namespace zoo { | ||
|
||
//% block="build glow squid tank of size $size" | ||
//% size.defl=6 | ||
//% size.min=6 size.max=100 | ||
export function aquarium(size: number) { | ||
blocks.fill(GLASS, pos(0, 0, 0), pos(size, size, size), FillOperation.Replace); | ||
blocks.fill(WATER, pos(1, 1, 1), pos(size-1, size-1, size-1), FillOperation.Replace); | ||
mobs.spawn(GLOW_SQUID, pos(size/2, size/2, size/2)); | ||
} | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<xml xmlns="https://developers.google.com/blockly/xml"></xml> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
player.onChat("run", function () { | ||
zoo.aquarium(6) | ||
}) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"name": "Aquarium", | ||
"description": "", | ||
"dependencies": { | ||
"core": "*", | ||
"builder": "*" | ||
}, | ||
"files": [ | ||
"main.blocks", | ||
"main.ts", | ||
"README.md", | ||
"custom.ts" | ||
], | ||
"testFiles": [ | ||
"test.ts" | ||
], | ||
"targetVersions": { | ||
"branch": "v1.7.28", | ||
"tag": "v1.7.28", | ||
"commits": "https://github.com/microsoft/pxt-minecraft/commits/43da08b76c2f6625ff14c4dd6110a975e16396e8", | ||
"target": "1.7.28", | ||
"pxt": "9.2.8", | ||
"targetId": "minecraft" | ||
}, | ||
"supportedTargets": [ | ||
"minecraft" | ||
], | ||
"preferredEditor": "tsprj" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// tests go here; this will not be compiled when this package is used as an extension. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ES5", | ||
"noImplicitAny": true, | ||
"outDir": "built", | ||
"rootDir": "." | ||
}, | ||
"exclude": ["pxt_modules/**/*test.ts"] | ||
} |