Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
c7cc1b62
Commit
c7cc1b62
authored
Feb 19, 2016
by
morant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Revert "Fix review comments, and organize code a bit.""
This reverts commit
e9cb08d2
.
parent
e9cb08d2
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
316 additions
and
622 deletions
+316
-622
src/components/microworld/microworld.jsx
src/components/microworld/microworld.jsx
+58
-63
src/components/microworld/microworld.scss
src/components/microworld/microworld.scss
+148
-355
src/components/nestedcarousel/nestedcarousel.json
src/components/nestedcarousel/nestedcarousel.json
+42
-0
src/components/nestedcarousel/nestedcarousel.jsx
src/components/nestedcarousel/nestedcarousel.jsx
+25
-14
src/components/nestedcarousel/nestedcarousel.scss
src/components/nestedcarousel/nestedcarousel.scss
+8
-0
src/components/thumbnail/thumbnail.jsx
src/components/thumbnail/thumbnail.jsx
+10
-2
src/components/tipsslider/tipsslider.json
src/components/tipsslider/tipsslider.json
+0
-50
src/components/tipsslider/tipsslider.scss
src/components/tipsslider/tipsslider.scss
+0
-75
src/views/microworld_art/microworld_art.json
src/views/microworld_art/microworld_art.json
+5
-19
src/views/microworld_art/microworld_art.jsx
src/views/microworld_art/microworld_art.jsx
+3
-1
src/views/microworld_fashion/microworld_fashion.json
src/views/microworld_fashion/microworld_fashion.json
+6
-22
src/views/microworld_fashion/microworld_fashion.jsx
src/views/microworld_fashion/microworld_fashion.jsx
+3
-1
src/views/microworld_hiphop/microworld_hiphop.json
src/views/microworld_hiphop/microworld_hiphop.json
+5
-19
src/views/microworld_hiphop/microworld_hiphop.jsx
src/views/microworld_hiphop/microworld_hiphop.jsx
+3
-1
No files found.
src/components/microworld/microworld.jsx
View file @
c7cc1b62
This diff is collapsed.
Click to expand it.
src/components/microworld/microworld.scss
View file @
c7cc1b62
This diff is collapsed.
Click to expand it.
src/components/nestedcarousel/nestedcarousel.json
0 → 100644
View file @
c7cc1b62
[
{
"title"
:
"Start Dancing"
,
"thumbnails"
:[
{
"type"
:
"tip"
,
"title"
:
"First, select a sprite"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/dancer-sprite.png"
},
{
"type"
:
"tip"
,
"title"
:
"Then, try this script"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/switch-wait.gif"
},
{
"type"
:
"tip"
,
"title"
:
"Start it!"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
}
]
},
{
"title"
:
"Repeat the Dance"
,
"thumbnails"
:[
{
"type"
:
"tip"
,
"title"
:
"Add another
\"
wait
\"
"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-wait.gif"
},
{
"type"
:
"tip"
,
"title"
:
"Drag this block over"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-repeat.gif"
},
{
"type"
:
"tip"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
}
]
}
]
\ No newline at end of file
src/components/
tipsslider/tipsslider
.jsx
→
src/components/
nestedcarousel/nestedcarousel
.jsx
View file @
c7cc1b62
...
@@ -7,16 +7,24 @@ var Thumbnail = require('../thumbnail/thumbnail.jsx');
...
@@ -7,16 +7,24 @@ var Thumbnail = require('../thumbnail/thumbnail.jsx');
require
(
'
slick-carousel/slick/slick.scss
'
);
require
(
'
slick-carousel/slick/slick.scss
'
);
require
(
'
slick-carousel/slick/slick-theme.scss
'
);
require
(
'
slick-carousel/slick/slick-theme.scss
'
);
require
(
'
./
tipsslider
.scss
'
);
require
(
'
./
nestedcarousel
.scss
'
);
var
TipsSlider
=
React
.
createClass
({
type
:
'
TipsSlider
'
,
{
/*
NestedCarousel is used to show a carousel, where each slide is composed of a few
thumbnails (for example, to show step-by-syep tips, where each stage has a few steps).
It creates the thumbnails without links.
Each slide has a title, and then a list of thumbnails, that will be shown together.
*/
}
var
NestedCarousel
=
React
.
createClass
({
type
:
'
NestedCarousel
'
,
propTypes
:
{
propTypes
:
{
items
:
React
.
PropTypes
.
array
items
:
React
.
PropTypes
.
array
},
},
getDefaultProps
:
function
()
{
getDefaultProps
:
function
()
{
return
{
return
{
items
:
require
(
'
./
tipsslider.json
'
),
items
:
require
(
'
./
nestedcarousel.json
'
)
};
};
},
},
render
:
function
()
{
render
:
function
()
{
...
@@ -33,32 +41,35 @@ var TipsSlider = React.createClass({
...
@@ -33,32 +41,35 @@ var TipsSlider = React.createClass({
var
arrows
=
this
.
props
.
items
.
length
>
settings
.
slidesToShow
;
var
arrows
=
this
.
props
.
items
.
length
>
settings
.
slidesToShow
;
var
classes
=
classNames
(
var
classes
=
classNames
(
'
tipsslider
'
,
'
nestedcarousel
'
,
'
carousel
'
,
this
.
props
.
className
this
.
props
.
className
);
);
var
stages
=
[];
var
stages
=
[];
for
(
var
i
=
0
;
i
<
this
.
props
.
items
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
props
.
items
.
length
;
i
++
)
{
var
items
=
this
.
props
.
items
[
i
].
t
ip
s
;
var
items
=
this
.
props
.
items
[
i
].
t
humbnail
s
;
var
thumbnails
=
[];
var
thumbnails
=
[];
for
(
var
j
=
0
;
j
<
items
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
items
.
length
;
j
++
)
{
var
item
=
items
[
j
];
var
item
=
items
[
j
];
thumbnails
.
push
(<
Thumbnail
key=
{
item
.
id
}
thumbnails
.
push
(
<
Thumbnail
key=
{
'
inner_
'
+
i
+
'
_
'
+
j
}
title=
{
item
.
title
}
title=
{
item
.
title
}
src=
{
item
.
thumbnailUrl
}
/>)
src=
{
item
.
thumbnailUrl
}
linkTitle
=
{
false
}
/>);
}
}
stages
.
push
(
stages
.
push
(
<
div
className=
"testing"
key=
{
"
stage_
"
+
i
}
>
<
div
key=
{
'
outer_
'
+
i
}
>
<
h3
>
{
this
.
props
.
items
[
i
].
title
}
</
h3
>
<
h3
>
{
this
.
props
.
items
[
i
].
title
}
</
h3
>
{
thumbnails
}
{
thumbnails
}
</
div
>)
</
div
>)
;
}
}
return
(
return
(
<
Slider
className=
{
classes
}
arrows=
{
arrows
}
{
...
settings
}
>
<
Slider
className=
{
classes
}
arrows=
{
arrows
}
{
...
settings
}
>
{
stages
}
{
stages
}
</
Slider
>
</
Slider
>
);
);
}
}
});
});
module
.
exports
=
TipsSlider
;
module
.
exports
=
NestedCarousel
;
src/components/nestedcarousel/nestedcarousel.scss
0 → 100644
View file @
c7cc1b62
@import
"../../colors"
;
@import
"../carousel/carousel.scss"
;
.nestedcarousel
{
.slick-slide
{
padding-left
:
60px
;
}
}
src/components/thumbnail/thumbnail.jsx
View file @
c7cc1b62
...
@@ -15,7 +15,8 @@ var Thumbnail = React.createClass({
...
@@ -15,7 +15,8 @@ var Thumbnail = React.createClass({
src
:
''
,
src
:
''
,
type
:
'
project
'
,
type
:
'
project
'
,
showLoves
:
false
,
showLoves
:
false
,
showRemixes
:
false
showRemixes
:
false
,
linkTitle
:
true
};
};
},
},
render
:
function
()
{
render
:
function
()
{
...
@@ -54,13 +55,20 @@ var Thumbnail = React.createClass({
...
@@ -54,13 +55,20 @@ var Thumbnail = React.createClass({
</
div
>
</
div
>
);
);
}
}
var
titleElement
;
if
(
this
.
props
.
linkTitle
)
{
titleElement
=
<
a
href=
{
this
.
props
.
href
}
>
{
this
.
props
.
title
}
</
a
>;
}
else
{
titleElement
=
this
.
props
.
title
;
}
return
(
return
(
<
div
className=
{
classes
}
>
<
div
className=
{
classes
}
>
<
a
className=
"thumbnail-image"
href=
{
this
.
props
.
href
}
>
<
a
className=
"thumbnail-image"
href=
{
this
.
props
.
href
}
>
<
img
src=
{
this
.
props
.
src
}
/>
<
img
src=
{
this
.
props
.
src
}
/>
</
a
>
</
a
>
<
div
className=
"thumbnail-title"
>
<
div
className=
"thumbnail-title"
>
<
a
href=
{
this
.
props
.
href
}
>
{
this
.
props
.
title
}
</
a
>
{
titleElement
}
</
div
>
</
div
>
{
extra
}
{
extra
}
</
div
>
</
div
>
...
...
src/components/tipsslider/tipsslider.json
deleted
100644 → 0
View file @
e9cb08d2
[
{
"id"
:
1
,
"type"
:
"project"
,
"title"
:
"Project1"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-repeat.gif"
,
"creator"
:
""
,
"href"
:
"/images/microworlds/hiphop/add-repeat.gif"
},
{
"id"
:
2
,
"type"
:
"project"
,
"title"
:
"Project2"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-wait.gif"
,
"creator"
:
""
,
"href"
:
"/images/microworlds/hiphop/add-wait.gif"
},
{
"id"
:
3
,
"type"
:
"project"
,
"title"
:
"Project"
,
"thumbnailUrl"
:
""
,
"creator"
:
""
,
"href"
:
"#"
},
{
"id"
:
4
,
"type"
:
"project"
,
"title"
:
"Project"
,
"thumbnailUrl"
:
""
,
"creator"
:
""
,
"href"
:
"#"
},
{
"id"
:
5
,
"type"
:
"project"
,
"title"
:
"Project"
,
"thumbnailUrl"
:
""
,
"creator"
:
""
,
"href"
:
"#"
},
{
"id"
:
6
,
"type"
:
"project"
,
"title"
:
"Project"
,
"thumbnailUrl"
:
""
,
"creator"
:
""
,
"href"
:
"#"
}
]
src/components/tipsslider/tipsslider.scss
deleted
100644 → 0
View file @
e9cb08d2
@import
"../../colors"
;
.tipsslider
{
$icon-size
:
40px
;
$button-offset
:
$icon-size
+
5px
;
$box-content-offset
:
20px
;
//padding: 12px $button-offset;
.box-content
&
{
padding
:
12px
$button-offset
-
20px
;
}
.slick-next
,
.slick-prev
{
margin-top
:
-
$icon-size
/
2
;
width
:
$icon-size
;
height
:
$icon-size
;
&
:before
{
display
:
block
;
background-repeat
:
no-repeat
;
background-position
:
center
center
;
background-size
:
70%
;
width
:
$icon-size
;
height
:
$icon-size
;
font-size
:
$icon-size
;
content
:
""
;
}
&
.slick-disabled
:before
{
opacity
:
1
;
}
}
.slick-prev
{
left
:
0
;
&
:before
{
background-image
:
url("/svgs/carousel/prev_ui-dark-gray.svg")
;
}
&
:hover:before
{
background-image
:
url("/svgs/carousel/prev_ui-blue.svg")
;
background-size
:
90%
;
}
.box-content
&
{
left
:
-
$box-content-offset
;
}
}
.slick-next
{
right
:
0
;
&
:before
{
background-image
:
url("/svgs/carousel/next_ui-dark-gray.svg")
;
}
&
:hover:before
{
background-image
:
url("/svgs/carousel/next_ui-blue.svg")
;
background-size
:
90%
;
}
.box-content
&
{
right
:
-
$box-content-offset
;
}
}
.slick-slide
{
padding-right
:
30px
;
}
}
src/views/microworld_art/microworld_art.json
View file @
c7cc1b62
...
@@ -27,21 +27,18 @@
...
@@ -27,21 +27,18 @@
"tips"
:[
"tips"
:[
{
{
"title"
:
"Start Dancing"
,
"title"
:
"Start Dancing"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
1
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"First, select a sprite"
,
"title"
:
"First, select a sprite"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/dancer-sprite.png"
"thumbnailUrl"
:
"/images/microworlds/hiphop/dancer-sprite.png"
},
},
{
{
"id"
:
2
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Then, try this script"
,
"title"
:
"Then, try this script"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/switch-wait.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/switch-wait.gif"
},
},
{
{
"id"
:
3
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it!"
,
"title"
:
"Start it!"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
...
@@ -50,21 +47,18 @@
...
@@ -50,21 +47,18 @@
},
},
{
{
"title"
:
"Repeat the Dance"
,
"title"
:
"Repeat the Dance"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
4
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add another
\"
wait
\"
"
,
"title"
:
"Add another
\"
wait
\"
"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-wait.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-wait.gif"
},
},
{
{
"id"
:
5
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Drag this block over"
,
"title"
:
"Drag this block over"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-repeat.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-repeat.gif"
},
},
{
{
"id"
:
6
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
...
@@ -73,15 +67,13 @@
...
@@ -73,15 +67,13 @@
},
},
{
{
"title"
:
"Play Music"
,
"title"
:
"Play Music"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
7
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add music that repeats"
,
"title"
:
"Add music that repeats"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-play-sound.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-play-sound.gif"
},
},
{
{
"id"
:
8
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
...
@@ -90,21 +82,18 @@
...
@@ -90,21 +82,18 @@
},
},
{
{
"title"
:
"Shadow Dance"
,
"title"
:
"Shadow Dance"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
7
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add this block"
,
"title"
:
"Add this block"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/shadow-dance.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/shadow-dance.gif"
},
},
{
{
"id"
:
8
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
},
},
{
{
"id"
:
9
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Click the stop sign to reset"
,
"title"
:
"Click the stop sign to reset"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/stop.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/stop.gif"
...
@@ -113,21 +102,18 @@
...
@@ -113,21 +102,18 @@
},
},
{
{
"title"
:
"More things to try"
,
"title"
:
"More things to try"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
10
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Try different dance moves"
,
"title"
:
"Try different dance moves"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-moves.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-moves.gif"
},
},
{
{
"id"
:
11
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add more moves"
,
"title"
:
"Add more moves"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/long-dance-script.png"
"thumbnailUrl"
:
"/images/microworlds/hiphop/long-dance-script.png"
},
},
{
{
"id"
:
12
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Change the timing"
,
"title"
:
"Change the timing"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-timing.png"
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-timing.png"
...
...
src/views/microworld_art/microworld_art.jsx
View file @
c7cc1b62
var
render
=
require
(
'
../../lib/render.jsx
'
);
var
render
=
require
(
'
../../lib/render.jsx
'
);
var
Microworld
=
require
(
'
../../components/microworld/microworld.jsx
'
);
var
Microworld
=
require
(
'
../../components/microworld/microworld.jsx
'
);
render
(<
Microworld
microworldData=
{
require
(
"
./microworld_art.json
"
)
}
/>,
document
.
getElementById
(
'
view
'
));
var
microworldData
=
require
(
'
./microworld_art.json
'
);
render
(<
Microworld
microworldData=
{
microworldData
}
/>,
document
.
getElementById
(
'
view
'
));
src/views/microworld_fashion/microworld_fashion.json
View file @
c7cc1b62
...
@@ -16,15 +16,13 @@
...
@@ -16,15 +16,13 @@
"tips"
:[
"tips"
:[
{
{
"title"
:
"Click on blocks to see what they do"
,
"title"
:
"Click on blocks to see what they do"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
0
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" Try clicking this block "
,
"title"
:
" Try clicking this block "
,
"thumbnailUrl"
:
"/images/microworlds/fashion/click-block-color.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/click-block-color.gif"
},
},
{
{
"id"
:
1
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" Or this block"
,
"title"
:
" Or this block"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/click-block-costume.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/click-block-costume.gif"
...
@@ -33,21 +31,18 @@
...
@@ -33,21 +31,18 @@
},
},
{
{
"title"
:
"Try changing colors"
,
"title"
:
"Try changing colors"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
2
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" First, select a clothing item "
,
"title"
:
" First, select a clothing item "
,
"thumbnailUrl"
:
"/images/microworlds/fashion/shirts-sprite.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/shirts-sprite.png"
},
},
{
{
"id"
:
3
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" Then, try this script"
,
"title"
:
" Then, try this script"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-color.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-color.gif"
},
},
{
{
"id"
:
4
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" Test it out!"
,
"title"
:
" Test it out!"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/click-shirt.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/click-shirt.gif"
...
@@ -56,21 +51,18 @@
...
@@ -56,21 +51,18 @@
},
},
{
{
"title"
:
"Try changing costumes"
,
"title"
:
"Try changing costumes"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
5
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Select a piece of clothing "
,
"title"
:
"Select a piece of clothing "
,
"thumbnailUrl"
:
"/images/microworlds/fashion/hats-sprite.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/hats-sprite.png"
},
},
{
{
"id"
:
6
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Then, switch costumes"
,
"title"
:
"Then, switch costumes"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-costume.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-costume.gif"
},
},
{
{
"id"
:
7
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" Now, click it!"
,
"title"
:
" Now, click it!"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/click-hat.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/click-hat.gif"
...
@@ -79,21 +71,18 @@
...
@@ -79,21 +71,18 @@
},
},
{
{
"title"
:
"Say hello"
,
"title"
:
"Say hello"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
8
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Select the person"
,
"title"
:
"Select the person"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/person-sprite.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/person-sprite.png"
},
},
{
{
"id"
:
9
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Type in a phrase"
,
"title"
:
"Type in a phrase"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/say-something.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/say-something.gif"
},
},
{
{
"id"
:
10
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Then, try this script"
,
"title"
:
"Then, try this script"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-say.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-say.gif"
...
@@ -102,15 +91,13 @@
...
@@ -102,15 +91,13 @@
},
},
{
{
"title"
:
"Move the sprites"
,
"title"
:
"Move the sprites"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
11
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Select an accessory"
,
"title"
:
"Select an accessory"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/accessories-sprite.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/accessories-sprite.png"
},
},
{
{
"id"
:
12
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Tell it where to go"
,
"title"
:
"Tell it where to go"
,
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-goto.gif"
"thumbnailUrl"
:
"/images/microworlds/fashion/when-clicked-goto.gif"
...
@@ -119,21 +106,18 @@
...
@@ -119,21 +106,18 @@
},
},
{
{
"title"
:
"Other things to try"
,
"title"
:
"Other things to try"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
13
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add a sound "
,
"title"
:
"Add a sound "
,
"thumbnailUrl"
:
"/images/microworlds/fashion/play-drum.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/play-drum.png"
},
},
{
{
"id"
:
14
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
" Explore other costumes "
,
"title"
:
" Explore other costumes "
,
"thumbnailUrl"
:
"/images/microworlds/fashion/next-costume.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/next-costume.png"
},
},
{
{
"id"
:
15
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Make longer scripts "
,
"title"
:
"Make longer scripts "
,
"thumbnailUrl"
:
"/images/microworlds/fashion/block-stack.png"
"thumbnailUrl"
:
"/images/microworlds/fashion/block-stack.png"
...
...
src/views/microworld_fashion/microworld_fashion.jsx
View file @
c7cc1b62
var
render
=
require
(
'
../../lib/render.jsx
'
);
var
render
=
require
(
'
../../lib/render.jsx
'
);
var
Microworld
=
require
(
'
../../components/microworld/microworld.jsx
'
);
var
Microworld
=
require
(
'
../../components/microworld/microworld.jsx
'
);
render
(<
Microworld
microworldData=
{
require
(
"
./microworld_fashion.json
"
)
}
/>,
document
.
getElementById
(
'
view
'
));
var
microworldData
=
require
(
'
./microworld_fashion.json
'
);
render
(<
Microworld
microworldData=
{
microworldData
}
/>,
document
.
getElementById
(
'
view
'
));
src/views/microworld_hiphop/microworld_hiphop.json
View file @
c7cc1b62
...
@@ -16,21 +16,18 @@
...
@@ -16,21 +16,18 @@
"tips"
:[
"tips"
:[
{
{
"title"
:
"Start Dancing"
,
"title"
:
"Start Dancing"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
1
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"First, select a sprite"
,
"title"
:
"First, select a sprite"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/dancer-sprite.png"
"thumbnailUrl"
:
"/images/microworlds/hiphop/dancer-sprite.png"
},
},
{
{
"id"
:
2
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Then, try this script"
,
"title"
:
"Then, try this script"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/switch-wait.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/switch-wait.gif"
},
},
{
{
"id"
:
3
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it!"
,
"title"
:
"Start it!"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
...
@@ -39,21 +36,18 @@
...
@@ -39,21 +36,18 @@
},
},
{
{
"title"
:
"Repeat the Dance"
,
"title"
:
"Repeat the Dance"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
4
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add another
\"
wait
\"
"
,
"title"
:
"Add another
\"
wait
\"
"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-wait.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-wait.gif"
},
},
{
{
"id"
:
5
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Drag this block over"
,
"title"
:
"Drag this block over"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-repeat.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-repeat.gif"
},
},
{
{
"id"
:
6
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
...
@@ -62,15 +56,13 @@
...
@@ -62,15 +56,13 @@
},
},
{
{
"title"
:
"Play Music"
,
"title"
:
"Play Music"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
7
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add music that repeats"
,
"title"
:
"Add music that repeats"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-play-sound.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/add-play-sound.gif"
},
},
{
{
"id"
:
8
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
...
@@ -79,21 +71,18 @@
...
@@ -79,21 +71,18 @@
},
},
{
{
"title"
:
"Shadow Dance"
,
"title"
:
"Shadow Dance"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
7
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add this block"
,
"title"
:
"Add this block"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/shadow-dance.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/shadow-dance.gif"
},
},
{
{
"id"
:
8
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Start it"
,
"title"
:
"Start it"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/green-flag.gif"
},
},
{
{
"id"
:
9
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Click the stop sign to reset"
,
"title"
:
"Click the stop sign to reset"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/stop.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/stop.gif"
...
@@ -102,21 +91,18 @@
...
@@ -102,21 +91,18 @@
},
},
{
{
"title"
:
"More things to try"
,
"title"
:
"More things to try"
,
"t
ip
s"
:[
"t
humbnail
s"
:[
{
{
"id"
:
10
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Try different dance moves"
,
"title"
:
"Try different dance moves"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-moves.gif"
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-moves.gif"
},
},
{
{
"id"
:
11
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Add more moves"
,
"title"
:
"Add more moves"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/long-dance-script.png"
"thumbnailUrl"
:
"/images/microworlds/hiphop/long-dance-script.png"
},
},
{
{
"id"
:
12
,
"type"
:
"tip"
,
"type"
:
"tip"
,
"title"
:
"Change the timing"
,
"title"
:
"Change the timing"
,
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-timing.png"
"thumbnailUrl"
:
"/images/microworlds/hiphop/change-dance-timing.png"
...
...
src/views/microworld_hiphop/microworld_hiphop.jsx
View file @
c7cc1b62
var
render
=
require
(
'
../../lib/render.jsx
'
);
var
render
=
require
(
'
../../lib/render.jsx
'
);
var
Microworld
=
require
(
'
../../components/microworld/microworld.jsx
'
);
var
Microworld
=
require
(
'
../../components/microworld/microworld.jsx
'
);
render
(<
Microworld
microworldData=
{
require
(
"
./microworld_hiphop.json
"
)
}
/>,
document
.
getElementById
(
'
view
'
));
var
microworldData
=
require
(
'
./microworld_hiphop.json
'
);
render
(<
Microworld
microworldData=
{
microworldData
}
/>,
document
.
getElementById
(
'
view
'
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment