From a0a489f1c69ca6eeea2a1f29a4563c83d35280f7 Mon Sep 17 00:00:00 2001 From: Geoff Doty Date: Thu, 8 Mar 2018 15:09:02 -0500 Subject: [PATCH] initial commit --- .gitignore | 2 + README.md | 15 ++ assets/css/styles.css | 55 ++++++ assets/js/app.js | 19 +++ assets/tags/application.tag.html | 67 ++++++++ assets/tags/hierarchy.tag.html | 141 +++++++++++++++ assets/tags/property/components/all.tag.html | 119 +++++++++++++ .../tags/property/components/camera.tag.html | 93 ++++++++++ .../property/components/components.tag.html | 28 +++ .../tags/property/components/element.tag.html | 160 ++++++++++++++++++ .../tags/property/components/light.tag.html | 99 +++++++++++ .../tags/property/components/model.tag.html | 69 ++++++++ assets/tags/property/properties.tag.html | 93 ++++++++++ assets/tags/property/readme.md | 20 +++ index.html | 55 ++++++ 15 files changed, 1035 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 assets/css/styles.css create mode 100644 assets/js/app.js create mode 100644 assets/tags/application.tag.html create mode 100644 assets/tags/hierarchy.tag.html create mode 100644 assets/tags/property/components/all.tag.html create mode 100644 assets/tags/property/components/camera.tag.html create mode 100644 assets/tags/property/components/components.tag.html create mode 100644 assets/tags/property/components/element.tag.html create mode 100644 assets/tags/property/components/light.tag.html create mode 100644 assets/tags/property/components/model.tag.html create mode 100644 assets/tags/property/properties.tag.html create mode 100644 assets/tags/property/readme.md create mode 100644 index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..545d497 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +*/js/vendor/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..943add4 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Canvas Editor + +An *alternative* [Playcanvas Engine](https://github.com/playcanvas/engine) Editor + +## Why + +- Better understanding the internals of [Playcanvas]() +- Built larger [RiotJS]() application +- Convert to standalone app using [Electron]() +- Store assets *locally* +- Free + +## Is it Ready + +NO! \ No newline at end of file diff --git a/assets/css/styles.css b/assets/css/styles.css new file mode 100644 index 0000000..18517e4 --- /dev/null +++ b/assets/css/styles.css @@ -0,0 +1,55 @@ +/* Tables - for Properties */ +caption {height: 2em; background-color: #404040; line-height: 2em; color: #EEE; text-align: left;padding-left: 1em;} +table {width: 100%;border: 1px solid #CCC; border-spacing: 0;} +tr {height: 1.5em; line-height: 1.5em;} +th { + font-weight: 100; + font-size: .8em; + text-align: left; + padding-left: 1em; + width: 100px; + background-color: #EEE; + border-bottom: 1px solid #CCC; + border-right: 1px solid #CCC; +} +td {background-color: #FFF; border-bottom: 1px solid #CCC;} + +/* Buttons */ +.button { + box-sizing: border-box; + min-height: 1.5em; + line-height: 1.5em; + width:100%; + border: 1px solid #AAA; + color: #222; + cursor: pointer; +} + +/* Fields */ +.field::placeholder { + color: #CCC; + text-align: right; + font-size: .8em; +} + +.field { + min-height: 100%; + width: 100%; + line-height: 1.5em; + flex: 1; + border: none; + padding: 0 .5em; + border-right: 1px solid #CCC; +} + +.field:last-child { + border: none; +} + +.field-group { + display: flex; + justify-content: space-around; +} + +/* Utilities */ +.is-small {font-size: .8em;} \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js new file mode 100644 index 0000000..cd293b3 --- /dev/null +++ b/assets/js/app.js @@ -0,0 +1,19 @@ +'use strict'; + +const app = { + version: 0, + debug: true, + // http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ + log: function() { + log.history = log.history || []; // store logs to an array for reference + log.history.push(arguments); + if(this.debug){ + console.log( Array.prototype.slice.call(arguments) ); + } + } +}; + +riot.mixin({ + log: app.log, + relay: riot.observable() +}); diff --git a/assets/tags/application.tag.html b/assets/tags/application.tag.html new file mode 100644 index 0000000..04069ce --- /dev/null +++ b/assets/tags/application.tag.html @@ -0,0 +1,67 @@ + +
+ +
+ + + + +
\ No newline at end of file diff --git a/assets/tags/hierarchy.tag.html b/assets/tags/hierarchy.tag.html new file mode 100644 index 0000000..7c51892 --- /dev/null +++ b/assets/tags/hierarchy.tag.html @@ -0,0 +1,141 @@ + +
+
+
+
+ {project.name} +
+ + + +
+
+ +
+
+
    +
  • Root
  • +
      +
    • + +
    • +
    +
+
+
+
+ + + +
\ No newline at end of file diff --git a/assets/tags/property/components/all.tag.html b/assets/tags/property/components/all.tag.html new file mode 100644 index 0000000..d7ccdea --- /dev/null +++ b/assets/tags/property/components/all.tag.html @@ -0,0 +1,119 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Camera
Clear Buffers +
+ + +
+
Clear Color +
+ + +
+
Projection + +
Frustum Culling + +
Field of View +
+ + +
+
Clip +
+ + +
+
Priority + +
Viewport +
+ + + + +
+
+
+ + + + +
\ No newline at end of file diff --git a/assets/tags/property/components/camera.tag.html b/assets/tags/property/components/camera.tag.html new file mode 100644 index 0000000..f487ce9 --- /dev/null +++ b/assets/tags/property/components/camera.tag.html @@ -0,0 +1,93 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Camera
Clear Buffers +
+ + +
+
Clear Color +
+ + +
+
Projection + +
Frustum Culling + +
Field of View +
+ + +
+
Clip +
+ + +
+
Priority + +
Viewport +
+ + + + +
+
+
+ + + + +
\ No newline at end of file diff --git a/assets/tags/property/components/components.tag.html b/assets/tags/property/components/components.tag.html new file mode 100644 index 0000000..8a79a49 --- /dev/null +++ b/assets/tags/property/components/components.tag.html @@ -0,0 +1,28 @@ + + +
+
+
+
+
+
+ + +
\ No newline at end of file diff --git a/assets/tags/property/components/element.tag.html b/assets/tags/property/components/element.tag.html new file mode 100644 index 0000000..a4edf61 --- /dev/null +++ b/assets/tags/property/components/element.tag.html @@ -0,0 +1,160 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Element
Type + +
Preset + +
Anchor +
+ + + + +
+
Pivot +
+ + +
+
Auto-Size +
+ + +
+
Size +
+ + +
+
Margin +
+ + + + +
+
Alignment +
+ + +
+
Text + +
Font Size +
+ +
+
Line Height +
+ +
+
Spacing +
+ +
+
Font +
+ +
+
Font +
+ + + +
+
Color +
+ + +
+
+
+ + + + +
\ No newline at end of file diff --git a/assets/tags/property/components/light.tag.html b/assets/tags/property/components/light.tag.html new file mode 100644 index 0000000..c2cd776 --- /dev/null +++ b/assets/tags/property/components/light.tag.html @@ -0,0 +1,99 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Light
Type + +
Color +
+ + +
+
Intensity +
+ + +
+
States +
+ +
+
Lightmap +
+ + +
+
Affect +
+ + +
+
Shadows +
+ +
+
Update Mode
Resolution
Distance
Shadow Type
Bias
+
+ + +
\ No newline at end of file diff --git a/assets/tags/property/components/model.tag.html b/assets/tags/property/components/model.tag.html new file mode 100644 index 0000000..4b6dc28 --- /dev/null +++ b/assets/tags/property/components/model.tag.html @@ -0,0 +1,69 @@ + +
+ + + + + + + + + + + + + + + + + + +
Model
Type + +
Material +
+ + + +
+
Shadows +
+ + + +
+
States +
+ + +
+
+
+ +
\ No newline at end of file diff --git a/assets/tags/property/properties.tag.html b/assets/tags/property/properties.tag.html new file mode 100644 index 0000000..ed17f28 --- /dev/null +++ b/assets/tags/property/properties.tag.html @@ -0,0 +1,93 @@ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Entity
Enabled + +
Name +
+ +
+
Tags +
+ +
+
Position +
+ + + +
+
Rotation +
+ + + +
+
Scale +
+ + + +
+
+ +
+
+ +
+
+ +
+ + + +
\ No newline at end of file diff --git a/assets/tags/property/readme.md b/assets/tags/property/readme.md new file mode 100644 index 0000000..352483b --- /dev/null +++ b/assets/tags/property/readme.md @@ -0,0 +1,20 @@ +# Properties + +currently, the UI has a `properties` sidebar that includes an `entity` section and one or more 'components` + +- properties + - entity + - components + - component + + +## Folder Sturucture + +``` +properties/ + properties.tag.html + componenents/ + componenets.tag.html <-- component load + model.tag.html <-- component + +``` \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..5caa650 --- /dev/null +++ b/index.html @@ -0,0 +1,55 @@ + + + + + + + Editor + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + + + + + \ No newline at end of file