Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTS (Levelbuilder > Staging) [robo-dts] #22967

Merged
merged 13 commits into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions dashboard/config/blocks/GamelabJr/gamelab_getProp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"func": "getProp",
"blockText": "{SPRITE} {PROPERTY}",
"returnType": "None",
"color": [
258,
"0.35",
"0.62"
],
"args": [
{
"name": "SPRITE",
Expand All @@ -28,10 +33,6 @@
"y position",
"\"y\""
],
[
"costume",
"\"costume\""
],
[
"movement direction",
"\"direction\""
Expand Down
11 changes: 11 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_hasBehavior.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function hasBehavior(sprite, behavior) {
var index = findBehavior(
sprite,
normalizeBehavior(behavior)
);
if (index === -1) {
return false;
} else {
return true;
}
}
18 changes: 18 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_hasBehavior.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"category": "Logic",
"config": {
"func": "hasBehavior",
"blockText": "{SPRITE} is currently {BEHAVIOR}",
"args": [
{
"name": "SPRITE",
"type": "Sprite"
},
{
"name": "BEHAVIOR",
"type": "Behavior"
}
],
"returnType": "Boolean"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
"func": "locationAt",
"blockText": "location X: {X} Y: {Y}",
"returnType": "Location",
"color": [
300,
"0.46",
"0.89"
],
"args": [
{
"name": "X"
Expand Down
7 changes: 7 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_mirrorSprite.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function mirrorSprite(sprite,direction) {
if (direction == "right") {
sprite.mirrorX(1);
} else {
sprite.mirrorX(-1);
}
}
26 changes: 26 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_mirrorSprite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"category": "Actions",
"config": {
"func": "mirrorSprite",
"blockText": "{SPRITE} face {DIRECTION}",
"args": [
{
"name": "SPRITE",
"type": "Sprite"
},
{
"name": "DIRECTION",
"options": [
[
"right",
"\"right\""
],
[
"left",
"\"left\""
]
]
}
]
}
}
17 changes: 17 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_moveInDirection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function moveInDirection(sprite,distance,direction) {
if (direction== "North") {
sprite.y-=distance;
}
else if (direction== "East") {
sprite.x+=distance;
}
else if (direction=="South") {
sprite.y+=distance;
}
else if (direction=="West") {
sprite.x-=distance;
}
else {
console.error("moveInDirection: invalid direction provided");
}
}
37 changes: 37 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_moveInDirection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"category": "Actions",
"config": {
"func": "moveInDirection",
"blockText": "move {SPRITE} {DISTANCE} pixels {DIRECTION}",
"args": [
{
"name": "SPRITE",
"type": "Sprite"
},
{
"name": "DISTANCE"
},
{
"name": "DIRECTION",
"options": [
[
"North",
"\"North\""
],
[
"East",
"\"East\""
],
[
"South",
"\"South\""
],
[
"West",
"\"West\""
]
]
}
]
}
}
8 changes: 8 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_moveToward.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function moveToward(sprite,distance,target) {
//The canvas coordinate system is different, hence the need to negate things
var angleOfMovement=Math.atan2((-1*target.y+sprite.y),(-1*target.x+sprite.x));
var dx = distance*Math.cos(angleOfMovement);
var dy = distance*Math.sin(angleOfMovement);
sprite.x-=dx;
sprite.y-=dy;
}
20 changes: 20 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_moveToward.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"category": "Actions",
"config": {
"func": "moveToward",
"blockText": "move {SPRITE} {DISTANCE} pixels toward {TARGET}",
"args": [
{
"name": "SPRITE",
"type": "Sprite"
},
{
"name": "DISTANCE"
},
{
"name": "TARGET",
"type": "Location"
}
]
}
}
3 changes: 3 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_randomLocation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function randomLocation() {
return {x: randomNumber(20,380),y: randomNumber(20,380)};
}
8 changes: 8 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_randomLocation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"category": "Sprites",
"config": {
"func": "randomLocation",
"blockText": "random location",
"returnType": "Location"
}
}
3 changes: 3 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_setSize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function setSize(sprite,size) {
sprite.scale=size/100;
}
16 changes: 16 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_setSize.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"category": "Actions",
"config": {
"func": "setSize",
"blockText": "set {SPRITE} size to {N}%",
"args": [
{
"name": "SPRITE",
"type": "Sprite"
},
{
"name": "N"
}
]
}
}
8 changes: 8 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_turn.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function turn(sprite,n,direction) {
if (direction=="right") {
sprite.rotation+=n;
}
else {
sprite.rotation-=n;
}
}
29 changes: 29 additions & 0 deletions dashboard/config/blocks/GamelabJr/gamelab_turn.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"category": "Actions",
"config": {
"func": "turn",
"blockText": "{SPRITE} turn {DIRECTION} {N} degrees",
"args": [
{
"name": "SPRITE",
"type": "Sprite"
},
{
"name": "N"
},
{
"name": "DIRECTION",
"options": [
[
"right",
"\"right\""
],
[
"left",
"\"left\""
]
]
}
]
}
}
2 changes: 1 addition & 1 deletion dashboard/config/courses/csd-2017.course
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"teacher_resources": [
[
"curriculum",
"https://curriculum.code.org/csd/"
"https://curriculum.code.org/csd-1718/"
],
[
"teacherForum",
Expand Down
11 changes: 11 additions & 0 deletions dashboard/config/courses/csd-2018.course
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,16 @@
"csd6-2018"
],
"properties": {
"teacher_resources": [
[
"curriculum",
"https://curriculum.code.org/csd-18/"
],
[
"teacherForum",
"https://forum.code.org/c/csd"
]
],
"has_verified_resources": true
}
}
6 changes: 3 additions & 3 deletions dashboard/config/locales/courses.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ en:
assignment_family_title: Computer Science Discoveries
title: Computer Science Discoveries ('18-'19)
version_title: "'18-'19"
description_short: The 2018-2019 version of the CS Discoveries course.
description_student: ''
description_teacher: ''
description_short: An introductory computer science course that empowers students to create authentic artifacts.
description_student: Computer Science Discoveries (CS Discoveries) is an introductory computer science course that empowers students to create authentic artifacts and engage with computer science as a medium for creativity, communication, problem solving, and fun.
description_teacher: Computer Science Discoveries (CS Discoveries) is an introductory computer science course that empowers students to create authentic artifacts and engage with computer science as a medium for creativity, communication, problem solving, and fun.
csp-2018:
assignment_family_title: Computer Science Principles
title: Computer Science Principles ('18-'19)
Expand Down
18 changes: 15 additions & 3 deletions dashboard/config/locales/scripts.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7720,7 +7720,7 @@ en:
description_student: ''
description_teacher: ''
Conditionals in Bee:
name: Conditionals in Bee
name: If/Else with Bee
Until Loops in Maze:
name: Until Loops in Maze
Programming in Maze:
Expand All @@ -7746,7 +7746,7 @@ en:
Conditionals with Cards:
name: Conditionals with Cards
Conditionals & Loops in Harvester:
name: Conditionals & Loops in Harvester
name: Harvesting with Conditionals
'Functions: Songwriting':
name: Songwriting
Functions in Minecraft:
Expand Down Expand Up @@ -8345,7 +8345,7 @@ en:
Pet Giraffe with Sprite Lab:
name: Pet Giraffe
Copyright and Creativity:
name: Copyright and Creativity
name: Digital Sharing
coursef-2018:
title: Course F
description: Learn to use different kinds of loops, events, functions, and conditionals. Investigate different problem-solving techniques and discuss societal impacts of computing and the internet. In the second part of this course, design and create a capstone project you can share with friends and family.
Expand Down Expand Up @@ -9501,3 +9501,15 @@ en:
name: Loops in Ice Age
'Persistence & Frustration: Stevie and the Big Project':
name: 'Persistence & Frustration: Stevie and the Big Project'
spritelab-validated:
stages:
Fish Tank - Creating Sprites:
name: Fish Tank - Creating Sprites
Alien Dance Party - Input:
name: Alien Dance Party - Input
Virtual Pet - Interactions:
name: Virtual Pet - Interactions
title: ''
description_audience: ''
description_short: ''
description: ''
16 changes: 8 additions & 8 deletions dashboard/config/scripts/coursee-2018.script
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,16 @@ bonus 'courseE_artist_concept_challenge1_2018'
bonus 'courseE_artist_concept_challenge2_2018'

stage 'Learning Sprites with Sprite Lab', flex_category: 'csf_e_2'
level 'Fish Tank 1'
level 'Fish Tank 2'
level 'Fish Tank 3'
level 'Fish Tank 4'
level 'Fish Tank 5'
level 'Fish Tank 6'
level 'Fish Tank 7'
level 'Fish Tank 1-validated'
level 'Fish Tank 2-validated'
level 'Fish Tank 3-validated'
level 'Fish Tank 4-validated'
level 'Fish Tank 5-validated'
level 'Fish Tank 6-validated'
level 'Fish Tank 7-validated'

stage 'Alien Dance Party with Sprite Lab', flex_category: 'csf_e_2'
level 'Dance Party 1'
level 'Dance Party 1-validated'
level 'Dance Party 2'
level 'Dance Party 3'
level 'Dance Party 4'
Expand Down