diff --git a/engine/js/book.js b/engine/js/book.js
index b808be2..29c7b11 100644
--- a/engine/js/book.js
+++ b/engine/js/book.js
@@ -102,7 +102,7 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
pageDraggedLeft = function (page) {
// If the page dragged is the right page or the cover
- if (page === pages[rightPageIndex] || page === cover) {
+ if (page === pages[rightPageIndex] || (page === cover && bookConfig.direction !== "rtl")) {
that.nextPage();
} else {
if (curOrientation === "SINGLE-PAGE") {
@@ -116,15 +116,19 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
// Handle drag on a page to the right
pageDraggedRight = function (page) {
- // If the page dragged is the left page
+ // If the page dragged is the left page or the cover
if (page === pages[leftPageIndex]) {
that.previousPage();
} else {
- if (curOrientation === "SINGLE-PAGE") {
- that.previousPage();
+ if (page === cover && bookConfig.direction === "rtl") {
+ that.gotoPage(0);
+ } else {
+ if (curOrientation === "SINGLE-PAGE") {
+ that.previousPage();
+ }
+ // If the right page is dragged right in two-page layout then do nothing
+ // because it would do nothing on a real book
}
- // If the right page is dragged right in two-page layout then do nothing
- // because it would do nothing on a real book
}
},
@@ -463,30 +467,61 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
}
}
- // If the current page is the cover
- if (targetPageIndex === -1) {
- // Turn off the previous page button
- if (prevPageButtonElement) {
- prevPageButtonElement.style.display = "none";
- }
- if (nextPageButtonElement) {
- nextPageButtonElement.style.display = "block";
- }
- } else {
- // Hide page navigation buttons when at the beginning and end
- if (curOrientation === "SINGLE-PAGE") {
+ // hide previous and next page buttons when unnecessary
+ if (bookConfig.direction === "rtl") {
+ // If the current page is the cover
+ if (targetPageIndex === -1) {
+ // Turn off the next page button
if (prevPageButtonElement) {
- prevPageButtonElement.style.display = (targetPageIndex === -1) ? "none" : "block";
+ prevPageButtonElement.style.display = "block";
}
if (nextPageButtonElement) {
- nextPageButtonElement.style.display = (targetPageIndex === pages.length - 1) ? "none" : "block";
+ nextPageButtonElement.style.display = "none";
}
} else {
+ // Hide page navigation buttons when at the beginning and end
+ if (curOrientation === "SINGLE-PAGE") {
+ if (prevPageButtonElement) {
+ prevPageButtonElement.style.display = (targetPageIndex === 0) ? "none" : "block";
+ }
+ if (nextPageButtonElement) {
+ nextPageButtonElement.style.display = (targetPageIndex === - 1) ? "none" : "block";
+ }
+ } else {
+ if (prevPageButtonElement) {
+ prevPageButtonElement.style.display = (leftPageIndex === 0) ? "none" : "block";
+ }
+ if (nextPageButtonElement) {
+ nextPageButtonElement.style.display = (targetPageIndex === - 1) ? "none" : "block";
+ }
+ }
+ }
+ } else {
+ // If the current page is the cover
+ if (targetPageIndex === -1) {
+ // Turn off the previous page button
if (prevPageButtonElement) {
- prevPageButtonElement.style.display = (leftPageIndex === -1) ? "none" : "block";
+ prevPageButtonElement.style.display = "none";
}
if (nextPageButtonElement) {
- nextPageButtonElement.style.display = (rightPageIndex === pages.length - 1) ? "none" : "block";
+ nextPageButtonElement.style.display = "block";
+ }
+ } else {
+ // Hide page navigation buttons when at the beginning and end
+ if (curOrientation === "SINGLE-PAGE") {
+ if (prevPageButtonElement) {
+ prevPageButtonElement.style.display = (targetPageIndex === -1) ? "none" : "block";
+ }
+ if (nextPageButtonElement) {
+ nextPageButtonElement.style.display = (targetPageIndex === pages.length - 1) ? "none" : "block";
+ }
+ } else {
+ if (prevPageButtonElement) {
+ prevPageButtonElement.style.display = (leftPageIndex === -1) ? "none" : "block";
+ }
+ if (nextPageButtonElement) {
+ nextPageButtonElement.style.display = (rightPageIndex === pages.length - 1) ? "none" : "block";
+ }
}
}
}
@@ -861,6 +896,8 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
var i;
+
+
// Initially render all the pages so they are ready to be displayed
for (i = 0; i < pages.length; i += 1) {
cover.render();
@@ -1209,15 +1246,26 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
audioPlayer = sb.audioPlayer(GLOBAL, PBS, config.audio.path + config.audio.name);
}
+ // book defaults to left-to-right
+ if (typeof bookConfig.direction === "undefined" || !bookConfig.direction) {
+ bookConfig.direction = "ltr";
+ }
+
+ if (bookConfig.direction === "rtl") {
+ config.pages.reverse();
+
+ if (typeof bookConfig.startOnPage === "undefined" || isNaN(bookConfig.startOnPage) || bookConfig.startOnPage <= 0) {
+ bookConfig.startOnPage = 0;
+ } else {
+ bookConfig.startOnPage = config.pages.length - bookConfig.startOnPage;
+ }
+ }
+
// Create cover
cover = sb.page(GLOBAL, PBS, config.cover, 0, {
bookConfig: bookConfig,
audioPlayer: audioPlayer
});
-
- // Add cover listeners
- cover.addEventListener("DRAG_LEFT", pageDraggedLeft);
- cover.addEventListener("DRAG_RIGHT", pageDraggedRight);
// Create the storybook pages
for (i = 0; i < config.pages.length; i += 1) {
@@ -1237,6 +1285,10 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
});
}
+ // Add cover listeners
+ cover.addEventListener("DRAG_LEFT", pageDraggedLeft);
+ cover.addEventListener("DRAG_RIGHT", pageDraggedRight);
+
// Add page listeners
for (i = 0; i < pages.length; i += 1) {
pages[i].addEventListener("DRAG_LEFT", pageDraggedLeft);
@@ -1315,6 +1367,11 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
// If the target page is valid
if (targetPageIndex < pages.length) {
navigateToPageIndex(targetPageIndex);
+ } else {
+ if (bookConfig.direction === "rtl") {
+ targetPageIndex = -1;
+ navigateToPageIndex(targetPageIndex);
+ }
}
};
@@ -1335,6 +1392,19 @@ PBS.KIDS.storybook.book = function (GLOBAL, PBS, storybookContainerElement, conf
targetPageIndex = curPageIndex - 1;
}
}
+
+ if (bookConfig.direction === "rtl") {
+ if (targetPageIndex <= -2) {
+ // from cover (-1) to first RTL page (last in pages array)
+ targetPageIndex = pages.length - 1;
+ } else {
+ if (targetPageIndex === -1) {
+ // reject turning page before last RTL page
+ targetPageIndex = curPageIndex;
+ return;
+ }
+ }
+ }
// If target page is valid
if (targetPageIndex >= -1) {
diff --git a/example_rtl/config/config-book.js b/example_rtl/config/config-book.js
new file mode 100644
index 0000000..c9bfeb9
--- /dev/null
+++ b/example_rtl/config/config-book.js
@@ -0,0 +1,74 @@
+// ------------------------------------------------------------------
+// book.js
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config = {
+ background: {
+ color: "#ababab",
+ url: "images/circles-background.png"
+ },
+ audio: {
+ enabled: false
+ },
+ book: {
+ direction: "rtl",
+ font: "Georgia",
+ startOnPage: 0,
+ pageWidth: 768,
+ pageHeight: 1024,
+ previousPageButton: {
+ url: "images/prev-page-button.png",
+ x: 1,
+ y: 50,
+ width: "50px",
+ height: "50px"
+ },
+ nextPageButton: {
+ url: "images/next-page-button.png",
+ horizontalAlign: "RIGHT",
+ x: 1,
+ y: 50,
+ width: "50px",
+ height: "50px"
+ },
+ pageBackground: {
+ color: "#fefefe"
+ },
+ oddPageBackground: {
+ color: "#fdfdfd"
+ },
+ evenPageBackground: {
+ color: "#f9f9f9"
+ },
+ pageTurnDuration: 500,
+ pageSlideDuration: 200
+ },
+ cover: {
+ background: {
+ url: "images/cover.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 25,
+ align: "center",
+ color: "#222222",
+ size: 48,
+ font: "Droid Serif",
+ text: "Example Storybook"
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 80,
+ numFrames: 10,
+ frameDelay: 10,
+ loop: true,
+ url: "images/ball-roll.png"
+ }
+ ]
+ },
+ pages: []
+};
\ No newline at end of file
diff --git a/example_rtl/config/config-page-01.js b/example_rtl/config/config-page-01.js
new file mode 100644
index 0000000..b7de7ff
--- /dev/null
+++ b/example_rtl/config/config-page-01.js
@@ -0,0 +1,30 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ content: [
+ {
+ type: "TextArea",
+ x: 10,
+ y: 30,
+ width: 80,
+ align: "left",
+ color: "#222222",
+ size: 28,
+ font: "Droid Serif",
+ text: "This storybook will give examples of the functionality of the Storybook Engine. See the configuration files in the config folder to see how the examples were implemented."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 1"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-02.js b/example_rtl/config/config-page-02.js
new file mode 100644
index 0000000..acde35f
--- /dev/null
+++ b/example_rtl/config/config-page-02.js
@@ -0,0 +1,86 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ content: [
+ {
+ type: "TextArea",
+ x: 10,
+ y: 15,
+ width: 80,
+ align: "center",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "This is an example Text Area."
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 25,
+ width: 80,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "The x and y positions of Text Areas can be specified."
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 35,
+ width: 80,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Text Areas can be aligned left..."
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 40,
+ width: 80,
+ align: "center",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "center"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 40,
+ width: 80,
+ align: "right",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "...and right."
+ },
+ {
+ type: "TextArea",
+ x: 45,
+ y: 55,
+ width: 10,
+ align: "center",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "The width of a Text Area can also be set."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ width: 100,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 2"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-03.js b/example_rtl/config/config-page-03.js
new file mode 100644
index 0000000..0b76fdb
--- /dev/null
+++ b/example_rtl/config/config-page-03.js
@@ -0,0 +1,64 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ content: [
+ {
+ type: "TextArea",
+ x: 10,
+ y: 20,
+ width: 80,
+ align: "center",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Text properties in a Text Area include:"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 35,
+ width: 80,
+ align: "center",
+ color: "#aa2222",
+ size: 24,
+ font: "Droid Serif",
+ text: "text color,"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 45,
+ width: 80,
+ align: "center",
+ color: "#222222",
+ size: 60,
+ font: "Droid Serif",
+ text: "text size,"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 60,
+ width: 80,
+ align: "center",
+ color: "#222222",
+ size: 32,
+ font: "Reenie Beanie",
+ text: "and font family."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ width: 100,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 3"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-04-and-05.js b/example_rtl/config/config-page-04-and-05.js
new file mode 100644
index 0000000..5dce780
--- /dev/null
+++ b/example_rtl/config/config-page-04-and-05.js
@@ -0,0 +1,74 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ content: [
+ {
+ type: "TextArea",
+ x: 14,
+ y: 40,
+ width: 72,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ paragraphSpacing: "40px",
+ font: "Droid Serif",
+ text: [
+ "Text in a Text Area supports HTML elements including: bold, italics and emphasis.",
+ "Additional supported tags are: color, size and font."
+ ]
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 4"
+ }
+ ]
+});
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/character-page-2.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 10,
+ y: 25,
+ width: 80,
+ align: "left",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "A background image can be assigned for a page. If an background image is not found in the page configuration the engine will implement the default background image in the book configuration."
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 75,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "If a background image is not specified the page container will display the background color in the page or book config."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 5"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-06.js b/example_rtl/config/config-page-06.js
new file mode 100644
index 0000000..b24a009
--- /dev/null
+++ b/example_rtl/config/config-page-06.js
@@ -0,0 +1,33 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/character-page-4.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 70,
+ width: 55,
+ align: "right",
+ color: "#b8f02f",
+ size: 24,
+ font: "Droid Serif",
+ text: "Color is supported."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 6"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-07.js b/example_rtl/config/config-page-07.js
new file mode 100644
index 0000000..7af3769
--- /dev/null
+++ b/example_rtl/config/config-page-07.js
@@ -0,0 +1,50 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/green-hill.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 15,
+ y: 50,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 32,
+ font: "Droid Serif",
+ text: "Sprites are drawn on top of the page background."
+ },
+ {
+ type: "TextArea",
+ x: 15,
+ y: 65,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Use Sprites instead of including on the page background for improved performance when using the same sprite or page background on multiple pages."
+ },
+ {
+ type: "Sprite",
+ x: 40,
+ y: 13,
+ url: "images/char-jump.png"
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 7"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-08.js b/example_rtl/config/config-page-08.js
new file mode 100644
index 0000000..5246023
--- /dev/null
+++ b/example_rtl/config/config-page-08.js
@@ -0,0 +1,42 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/bounce-page.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 15,
+ y: 40,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 32,
+ font: "Droid Serif",
+ text: "Sprites can be animated."
+ },
+ {
+ type: "Sprite",
+ x: 48,
+ y: 66,
+ numFrames: 14,
+ frameDelay: 4,
+ loop: true,
+ url: "images/ball-bounce.png"
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 8"
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-09.js b/example_rtl/config/config-page-09.js
new file mode 100644
index 0000000..d702c5f
--- /dev/null
+++ b/example_rtl/config/config-page-09.js
@@ -0,0 +1,94 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ content: [
+ {
+ type: "TextArea",
+ x: 15,
+ y: 20,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Setting the numFrames property of a sprite will turn it into a frame-based animation."
+ },
+ {
+ type: "Sprite",
+ x: 20,
+ y: 33,
+ url: "images/ball-bounce.png"
+ },
+ {
+ type: "TextArea",
+ x: 15,
+ y: 49,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 14,
+ font: "Droid Serif",
+ text: "The ball bouncing animation is one image split into 14 frames."
+ },
+ {
+ type: "TextArea",
+ x: 15,
+ y: 62,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "The frame delay is adjustable."
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 70,
+ numFrames: 14,
+ frameDelay: 1,
+ loop: true,
+ url: "images/ball-bounce.png"
+ },
+ {
+ type: "Sprite",
+ x: 40,
+ y: 70,
+ numFrames: 14,
+ frameDelay: 2,
+ loop: true,
+ url: "images/ball-bounce.png"
+ },
+ {
+ type: "Sprite",
+ x: 55,
+ y: 70,
+ numFrames: 14,
+ frameDelay: 4,
+ loop: true,
+ url: "images/ball-bounce.png"
+ },
+ {
+ type: "Sprite",
+ x: 70,
+ y: 70,
+ numFrames: 14,
+ frameDelay: 16,
+ loop: true,
+ url: "images/ball-bounce.png"
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 9"
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-10.js b/example_rtl/config/config-page-10.js
new file mode 100644
index 0000000..3422a0f
--- /dev/null
+++ b/example_rtl/config/config-page-10.js
@@ -0,0 +1,48 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ numFrames: 5,
+ frameDelay: 10,
+ loop: false,
+ url: "images/sunrise.jpg",
+ playOnPress: true
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 15,
+ y: 60,
+ width: 70,
+ align: "center",
+ color: "#222222",
+ size: 32,
+ font: "Droid Serif",
+ text: "Page backgrounds are sprites so they can be animated too."
+ },
+ {
+ type: "TextArea",
+ x: 5,
+ y: 80,
+ width: 90,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Since backgrounds are large animating them should be used sparingly."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 10"
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-11.js b/example_rtl/config/config-page-11.js
new file mode 100644
index 0000000..1ed6021
--- /dev/null
+++ b/example_rtl/config/config-page-11.js
@@ -0,0 +1,99 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/trees-left.jpg",
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 11"
+ },
+ {
+ type: "TextArea",
+ x: 30,
+ y: 46,
+ width: 60,
+ align: "right",
+ color: "#7b5900",
+ size: 18,
+ font: "Droid Serif",
+ text: "Sprites with toggleOnPress property will toggle the animation on touch or click."
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 63,
+ width: 70,
+ align: "right",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Sprites with playOnPress property will restart the animation on touch or click."
+ },
+ {
+ type: "Sprite",
+ x: 18,
+ y: 85,
+ numFrames: 12,
+ frameDelay: 5,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: true,
+ url: "images/water-creature-hide-animation.png"
+ },
+ {
+ type: "Sprite",
+ x: 60,
+ y: 81,
+ numFrames: 12,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: true,
+ url: "images/water-creature-hide-animation.png"
+ },
+ {
+ type: "Sprite",
+ x: 54,
+ y: 30,
+ numFrames: 20,
+ frameDelay: 5,
+ toggleOnPress: true,
+ autoStart: true,
+ loop: true,
+ url: "images/bee-circle.png"
+ },
+ {
+ type: "Sprite",
+ x: 64,
+ y: 34,
+ numFrames: 20,
+ frameDelay: 4,
+ toggleOnPress: true,
+ autoStart: true,
+ loop: true,
+ url: "images/bee-circle.png"
+ },
+ {
+ type: "Sprite",
+ x: 31,
+ y: 36,
+ numFrames: 20,
+ frameDelay: 6,
+ toggleOnPress: true,
+ autoStart: true,
+ loop: true,
+ url: "images/bee-circle.png"
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-12.js b/example_rtl/config/config-page-12.js
new file mode 100644
index 0000000..e383177
--- /dev/null
+++ b/example_rtl/config/config-page-12.js
@@ -0,0 +1,100 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/trees-right.jpg",
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 12"
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 50,
+ width: 65,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "The autoReset property displays the first frame of the animation after the animation is complete."
+ },
+ {
+ type: "Sprite",
+ x: 55,
+ y: 33,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 57,
+ numFrames: 2,
+ frameDelay: 15,
+ loop: false,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: true,
+ url: "images/character-jump-animation.png"
+ },
+ {
+ type: "Sprite",
+ x: 75,
+ y: 90,
+ numFrames: 12,
+ frameDelay: 5,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: true,
+ url: "images/water-creature-hide-animation.png"
+ },
+ {
+ type: "Sprite",
+ x: 81,
+ y: 18,
+ numFrames: 20,
+ frameDelay: 4,
+ toggleOnPress: true,
+ autoStart: true,
+ loop: true,
+ url: "images/bee-circle.png"
+ },
+ {
+ type: "Sprite",
+ x: 96,
+ y: 28,
+ numFrames: 20,
+ frameDelay: 8,
+ toggleOnPress: true,
+ autoStart: true,
+ loop: true,
+ url: "images/bee-circle.png"
+ },
+ {
+ type: "Sprite",
+ x: -10,
+ y: 92,
+ numFrames: 12,
+ frameDelay: 5,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: true,
+ url: "images/water-creature-hide-animation.png"
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-13-and-14.js b/example_rtl/config/config-page-13-and-14.js
new file mode 100644
index 0000000..251f8d3
--- /dev/null
+++ b/example_rtl/config/config-page-13-and-14.js
@@ -0,0 +1,178 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/orchard-left.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 20,
+ y: 77,
+ width: 65,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Non-looping sprites without the autoReset property will stay on the last frame after the animation is complete."
+ },
+ {
+ type: "Sprite",
+ x: -6,
+ y: 30,
+ numFrames: 20,
+ frameDelay: 6,
+ toggleOnPress: true,
+ autoStart: true,
+ loop: true,
+ url: "images/bee-circle.png"
+ },
+ {
+ type: "Sprite",
+ x: 37,
+ y: 55,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 65,
+ y: 38,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: true,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 86,
+ y: 27,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 76,
+ y: 59,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 13"
+ },
+ {
+ type: "Sprite",
+ x: 5,
+ y: 92,
+ numFrames: 12,
+ frameDelay: 5,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/water-creature-hide-animation.png"
+ },
+ {
+ type: "Sprite",
+ x: 27,
+ y: 64,
+ url: "images/apple-cart.png"
+ }
+ ]
+});
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/orchard-right.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 14"
+ },
+ {
+ type: "Sprite",
+ x: 5,
+ y: 28,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 55,
+ y: 34,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 15,
+ y: 61,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 62,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ },
+ {
+ type: "Sprite",
+ x: 35,
+ y: 60,
+ numFrames: 8,
+ frameDelay: 4,
+ playOnPress: true,
+ autoStart: false,
+ autoReset: false,
+ url: "images/apple-drop.png"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-15-and-16.js b/example_rtl/config/config-page-15-and-16.js
new file mode 100644
index 0000000..ecc9687
--- /dev/null
+++ b/example_rtl/config/config-page-15-and-16.js
@@ -0,0 +1,68 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/desert-left.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 15"
+ },
+ {
+ type: "TextArea",
+ x: "200px",
+ y: "360px",
+ width: "350px",
+ align: "left",
+ color: "#222222",
+ size: 20,
+ font: "Droid Serif",
+ text: 'Object locations and dimensions can be specified as a percentage of page (e.g. "200%" or "200") or as pixel values (e.g. "200px").'
+ },
+ {
+ type: "Sprite",
+ x: "200px",
+ y: "500px",
+ url: "images/apple-cart.png"
+ }
+ ]
+});
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ color: "#f1fd6b"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 16"
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 50,
+ width: 65,
+ align: "center",
+ color: "#222222",
+ size: 28,
+ font: "Droid Serif",
+ text: "A page background color can be specified instead of an image."
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-17-and-18.js b/example_rtl/config/config-page-17-and-18.js
new file mode 100644
index 0000000..e669f57
--- /dev/null
+++ b/example_rtl/config/config-page-17-and-18.js
@@ -0,0 +1,134 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/tundra-left.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 17"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 20,
+ width: 80,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Sprites support an easing property which slow the frame delay at the beginning or end of the animation."
+ },
+ {
+ type: "TextArea",
+ x: 25,
+ y: 45,
+ width: 70,
+ align: "left",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: 'Sprite with easing property set to "EaseIn".'
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 50,
+ numFrames: 10,
+ easing: "easeIn",
+ frameDelay: 10,
+ loop: true,
+ url: "images/ball-roll.png"
+ },
+ {
+ type: "TextArea",
+ x: 25,
+ y: 60,
+ width: 70,
+ align: "left",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Sprite without easing property."
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 65,
+ numFrames: 10,
+ frameDelay: 10,
+ loop: true,
+ url: "images/ball-roll.png"
+ },
+ {
+ type: "TextArea",
+ x: 25,
+ y: 75,
+ width: 70,
+ align: "left",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: 'Sprite with easing property set to "EaseOut".'
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 80,
+ numFrames: 10,
+ easing: "easeOut",
+ frameDelay: 10,
+ loop: true,
+ url: "images/ball-roll.png"
+ }
+ ]
+});
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ url: "images/tundra-right.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#222222",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 18"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 55,
+ width: 80,
+ align: "left",
+ color: "#222222",
+ size: 24,
+ font: "Droid Serif",
+ text: "Sprites support an playAfterDelay property which will play the animation after a specified amount from when the page is shown."
+ },
+ {
+ type: "Sprite",
+ x: 25,
+ y: 70,
+ numFrames: 10,
+ frameDelay: 10,
+ playAfterDelay: 2,
+ autoStart: false,
+ url: "images/ball-roll.png"
+ }
+ ]
+});
diff --git a/example_rtl/config/config-page-17.js b/example_rtl/config/config-page-17.js
new file mode 100644
index 0000000..8416602
--- /dev/null
+++ b/example_rtl/config/config-page-17.js
@@ -0,0 +1,56 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ color: "#313d6b",
+ url: "images/cloud-page.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 10,
+ y: 22,
+ width: 70,
+ align: "left",
+ color: "#313d6b",
+ size: 24,
+ font: "Droid Serif",
+ text: "A page background image can be partially transparent with a background color showing through."
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 50,
+ width: 65,
+ align: "right",
+ color: "#dddddd",
+ size: 40,
+ font: "Droid Serif",
+ text: "This is a last page specified in the config."
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 70,
+ width: 80,
+ align: "center",
+ color: "#dddddd",
+ size: 18,
+ font: "Droid Serif",
+ text: "A blank page will be inserted on the right for the missing even page."
+ },
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#dddddd",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 17"
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-19-and-20.js b/example_rtl/config/config-page-19-and-20.js
new file mode 100644
index 0000000..0aa175b
--- /dev/null
+++ b/example_rtl/config/config-page-19-and-20.js
@@ -0,0 +1,98 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ color: "#fdfdfd",
+ url: "images/frozen-left.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 19"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 35,
+ width: 70,
+ align: "left",
+ color: "#333333",
+ size: 24,
+ font: "Droid Serif",
+ text: "A page background image can be partially transparent with a background color showing through."
+ }
+ ]
+},
+{
+ background: {
+ color: "#fdfdfd",
+ url: "images/frozen-right.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 20"
+ },
+ {
+ type: "TextArea",
+ x: 10,
+ y: 21,
+ width: 50,
+ align: "left",
+ color: "#333333",
+ size: 24,
+ font: "Droid Serif",
+ text: "Cyclers rotate through sprites on touch or click.",
+ sound: {
+ startTime: 0.4,
+ endTime: 0.45,
+ loop: false
+ },
+ },
+ {
+ type: "Cycler",
+ autoStart: false,
+ sound: {
+ startTime: 1,
+ endTime: 1.1,
+ loop: false
+ },
+ content: [
+ {
+ type: "Sprite",
+ id: "tower2",
+ x: "178px",
+ y: "316px",
+ numFrames: 12,
+ frameDelay: 6,
+ autoStart: false,
+ url: "images/tower-top-2.png"
+ },
+ {
+ type: "Sprite",
+ id: "tower3",
+ x: "178px",
+ y: "316px",
+ numFrames: 14,
+ frameDelay: 2,
+ url: "images/tower-top-3.png"
+ }
+ ]
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-21-23.js b/example_rtl/config/config-page-21-23.js
new file mode 100644
index 0000000..54fb525
--- /dev/null
+++ b/example_rtl/config/config-page-21-23.js
@@ -0,0 +1,106 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ color: "#fdfdfd"
+ },
+ sound: {
+ startTime: 0,
+ endTime: 27,
+ loop: false
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 21"
+ }, {
+ type: "TextArea",
+ x: 5,
+ y: 20,
+ width: 80,
+ align: "center",
+ color: "#333333",
+ size: 24,
+ font: "Droid Serif",
+ text: "A sound can be played when a page is shown."
+ }
+ ]
+}, {
+ background: {
+ color: "#fdfdfd"
+ },
+ sound: {
+ startTime: 31,
+ endTime: 74,
+ loop: false
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 22"
+ }, {
+ type: "TextArea",
+ x: 5,
+ y: 60,
+ width: 80,
+ align: "left",
+ color: "#333333",
+ size: 24,
+ font: "Droid Serif",
+ text: "Different sounds are supported on left and right pages. The right sound page will play after the left sound page is complete (when in two-page layout)."
+ }
+ ]
+}, {
+ background: {
+ color: "#fdfdfd"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 23"
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 42,
+ width: 65,
+ align: "right",
+ color: "#333333",
+ size: 40,
+ font: "Droid Serif",
+ text: "This is a last page specified in the config"
+ },
+ {
+ type: "TextArea",
+ x: 5,
+ y: 55,
+ width: 80,
+ align: "right",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "A blank page will be inserted on the right for the missing even page."
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-21-25.js b/example_rtl/config/config-page-21-25.js
new file mode 100644
index 0000000..43b8d23
--- /dev/null
+++ b/example_rtl/config/config-page-21-25.js
@@ -0,0 +1,244 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ color: "#fdfdfd",
+ url: "images/entrance-left.png"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 21"
+ }, {
+ type: "TextArea",
+ x: 5,
+ y: 20,
+ width: 80,
+ align: "center",
+ color: "#333333",
+ size: 24,
+ font: "Droid Serif",
+ text: "A sound can be played when a page is shown."
+ },
+ {
+ type: "TextArea",
+ x: 15,
+ y: 55,
+ width: 60,
+ align: "right",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Sounds can also be played when touching a page element. Note: this type of sound will not play when another sound with property 'persist' set to true. Page sounds are set to persist by default."
+ },
+ {
+ type: "Sprite",
+ x: 59,
+ y: 68,
+ url: "images/music-note-sign.png",
+ sound: {
+ startTime: 174.6,
+ endTime: 174.7
+ },
+ },
+ ]
+}, {
+ background: {
+ color: "#fdfdfd",
+ url: "images/entrance-right.png"
+ },
+ sound: {
+ startTime: 31,
+ endTime: 74,
+ persist: true
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 22"
+ }, {
+ type: "TextArea",
+ sound: {
+ startTime: 5,
+ endTime: 6,
+ loop: false
+ },
+ x: 5,
+ y: 64,
+ width: 80,
+ align: "left",
+ color: "#333333",
+ size: 24,
+ font: "Droid Serif",
+ text: "Different sounds are supported on left and right pages. The right sound page will play after the left sound page is complete (when in two-page layout)."
+ },
+ {
+ type: "TextArea",
+ x: 5,
+ y: 78,
+ width: 60,
+ align: "left",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Setting the 'persist' property of a page sound will allow it to be interrupted by other sounds."
+ },
+ ]
+}, {
+ background: {
+ color: "#fdfdfd",
+ url: "images/carpet-left.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#eeeeee",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 23"
+ },
+ {
+ type: "TextArea",
+ x: 30,
+ y: 65,
+ width: 65,
+ align: "right",
+ color: "#cccccc",
+ size: 24,
+ font: "Droid Serif",
+ text: "A drawing pad can be added where the user can draw inside the drawing area."
+ },
+ {
+ type: "DrawingPad",
+ x: "455px",
+ y: "81px",
+ width: "254px",
+ height: "394px",
+ defaultColor: "#776699",
+ radius: 10,
+ overlayUrl: "images/banner-outline.png"
+ }
+ ]
+}, {
+ background: {
+ color: "#fdfdfd",
+ url: "images/carpet-right.jpg"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#eeeeee",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 24"
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 65,
+ width: 65,
+ align: "left",
+ color: "#cccccc",
+ size: 24,
+ font: "Droid Serif",
+ text: "A Drawing Pad has additional features such as eraser tool, color and clear drawing buttons."
+ },
+ {
+ type: "DrawingPad",
+ x: "177px",
+ y: "126px",
+ width: "413px",
+ height: "345px",
+ defaultColor: "#346679",
+ radius: 15,
+ textureUrl: "images/window-texture.png",
+ eraserButtons: [
+ {
+ x: "680px",
+ y: "210px",
+ url: "images/eraser-button.png"
+ }
+ ],
+ clearButtons: [
+ {
+ x: "680px",
+ y: "120px",
+ url: "images/clear-button.png"
+ }
+ ],
+ colorButtons: [
+ {
+ paintColor: "#ffdc00",
+ x: "680px",
+ y: "400px",
+ url: "images/paint-brush-yellow.png"
+ },
+ {
+ paintColor: "#ff0074",
+ x: "680px",
+ y: "300px",
+ url: "images/paint-brush-purple.png"
+ }
+ ]
+ }
+ ]
+}, {
+ background: {
+ color: "#fdfdfd"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 25"
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 42,
+ width: 65,
+ align: "right",
+ color: "#333333",
+ size: 40,
+ font: "Droid Serif",
+ text: "This is a last page specified in the config"
+ },
+ {
+ type: "TextArea",
+ x: 5,
+ y: 55,
+ width: 80,
+ align: "right",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "A blank page will be inserted on the right for the missing even page."
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/config/config-page-21.js b/example_rtl/config/config-page-21.js
new file mode 100644
index 0000000..f127503
--- /dev/null
+++ b/example_rtl/config/config-page-21.js
@@ -0,0 +1,44 @@
+// ------------------------------------------------------------------
+//
+//
+// Copyright 2012 PBS KIDS Interactive. All Rights Reserved.
+
+PBS.KIDS.storybook.config.pages.push({
+ background: {
+ color: "#fdfdfd"
+ },
+ content: [
+ {
+ type: "TextArea",
+ x: 0,
+ y: 95,
+ align: "center",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "Page 21"
+ },
+ {
+ type: "TextArea",
+ x: 20,
+ y: 42,
+ width: 65,
+ align: "right",
+ color: "#333333",
+ size: 40,
+ font: "Droid Serif",
+ text: "This is a last page specified in the config"
+ },
+ {
+ type: "TextArea",
+ x: 5,
+ y: 55,
+ width: 80,
+ align: "right",
+ color: "#333333",
+ size: 18,
+ font: "Droid Serif",
+ text: "A blank page will be inserted on the right for the missing even page."
+ }
+ ]
+});
\ No newline at end of file
diff --git a/example_rtl/css/custom.css b/example_rtl/css/custom.css
new file mode 100644
index 0000000..d6a1bae
--- /dev/null
+++ b/example_rtl/css/custom.css
@@ -0,0 +1 @@
+/** Storybook Custom CSS **/
\ No newline at end of file
diff --git a/example_rtl/images/apple-cart.png b/example_rtl/images/apple-cart.png
new file mode 100644
index 0000000..2bf64ed
Binary files /dev/null and b/example_rtl/images/apple-cart.png differ
diff --git a/example_rtl/images/apple-drop.png b/example_rtl/images/apple-drop.png
new file mode 100644
index 0000000..d5c7f23
Binary files /dev/null and b/example_rtl/images/apple-drop.png differ
diff --git a/example_rtl/images/ball-bounce.png b/example_rtl/images/ball-bounce.png
new file mode 100644
index 0000000..8fd7f59
Binary files /dev/null and b/example_rtl/images/ball-bounce.png differ
diff --git a/example_rtl/images/ball-roll.png b/example_rtl/images/ball-roll.png
new file mode 100644
index 0000000..1318dff
Binary files /dev/null and b/example_rtl/images/ball-roll.png differ
diff --git a/example_rtl/images/banner-outline.png b/example_rtl/images/banner-outline.png
new file mode 100644
index 0000000..794b0aa
Binary files /dev/null and b/example_rtl/images/banner-outline.png differ
diff --git a/example_rtl/images/bee-circle.png b/example_rtl/images/bee-circle.png
new file mode 100644
index 0000000..efc40b3
Binary files /dev/null and b/example_rtl/images/bee-circle.png differ
diff --git a/example_rtl/images/bee-float.png b/example_rtl/images/bee-float.png
new file mode 100644
index 0000000..8db2886
Binary files /dev/null and b/example_rtl/images/bee-float.png differ
diff --git a/example_rtl/images/bounce-page.jpg b/example_rtl/images/bounce-page.jpg
new file mode 100644
index 0000000..0b3d848
Binary files /dev/null and b/example_rtl/images/bounce-page.jpg differ
diff --git a/example_rtl/images/carpet-left.jpg b/example_rtl/images/carpet-left.jpg
new file mode 100644
index 0000000..a37fd3a
Binary files /dev/null and b/example_rtl/images/carpet-left.jpg differ
diff --git a/example_rtl/images/carpet-right.jpg b/example_rtl/images/carpet-right.jpg
new file mode 100644
index 0000000..7c788dd
Binary files /dev/null and b/example_rtl/images/carpet-right.jpg differ
diff --git a/example_rtl/images/char-jump.png b/example_rtl/images/char-jump.png
new file mode 100644
index 0000000..ddfa893
Binary files /dev/null and b/example_rtl/images/char-jump.png differ
diff --git a/example_rtl/images/character-jump-animation.png b/example_rtl/images/character-jump-animation.png
new file mode 100644
index 0000000..dd715fa
Binary files /dev/null and b/example_rtl/images/character-jump-animation.png differ
diff --git a/example_rtl/images/character-page-1.jpg b/example_rtl/images/character-page-1.jpg
new file mode 100644
index 0000000..4e4de79
Binary files /dev/null and b/example_rtl/images/character-page-1.jpg differ
diff --git a/example_rtl/images/character-page-2.jpg b/example_rtl/images/character-page-2.jpg
new file mode 100644
index 0000000..dea6d4e
Binary files /dev/null and b/example_rtl/images/character-page-2.jpg differ
diff --git a/example_rtl/images/character-page-3.jpg b/example_rtl/images/character-page-3.jpg
new file mode 100644
index 0000000..d33e131
Binary files /dev/null and b/example_rtl/images/character-page-3.jpg differ
diff --git a/example_rtl/images/character-page-4.jpg b/example_rtl/images/character-page-4.jpg
new file mode 100644
index 0000000..51c8066
Binary files /dev/null and b/example_rtl/images/character-page-4.jpg differ
diff --git a/example_rtl/images/circles-background.png b/example_rtl/images/circles-background.png
new file mode 100644
index 0000000..08faa41
Binary files /dev/null and b/example_rtl/images/circles-background.png differ
diff --git a/example_rtl/images/clear-button.png b/example_rtl/images/clear-button.png
new file mode 100644
index 0000000..7be80db
Binary files /dev/null and b/example_rtl/images/clear-button.png differ
diff --git a/example_rtl/images/cloud-page.png b/example_rtl/images/cloud-page.png
new file mode 100644
index 0000000..a866205
Binary files /dev/null and b/example_rtl/images/cloud-page.png differ
diff --git a/example_rtl/images/cover.jpg b/example_rtl/images/cover.jpg
new file mode 100644
index 0000000..f10761a
Binary files /dev/null and b/example_rtl/images/cover.jpg differ
diff --git a/example_rtl/images/default-page.jpg b/example_rtl/images/default-page.jpg
new file mode 100644
index 0000000..4b1624b
Binary files /dev/null and b/example_rtl/images/default-page.jpg differ
diff --git a/example_rtl/images/desert-left.png b/example_rtl/images/desert-left.png
new file mode 100644
index 0000000..6c822fd
Binary files /dev/null and b/example_rtl/images/desert-left.png differ
diff --git a/example_rtl/images/double-page-left.jpg b/example_rtl/images/double-page-left.jpg
new file mode 100644
index 0000000..51e42c3
Binary files /dev/null and b/example_rtl/images/double-page-left.jpg differ
diff --git a/example_rtl/images/double-page-right.jpg b/example_rtl/images/double-page-right.jpg
new file mode 100644
index 0000000..9907238
Binary files /dev/null and b/example_rtl/images/double-page-right.jpg differ
diff --git a/example_rtl/images/entrance-left.png b/example_rtl/images/entrance-left.png
new file mode 100644
index 0000000..a55e791
Binary files /dev/null and b/example_rtl/images/entrance-left.png differ
diff --git a/example_rtl/images/entrance-right.png b/example_rtl/images/entrance-right.png
new file mode 100644
index 0000000..a7e630a
Binary files /dev/null and b/example_rtl/images/entrance-right.png differ
diff --git a/example_rtl/images/eraser-button.png b/example_rtl/images/eraser-button.png
new file mode 100644
index 0000000..d16c2b2
Binary files /dev/null and b/example_rtl/images/eraser-button.png differ
diff --git a/example_rtl/images/frozen-left.png b/example_rtl/images/frozen-left.png
new file mode 100644
index 0000000..c702dcc
Binary files /dev/null and b/example_rtl/images/frozen-left.png differ
diff --git a/example_rtl/images/frozen-right.png b/example_rtl/images/frozen-right.png
new file mode 100644
index 0000000..2f38ef4
Binary files /dev/null and b/example_rtl/images/frozen-right.png differ
diff --git a/example_rtl/images/green-hill.jpg b/example_rtl/images/green-hill.jpg
new file mode 100644
index 0000000..a0c5309
Binary files /dev/null and b/example_rtl/images/green-hill.jpg differ
diff --git a/example_rtl/images/music-note-sign.png b/example_rtl/images/music-note-sign.png
new file mode 100644
index 0000000..8be9d5b
Binary files /dev/null and b/example_rtl/images/music-note-sign.png differ
diff --git a/example_rtl/images/next-page-button.png b/example_rtl/images/next-page-button.png
new file mode 100644
index 0000000..0ebeb30
Binary files /dev/null and b/example_rtl/images/next-page-button.png differ
diff --git a/example_rtl/images/orchard-left.png b/example_rtl/images/orchard-left.png
new file mode 100644
index 0000000..744e9d7
Binary files /dev/null and b/example_rtl/images/orchard-left.png differ
diff --git a/example_rtl/images/orchard-right.png b/example_rtl/images/orchard-right.png
new file mode 100644
index 0000000..3f10500
Binary files /dev/null and b/example_rtl/images/orchard-right.png differ
diff --git a/example_rtl/images/paint-brush-purple.png b/example_rtl/images/paint-brush-purple.png
new file mode 100644
index 0000000..4377d5c
Binary files /dev/null and b/example_rtl/images/paint-brush-purple.png differ
diff --git a/example_rtl/images/paint-brush-yellow.png b/example_rtl/images/paint-brush-yellow.png
new file mode 100644
index 0000000..683868d
Binary files /dev/null and b/example_rtl/images/paint-brush-yellow.png differ
diff --git a/example_rtl/images/prev-page-button.png b/example_rtl/images/prev-page-button.png
new file mode 100644
index 0000000..286e2ce
Binary files /dev/null and b/example_rtl/images/prev-page-button.png differ
diff --git a/example_rtl/images/sunrise.jpg b/example_rtl/images/sunrise.jpg
new file mode 100644
index 0000000..55d4537
Binary files /dev/null and b/example_rtl/images/sunrise.jpg differ
diff --git a/example_rtl/images/tower-top-1.png b/example_rtl/images/tower-top-1.png
new file mode 100644
index 0000000..28d739a
Binary files /dev/null and b/example_rtl/images/tower-top-1.png differ
diff --git a/example_rtl/images/tower-top-2.png b/example_rtl/images/tower-top-2.png
new file mode 100644
index 0000000..1d412fd
Binary files /dev/null and b/example_rtl/images/tower-top-2.png differ
diff --git a/example_rtl/images/tower-top-3.png b/example_rtl/images/tower-top-3.png
new file mode 100644
index 0000000..b88dd9a
Binary files /dev/null and b/example_rtl/images/tower-top-3.png differ
diff --git a/example_rtl/images/trees-left.jpg b/example_rtl/images/trees-left.jpg
new file mode 100644
index 0000000..8555137
Binary files /dev/null and b/example_rtl/images/trees-left.jpg differ
diff --git a/example_rtl/images/trees-right.jpg b/example_rtl/images/trees-right.jpg
new file mode 100644
index 0000000..48d23ad
Binary files /dev/null and b/example_rtl/images/trees-right.jpg differ
diff --git a/example_rtl/images/tundra-left.png b/example_rtl/images/tundra-left.png
new file mode 100644
index 0000000..12d99de
Binary files /dev/null and b/example_rtl/images/tundra-left.png differ
diff --git a/example_rtl/images/tundra-right.png b/example_rtl/images/tundra-right.png
new file mode 100644
index 0000000..2f26d6b
Binary files /dev/null and b/example_rtl/images/tundra-right.png differ
diff --git a/example_rtl/images/water-creature-hide-animation.png b/example_rtl/images/water-creature-hide-animation.png
new file mode 100644
index 0000000..8742661
Binary files /dev/null and b/example_rtl/images/water-creature-hide-animation.png differ
diff --git a/example_rtl/images/window-texture.png b/example_rtl/images/window-texture.png
new file mode 100644
index 0000000..c780a3a
Binary files /dev/null and b/example_rtl/images/window-texture.png differ
diff --git a/example_rtl/index.html b/example_rtl/index.html
new file mode 100644
index 0000000..65a4695
--- /dev/null
+++ b/example_rtl/index.html
@@ -0,0 +1,91 @@
+
+
+
+ Storybook Example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file