Permalink
Browse files

cleanup api, add docs page, fix demos

  • Loading branch information...
1 parent cb8eac5 commit 8bbbd2f75925533e938ec6ca903bc8caf7220d8a @zrispo committed Jan 10, 2017
Oops, something went wrong.
View
Oops, something went wrong.
View
Oops, something went wrong.
View
Oops, something went wrong.
Oops, something went wrong.
View
@@ -234,24 +234,13 @@
<div style="height:12px;"></div>
<a class="link" onclick="load('sitepages/demos.html')">Demos</a>
<a class="link" onclick="load('sitepages/tutorials.html')">Tutorials</a>
+ <a class="link" onclick="load('sitepages/reference.html')">Reference</a>
<a class="link" onclick="load('sitepages/about.html')">About</a>
<div style="height:12px;"></div>
<a class="link" href="https://www.twitter.com/zrispo">Dev Blog</a>
<a class="link" href="https://github.com/zrispo/wick">Source Code</a>
<!--<a class="link" onclick="load('sitepages/about.html')">About</a>-->
<hr />
- <center>
- <!--
- <img src="resources/testcontent/cozycoupe.gif" width="75" height="75"/>
- <img src="resources/testcontent/clippy.png" width="75" height="75"/>
- <br />
- <img src="resources/testcontent/funnyben.jpg" width="75" height="75"/>
- <img src="resources/testcontent/SUPERDUMB.png" width="75" height="75"/>
- <br />
- <img src="resources/testcontent/duck.bmp" width="75" height="75"/>
- <img src="resources/testcontent/SUPERDUMBgreenBG.png" width="75" height="75"/>
- -->
- </center>
<br />
<span class="bottomText">
by <a href="https://www.twitter.com/zrispo">zrispo</a>, <a href="https://twitter.com/lucapodular">lucapodular</a>, & <a href="https://twitter.com/jrispolo">jrispolo</a>
View
@@ -15,7 +15,7 @@
}
.rangeslider--horizontal {
- height: 20px;
+ height: 10px;
width: 100%;
}
@@ -94,7 +94,7 @@
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12));
}
.rangeslider--horizontal .rangeslider__handle {
- top: -10px;
+ top: -5px;
touch-action: pan-y;
-ms-touch-action: pan-y;
}
@@ -103,9 +103,3 @@
touch-action: pan-x;
-ms-touch-action: pan-x;
}
-
-input[type="range"]:focus + .rangeslider .rangeslider__handle {
- -moz-box-shadow: 0 0 8px rgba(255, 0, 255, 0.9);
- -webkit-box-shadow: 0 0 8px rgba(255, 0, 255, 0.9);
- box-shadow: 0 0 8px rgba(255, 0, 255, 0.9);
-}
@@ -4,8 +4,56 @@
<title>It's Wick!</title>
<link href='https://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
<link href='style.css' rel='stylesheet' type='text/css'>
+ <script src="../lib/jquery.min.js"></script>
<meta charset="utf-8">
</head>
<body>
<h1>Reference</h1>
-</body>
+</body>
+
+<style>
+ .groupName {
+
+ }
+ .propertyName {
+ font-family: monospace;
+ font-weight: normal;
+ }
+</style>
+
+<script>
+ var docs;
+
+ function buildPage () {
+ docs.docs.forEach(function (group) {
+ var groupName = document.createElement('h2');
+ groupName.className = 'groupName';
+ groupName.innerHTML = group.name;
+ document.body.appendChild(groupName);
+
+ group.properties.forEach(function (property) {
+ var propertyName = document.createElement('h3');
+ propertyName.className = 'propertyName';
+ propertyName.innerHTML = '&#8226; ' + property.name;
+ document.body.appendChild(propertyName);
+ })
+
+ document.body.appendChild(document.createElement('br'));
+ });
+ }
+
+ $.ajax({
+ url: "../src/project/Docs.json",
+ type: 'GET',
+ data: {},
+ success: function(data) {
+ docs = data;
+ buildPage();
+ },
+ error: function () {
+ console.log("ajax: error")
+ },
+ complete: function(response, textStatus) {
+ }
+ });
+</script>
@@ -9,27 +9,18 @@
<body>
<h1>Tutorials</h1>
- <h3>
- More tutorials coming soon!
- </h3>
-
<br />
- <h4> Getting Started </h4>
+ <h3>Getting Started - <em><a target="_parent" href="https://www.youtube.com/watch?v=xL-YIu7oo-E">Watch this tutorial on YouTube</a></em></h3>
<h3>
<iframe width="560" height="315" src="https://www.youtube.com/embed/xL-YIu7oo-E" frameborder="0" allowfullscreen></iframe>
</h3>
- <h3>
- <em><a target="_parent" href="https://www.youtube.com/watch?v=xL-YIu7oo-E">Watch this tutorial on YouTube</a></em>
- </h3>
-
- <h4> Sharing Your Work </h4>
+ <h3>Sharing Your Work - <em><a target="_parent" href="https://www.youtube.com/watch?v=xL-YIu7oo-E">Watch this tutorial on YouTube</a></em></h3>
<h3>
<iframe width="560" height="315" src="https://www.youtube.com/embed/IpF8fMXN6To" frameborder="0" allowfullscreen></iframe>
</h3>
- <h3>
- <em><a target="_parent" href="https://youtu.be/IpF8fMXN6To">Watch this tutorial on YouTube</a></em>
- </h3>
+ <br /><br />
+
</body>
@@ -134,10 +134,12 @@ var ScriptingIDEInterface = function (wickEditor) {
}
this.showError = function (object, scriptType, lineNumber, errorMessage) {
+ object = wickEditor.project.getObjectByUUID(object.uuid);
+
wickEditor.project.jumpToObject(object);
wickEditor.syncInterfaces();
setTimeout(function () {
- wickEditor.fabric.selectByIDs([id]);
+ wickEditor.fabric.selectObjects([object]);
that.editScriptsOfObject(object);
wickEditor.scriptingide.currentScript = scriptType;
@@ -324,7 +324,7 @@ var WickPlayer = (function () {
//...and change the cursor if we are
if(hoveredOverObj) {
- rendererContainerEl.style.cursor = hoveredOverObj.hoverCursor || "pointer";
+ rendererContainerEl.style.cursor = hoveredOverObj.cursor || "pointer";
} else {
rendererContainerEl.style.cursor = "default";
}
View
@@ -0,0 +1,195 @@
+{
+ "docs": [
+ {
+ "name": "Timeline",
+ "properties": [
+ {
+ "name" : "play()",
+ "description" : "something...",
+ "example" : "thisIsExampleCode()"
+ }, {
+ "name" : "stop()",
+ "description" : "",
+ "example" : ""
+ }, {
+ "name" : "gotoAndStop(frame)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "gotoAndPlay(frame)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "gotoNextFrame()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "gotoPrevFrame()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }
+ ]
+ }, {
+ "name": "Input",
+ "properties": [
+ {
+ "name" : "getMouseX()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "getMouseY()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "isKeyDown()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }
+ ]
+ }, {
+ "name": "Scope",
+ "properties": [
+ {
+ "name" : "this",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "root",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "parent",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }
+ ]
+ }, {
+ "name": "Wick Objects",
+ "properties": [
+ {
+ "name" : "play()",
+ "description" : "something...",
+ "example" : "thisIsExampleCode()"
+ }, {
+ "name" : "stop()",
+ "description" : "",
+ "example" : ""
+ }, {
+ "name" : "gotoAndStop(frame)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "gotoAndPlay(frame)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "gotoNextFrame()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "gotoPrevFrame()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "x",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "y",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "scaleX",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "scaleY",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "angle",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "flipX",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "flipY",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "opacity",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "clone()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "delete",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "hitTest(object)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "isHoveredOver()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "setCursor(cursor)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "setText(text)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "playSound()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "stopSound()",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }, {
+ "name" : "setVolume(volume)",
+ "description" : "",
+ "example" : "",
+ "args" : ""
+ }
+ ]
+ }]
+}
Oops, something went wrong.

0 comments on commit 8bbbd2f

Please sign in to comment.