+ * ============================================================================== */
+
+/*global views, console, $, define */
+
+define(['app/views/ui/timeline-layer', 'app/views/ui/effects'], function (Layer) {
+
+ 'use strict';
+
+ return Backbone.View.extend({
+
+ tagName: 'footer',
+ el: 'body > footer',
+ currentZoom: 100,
+ layers: [],
+ scrollstartScrubber: 0,
+ dragProp: '',
+
+ events: {
+ "click .zoom": "zoom",
+ 'click button': 'clickHandler'
+ },
+
+ initialize: function () {
+
+ _.bindAll(this, 'pinch', 'dragstart', 'drag', 'dragstartScrubber', 'dragScrubber', 'dragend');
+
+ this.time = this.el.querySelector('#time .line');
+ this.collection = window.App.timeline.collection;
+ window.App.timeline.on('play pause stop', this.setState, this);
+ this.collection.on('add', this.add, this);
+ this.collection.on('remove', this.remove, this);
+ this.collection.on('frame-sync seek kill', this.progress, this);
+
+ var spans = this.el.querySelectorAll('.time span'),
+ devidedFrames = this.collection.totalFrames / 10;
+
+
+ /* Dividing the spans with
+ * time
+ * ------------------------- */
+
+ _.each(spans, function (span, id) {
+ if (id !== 0) span.innerHTML = '' + (devidedFrames * id / 25).toMMSS() + '
';
+ });
+
+ /* Hammer for Scrub
+ * ------------------------- */
+
+ this.hammerscrubber = Hammer(document.getElementById('scrubber'));
+ this.hammerscrubber.on('dragstart', this.dragstartScrubber);
+ this.hammerscrubber.on('drag', this.dragScrubber);
+
+
+ /* Hammer for Time
+ * ------------------------- */
+
+ this.hammertime = Hammer(this.el);
+ this.hammertime.on('pinchin', this.pinch);
+ this.hammertime.on('pinchout', this.pinch);
+ this.hammertime.on('dragstart', this.dragstart);
+ this.hammertime.on('dragend', this.dragend);
+ this.hammertime.on('drag', this.drag);
+
+ },
+
+
+ /* Handler for all the click events
+ * ---------------------------------------------------------------------- */
+
+ clickHandler: function (e) {
+
+ switch (e.currentTarget.getAttribute('class')) {
+ case 'play':
+ window.App.timeline.play();
+ break;
+
+ case 'pause':
+ window.App.timeline.play();
+ break;
+
+ case 'stop':
+ window.App.timeline.stop();
+ break;
+
+ case 'options':
+ $(e.currentTarget.parentElement).toggleClass('active');
+ break;
+
+ case 'delete':
+ var parent = e.currentTarget.parentElement.parentElement;
+ this.collection.get(parent.getAttribute('data-cid')).destroy();
+ $(parent).remove();
+ break;
+
+ case 'duplicate':
+ var cid = e.currentTarget.parentElement.parentElement.getAttribute('data-cid');
+ this.collection.add(this.collection.get(cid).toJSON());
+ break;
+ }
+
+ },
+
+
+ /* Sets the play and pause state of the button
+ * ---------------------------------------------------------------------- */
+
+ setState: function (event) {
+ switch (event) {
+ case 'play':
+ document.getElementById('play-pause').setAttribute('class', 'pause');
+ break;
+ case 'pause':
+ case 'stop':
+ document.getElementById('play-pause').setAttribute('class', 'play');
+ break;
+
+ }
+ },
+
+
+ /* Adds the layer to the view
+ * ---------------------------------------------------------------------- */
+
+ add: function (model) {
+
+ var title = "",
+ layer = new Layer({
+ model: model
+ }),
+ template = _.template("\
+ <%= title %>\
+ \
+ \
+ \
+ \
+
\
+ ");
+
+ if (model.get('type') === 'video') {
+ title = model.get('media').get('file').name;
+ title = title.substring(0, title.length - 4)
+ } else {
+ title = model.get('name');
+ }
+
+ this.el.querySelector('.layers').appendChild(layer.render().el);
+
+ var el = document.createElement('li');
+ el.setAttribute('data-cid', model.cid);
+ el.innerHTML = template({
+ title: title
+ });
+
+ this.el.querySelector('.labels').appendChild(el);
+ this.layers.push(layer);
+ if (model.get('frames') !== 0) {
+ layer.resize();
+ }
+ },
+
+
+ /* Removes the layer from the view
+ * ---------------------------------------------------------------------- */
+
+ remove: function (model) {
+ this.$('*[data-cid="' + model.cid + '"]').remove();
+ },
+
+
+ /* Pinch zoom effect on the timeline to zoom in and out
+ * ---------------------------------------------------------------------- */
+
+ pinch: function (event) {
+ var layers = this.el.querySelector('.layers'),
+ scale = event.gesture.scale;
+
+ this.currentZoom = (scale < 1 ? 1 : scale) * 100;
+ layers.style.width = this.currentZoom + "%";
+
+ _.each(this.layers, function (layer) {
+ layer.resize();
+ });
+ },
+
+
+ /* Time Drag start
+ * ---------------------------------------------------------------------- */
+
+ dragstart: function (event) {
+ if (this.dragProp === ''){
+ this.dragProp = 'time';
+ this.scrollstart = this.el.querySelector('.layer-holder').scrollLeft;
+ }
+ },
+
+
+ /* Time Drag
+ * ---------------------------------------------------------------------- */
+
+ drag: function (event) {
+ if (!window.App.dragging && this.dragProp === 'time') {
+ this.el.querySelector('.layer-holder').scrollLeft = this.scrollstart + -(event.gesture.deltaX);
+ }
+ },
+
+
+ /* Drag end
+ * ---------------------------------------------------------------------- */
+
+ dragend: function (event) {
+ this.dragProp = '';
+ },
+
+
+ /* Scrubber drag start
+ * ---------------------------------------------------------------------- */
+
+ dragstartScrubber: function (event) {
+ this.dragProp = 'scrub';
+ this.startFrameScrub = window.App.timeline._frame;
+ },
+
+
+ /* Scrubber drag
+ * ---------------------------------------------------------------------- */
+
+ dragScrubber: function (event) {
+
+ var frameScrub = parseInt((Math.abs(event.gesture.deltaX) / $('#layers').width()) * window.App.timeline.collection.totalFrames);
+
+ switch (event.gesture.direction) {
+ case "left":
+ frameScrub = this.startFrameScrub - frameScrub;
+ break;
+ case "right":
+ frameScrub = this.startFrameScrub + frameScrub;
+ break;
+ default:
+ return;
+ }
+
+ window.App.timeline.seek(frameScrub);
+
+ },
+
+
+ /* The zoom function of the timeline
+ * ---------------------------------------------------------------------- */
+
+ zoom: function (event) {
+
+ var layers = this.el.querySelector('.layers'),
+ current = layers.style.width;
+
+ switch (event.currentTarget.getAttribute('class').replace('zoom ', '')) {
+ case "in":
+ this.currentZoom += 25;
+ break;
+ case "out":
+ this.currentZoom = this.currentZoom <= 100 ? 100 : this.currentZoom - 10;
+ break;
+ }
+
+ layers.style.width = this.currentZoom + "%";
+
+ _.each(this.layers, function (layer) {
+ layer.resize();
+ });
+
+ },
+
+ progress: function (frame) {
+ var current = frame / 25,
+ total = this.collection.totalFrames / 25;
+
+ this.el.querySelector('#scrubber').innerHTML = current.toMMSS();
+ this.el.querySelector('#scrubber').style.left = ((current / total) * 100) + "%";
+
+ }
+
+ });
+
+});
diff --git a/application.js b/application.js
index 16959f2..360fe52 100644
--- a/application.js
+++ b/application.js
@@ -1,10 +1,8 @@
-/**
- * Project Touch
- *
- * @date: 6/18/13
- */
+/* Microsoft Video Editor
+ * @author: T.M.P. Kleist / Code D'azur
+ * ============================================================================== */
-/*global define, window, document, $, requirejs, require */
+/*global views, console, $, define */
requirejs.config({
waitSeconds: 1,
@@ -25,24 +23,29 @@ requirejs.config({
exports: "Backbone"
},
"stats": {
- exports: "Stats"
+ exports: "Stats"
+ },
+ "jquery-ui": {
+ exports: "$",
+ deps: ['jquery']
}
}
});
-require(['app/project-touch', 'hammer', 'stats'], function (PT) {
+//Enforce loading global libraries first
+require(['backbone', 'underscore', 'hammer', 'stats'], function (PT) {
+
+ require(['app/project-touch'], function (PT) {
+
+ 'use strict';
+
+ window.log = Function.prototype.bind.call(console.log, console);
- 'use strict';
-
-// var stats = new Stats();
-//
-// stats.domElement.style.position = 'absolute';
-// stats.domElement.style.left = '0px';
-// stats.domElement.style.bottom = '0px';
-//
-// document.body.appendChild( stats.domElement );
+ window.App = new PT({
+ el: document.querySelector('.video')
+ });
+ window.App.render();
- window.App = new PT({el: document.querySelector('.video')});
- window.App.render();
+ });
});
diff --git a/audio.mp3 b/audio.mp3
new file mode 100644
index 0000000..d38b6f4
Binary files /dev/null and b/audio.mp3 differ
diff --git a/clip.mp4 b/clip-nature.mp4
old mode 100755
new mode 100644
similarity index 100%
rename from clip.mp4
rename to clip-nature.mp4
diff --git a/clip-street.mp4 b/clip-street.mp4
new file mode 100644
index 0000000..2841300
Binary files /dev/null and b/clip-street.mp4 differ
diff --git a/config.rb b/config.rb
new file mode 100644
index 0000000..8d9fb5f
--- /dev/null
+++ b/config.rb
@@ -0,0 +1,9 @@
+require 'compass-colors'
+
+project_type = "stand_alone"
+http_path = "/"
+css_dir = "styles"
+sass_dir = "styles"
+images_path = "images"
+javascripts_dir = "app"
+output_style = "compact"
\ No newline at end of file
diff --git a/images/grayscale.png b/images/grayscale.png
deleted file mode 100644
index 9fbd396..0000000
Binary files a/images/grayscale.png and /dev/null differ
diff --git a/images/interface-se494e7670e.png b/images/interface-se494e7670e.png
new file mode 100644
index 0000000..1dd3279
Binary files /dev/null and b/images/interface-se494e7670e.png differ
diff --git a/images/stop.png b/images/interface/button-add.png
similarity index 73%
rename from images/stop.png
rename to images/interface/button-add.png
index 35bc9f5..6de6def 100644
Binary files a/images/stop.png and b/images/interface/button-add.png differ
diff --git a/images/pause.png b/images/interface/button-delete.png
similarity index 73%
rename from images/pause.png
rename to images/interface/button-delete.png
index f6207e5..c92d487 100644
Binary files a/images/pause.png and b/images/interface/button-delete.png differ
diff --git a/images/pixelize.png b/images/interface/button-duplicate.png
similarity index 73%
rename from images/pixelize.png
rename to images/interface/button-duplicate.png
index e99f8b8..2ba6681 100644
Binary files a/images/pixelize.png and b/images/interface/button-duplicate.png differ
diff --git a/images/threshold.png b/images/interface/button-maximize.png
similarity index 72%
rename from images/threshold.png
rename to images/interface/button-maximize.png
index 2b89b11..63612ca 100644
Binary files a/images/threshold.png and b/images/interface/button-maximize.png differ
diff --git a/images/interface/button-menu-active.png b/images/interface/button-menu-active.png
new file mode 100644
index 0000000..47a1d89
Binary files /dev/null and b/images/interface/button-menu-active.png differ
diff --git a/images/interface/button-menu.png b/images/interface/button-menu.png
new file mode 100644
index 0000000..cd6f22d
Binary files /dev/null and b/images/interface/button-menu.png differ
diff --git a/images/interface/button-pause.png b/images/interface/button-pause.png
new file mode 100644
index 0000000..0514e81
Binary files /dev/null and b/images/interface/button-pause.png differ
diff --git a/images/interface/button-play.png b/images/interface/button-play.png
new file mode 100644
index 0000000..ab9a384
Binary files /dev/null and b/images/interface/button-play.png differ
diff --git a/images/interface/button-stop.png b/images/interface/button-stop.png
new file mode 100644
index 0000000..fb4b4e0
Binary files /dev/null and b/images/interface/button-stop.png differ
diff --git a/images/interface/button-zoom-in.png b/images/interface/button-zoom-in.png
new file mode 100644
index 0000000..f746e37
Binary files /dev/null and b/images/interface/button-zoom-in.png differ
diff --git a/images/interface/button-zoom-out.png b/images/interface/button-zoom-out.png
new file mode 100644
index 0000000..9aa1ada
Binary files /dev/null and b/images/interface/button-zoom-out.png differ
diff --git a/images/interface/drag-left.png b/images/interface/drag-left.png
new file mode 100644
index 0000000..f8edebd
Binary files /dev/null and b/images/interface/drag-left.png differ
diff --git a/images/interface/drag-right.png b/images/interface/drag-right.png
new file mode 100644
index 0000000..22022a8
Binary files /dev/null and b/images/interface/drag-right.png differ
diff --git a/images/interface/icon-effect-off.png b/images/interface/icon-effect-off.png
new file mode 100644
index 0000000..d2f58cd
Binary files /dev/null and b/images/interface/icon-effect-off.png differ
diff --git a/images/interface/icon-effect-on.png b/images/interface/icon-effect-on.png
new file mode 100644
index 0000000..79ef99b
Binary files /dev/null and b/images/interface/icon-effect-on.png differ
diff --git a/images/interface/icon-note.png b/images/interface/icon-note.png
new file mode 100644
index 0000000..857fb2d
Binary files /dev/null and b/images/interface/icon-note.png differ
diff --git a/images/interface/icon-play.png b/images/interface/icon-play.png
new file mode 100644
index 0000000..d314146
Binary files /dev/null and b/images/interface/icon-play.png differ
diff --git a/images/interface/icon-sound.png b/images/interface/icon-sound.png
new file mode 100644
index 0000000..99ff142
Binary files /dev/null and b/images/interface/icon-sound.png differ
diff --git a/images/interface2x-s83bd2fe9ce.png b/images/interface2x-s83bd2fe9ce.png
new file mode 100644
index 0000000..6855ec8
Binary files /dev/null and b/images/interface2x-s83bd2fe9ce.png differ
diff --git a/images/interface2x/button-add.png b/images/interface2x/button-add.png
new file mode 100644
index 0000000..7c8cec6
Binary files /dev/null and b/images/interface2x/button-add.png differ
diff --git a/images/interface2x/button-delete.png b/images/interface2x/button-delete.png
new file mode 100644
index 0000000..d168f77
Binary files /dev/null and b/images/interface2x/button-delete.png differ
diff --git a/images/interface2x/button-duplicate.png b/images/interface2x/button-duplicate.png
new file mode 100644
index 0000000..c3c3913
Binary files /dev/null and b/images/interface2x/button-duplicate.png differ
diff --git a/images/interface2x/button-maximize.png b/images/interface2x/button-maximize.png
new file mode 100644
index 0000000..a8fedbc
Binary files /dev/null and b/images/interface2x/button-maximize.png differ
diff --git a/images/interface2x/button-menu-active.png b/images/interface2x/button-menu-active.png
new file mode 100644
index 0000000..224c4db
Binary files /dev/null and b/images/interface2x/button-menu-active.png differ
diff --git a/images/interface2x/button-menu.png b/images/interface2x/button-menu.png
new file mode 100644
index 0000000..9f5d13c
Binary files /dev/null and b/images/interface2x/button-menu.png differ
diff --git a/images/interface2x/button-pause.png b/images/interface2x/button-pause.png
new file mode 100644
index 0000000..edb4808
Binary files /dev/null and b/images/interface2x/button-pause.png differ
diff --git a/images/interface2x/button-play.png b/images/interface2x/button-play.png
new file mode 100644
index 0000000..8601bdc
Binary files /dev/null and b/images/interface2x/button-play.png differ
diff --git a/images/interface2x/button-stop.png b/images/interface2x/button-stop.png
new file mode 100644
index 0000000..8c736ee
Binary files /dev/null and b/images/interface2x/button-stop.png differ
diff --git a/images/interface2x/button-zoom-in.png b/images/interface2x/button-zoom-in.png
new file mode 100644
index 0000000..e09c682
Binary files /dev/null and b/images/interface2x/button-zoom-in.png differ
diff --git a/images/interface2x/button-zoom-out.png b/images/interface2x/button-zoom-out.png
new file mode 100644
index 0000000..658b3de
Binary files /dev/null and b/images/interface2x/button-zoom-out.png differ
diff --git a/images/interface2x/drag-left.png b/images/interface2x/drag-left.png
new file mode 100644
index 0000000..0a0f00f
Binary files /dev/null and b/images/interface2x/drag-left.png differ
diff --git a/images/interface2x/drag-right.png b/images/interface2x/drag-right.png
new file mode 100644
index 0000000..28d8711
Binary files /dev/null and b/images/interface2x/drag-right.png differ
diff --git a/images/interface2x/icon-effect-off.png b/images/interface2x/icon-effect-off.png
new file mode 100644
index 0000000..99c899e
Binary files /dev/null and b/images/interface2x/icon-effect-off.png differ
diff --git a/images/interface2x/icon-effect-on.png b/images/interface2x/icon-effect-on.png
new file mode 100644
index 0000000..afe86e1
Binary files /dev/null and b/images/interface2x/icon-effect-on.png differ
diff --git a/images/interface2x/icon-note.png b/images/interface2x/icon-note.png
new file mode 100644
index 0000000..3e3911a
Binary files /dev/null and b/images/interface2x/icon-note.png differ
diff --git a/images/interface2x/icon-play.png b/images/interface2x/icon-play.png
new file mode 100644
index 0000000..3c6f282
Binary files /dev/null and b/images/interface2x/icon-play.png differ
diff --git a/images/interface2x/icon-sound.png b/images/interface2x/icon-sound.png
new file mode 100644
index 0000000..e275e67
Binary files /dev/null and b/images/interface2x/icon-sound.png differ
diff --git a/images/play.png b/images/play.png
deleted file mode 100644
index 2112b87..0000000
Binary files a/images/play.png and /dev/null differ
diff --git a/index.html b/index.html
index 2129062..5c5fef2 100644
--- a/index.html
+++ b/index.html
@@ -2,65 +2,103 @@
+
Project Touch
-
+
-
-
+
+
+
+
+ Edit Video
+
+
+ Scale
+
+
+ Rotation
+
+
+ Audio level
+
+
+
+
+
+
+
+
+
+
diff --git a/readme.md b/readme.md
index aa51e1f..8bdc369 100644
--- a/readme.md
+++ b/readme.md
@@ -3,6 +3,8 @@ ProjectTouch
**Community built HTML 5 video editor.**
+
+
There are three tough challenges in developing the web-based video editor for Touch:
- UX and touch input
- Video loading, sequencing and manipulation
@@ -14,4 +16,17 @@ Videos you can use for testing:
- [Nature](https://www.theinternetoftouch.com/videos/nature.zip)
- [Trailer](https://www.theinternetoftouch.com/videos/trailer.zip)
-Check out the [ProjectTouch microsite](http://www.theinternetoftouch.com) for updates.
\ No newline at end of file
+Check out the [ProjectTouch microsite](http://www.theinternetoftouch.com) for updates.
+
+
+Editing installation
+--------------------
+
+ git clone git@github.com:projecttouch/projecttouch.git
+ gem install compass
+ gem install compass-colors
+
+commit and push your changes
+do a pull request and state your changes
+
+
diff --git a/styles/_mixin.sass b/styles/_mixin.sass
new file mode 100644
index 0000000..a7239cb
--- /dev/null
+++ b/styles/_mixin.sass
@@ -0,0 +1,97 @@
+@import compass/css3/background-size
+@import compass/utilities/sprites/base
+
+=getSprite($sprites, $sprites-retina, $name, $center: false)
+ @if $center == true
+ background: sprite-url($sprites) sprite-position($sprites, $name) repeat-x
+ @else
+ background: sprite-url($sprites) sprite-position($sprites, $name) no-repeat
+ @media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3 / 2), (min-device-pixel-ratio: 1.5)
+ &
+ $xpos: round(nth(sprite-position($sprites-retina, $name), 1) / 2)
+ $ypos: round(nth(sprite-position($sprites-retina, $name), 2) / 2)
+ @if $center == true
+ background: sprite-url($sprites-retina) $xpos $ypos repeat-x
+ +background-size(ceil(image-width(sprite-path($sprites-retina)) / 2), ceil(image-height(sprite-path($sprites-retina)) / 2))
+ @else
+ background: sprite-url($sprites-retina) $xpos $ypos no-repeat
+ +background-size(ceil(image-width(sprite-path($sprites-retina)) / 2), auto)
+
+// Returns just the sprite positions
+
+=getSpritePositions($sprites, $sprites-retina, $name, $right: false)
+ @if $right == true
+ background-position: right nth(sprite-position($sprites, $name), 2)
+ @else
+ background-position: sprite-position($sprites, $name)
+ @media (-webkit-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 3 / 2), (min-device-pixel-ratio: 2)
+ $xpos: round(nth(sprite-position($sprites-retina, $name), 1) / 2)
+ $ypos: round(nth(sprite-position($sprites-retina, $name), 2) / 2)
+ @if $right == true
+ background-position: right $ypos
+ @else
+ background-position: $xpos $ypos
+
+// image mixin
+=imageBefore($sprites, $sprites-retina, $name, $top, $left)
+ &:before
+ content: " "
+ display: block
+ position: absolute
+ top: #{$top}px
+ left: #{$left}px
+ +getSprite($sprites, $sprites-retina, $name)
+ +sprite-dimensions($sprites, $name)
+
+=imageAfter($sprites, $sprites-retina, $name, $top, $right)
+ &:after
+ content: " "
+ display: block
+ position: absolute
+ top: #{$top}px
+ right: #{$right}px
+ +getSprite($sprites, $sprites-retina, $name)
+ +sprite-dimensions($sprites, $name)
+
+// Button mixin
+
+@function -returnLeftSpriteName($name, $state: "Normal")
+ @return $name + "Left" + $state
+
+@function -returnCenterSpriteName($name, $state: "Normal")
+ @return $name + "Center" + $state
+
+@function -returnRightSpriteName($name, $state: "Normal")
+ @return $name + "Right" + $state
+
+=button($sprites-sides, $sprites-sides-retina, $sprites-center, $sprites-center-retina, $sprite-name)
+ display: inline-block
+ position: relative
+ height: image-height(sprite-file($sprites-center, -returnCenterSpriteName($sprite-name)))
+ margin: 0 image-width(sprite-file($sprites-sides, -returnRightSpriteName($sprite-name))) 0 image-width(sprite-file($sprites-sides, -returnLeftSpriteName($sprite-name)))
+ +getSprite($sprites-center, $sprites-center-retina, -returnCenterSpriteName($sprite-name), true)
+ &:before, &:after
+ content: " "
+ display: block
+ position: absolute
+ top: 0
+ &:before
+ left: -#{image-width(sprite-file($sprites-sides, -returnLeftSpriteName($sprite-name)))}
+ +getSprite($sprites-sides, $sprites-sides-retina, -returnLeftSpriteName($sprite-name))
+ +sprite-dimensions($sprites-sides, -returnLeftSpriteName($sprite-name))
+ &:after
+ right: -#{image-width(sprite-file($sprites-sides, -returnRightSpriteName($sprite-name)))}
+ +getSprite($sprites-sides, $sprites-sides-retina, -returnRightSpriteName($sprite-name))
+ +sprite-dimensions($sprites-sides, -returnRightSpriteName($sprite-name))
+ &:hover
+ +getSpritePositions($sprites-center, $sprites-center-retina, -returnCenterSpriteName($sprite-name, "Hover"))
+ &:before
+ +getSpritePositions($sprites-sides, $sprites-sides-retina, -returnLeftSpriteName($sprite-name, "Hover"))
+ &:after
+ +getSpritePositions($sprites-sides, $sprites-sides-retina, -returnRightSpriteName($sprite-name, "Hover"))
+ &:active
+ +getSpritePositions($sprites-center, $sprites-center-retina, -returnCenterSpriteName($sprite-name, "Down"))
+ &:before
+ +getSpritePositions($sprites-sides, $sprites-sides-retina, -returnLeftSpriteName($sprite-name, "Down"))
+ &:after
+ +getSpritePositions($sprites-sides, $sprites-sides-retina, -returnRightSpriteName($sprite-name, "Down"))
diff --git a/styles/stylesheet.sass b/styles/stylesheet.sass
new file mode 100644
index 0000000..7816c2e
--- /dev/null
+++ b/styles/stylesheet.sass
@@ -0,0 +1,123 @@
+/* Stylesheet
+ * @author: T.M.P. Kleist / Code D'azur
+ * ============================================================================== */
+
+@import url(http://fonts.googleapis.com/css?family=Open+Sans:300)
+@import compass/reset
+@import compass/css3/images
+@import mixin
+@import compass/css3/transition
+@import compass/utilities/text/replacement
+@import compass/css3/opacity
+
+
+/* Variables
+ * ---------------------------------------------------------------------- */
+
+$interface-sprite: sprite-map("interface/*.png", $layout: smart)
+$interface-sprite2x: sprite-map("interface2x/*.png", $layout: smart)
+
+$headerHeight: 50px
+$footerHeight: 125px
+
+$sideMargin: 20px
+$panelMargin: 10px
+$panelHeightPct: 80%
+$panelWidth: 280px
+
+$titleBlue: #0CF
+
+$sideMargin: 20px
+$panelMargin: 10px
+
+$libraryItemHeight: 155px
+
+
+/* Base
+ * ---------------------------------------------------------------------- */
+
+*
+ -webkit-box-sizing: border-box
+ -moz-box-sizing: border-box
+ -o-box-sizing: border-box
+ box-sizing: border-box
+
+ -webkit-touch-callout: none
+ -webkit-user-select: none
+ -khtml-user-select: none
+ -moz-user-select: moz-none
+ -ms-user-select: none
+ user-select: none
+
+
+html
+ height: 100%
+ -ms-content-zooming: none
+
+body
+ height: 100%
+ background: #1d1d1d
+ color: #fff
+ font-family: 'Open Sans', helvetica, verdana, sans-serif
+ font-weight: 300
+ -ms-content-zooming: none
+
+ #hiddenVideo
+ display: none
+
+header
+ position: absolute
+ top: 0
+ width: 100%
+ background: #333333
+ min-height: $headerHeight
+
+h1
+ color: $titleBlue
+ font-size: 30px
+ line-height: 50px
+ vertical-align: middle
+ text-indent: 40px
+
+h2
+ font-size: 30px
+ margin: 10px 0 10px 20px
+
+button
+ border: 0
+ background: 0
+ margin: 0
+ padding: 0
+ cursor: pointer
+ outline: none
+ +transition(opacity 100ms ease-in-out)
+ &:hover
+ opacity: 0.6
+ &:active
+ +transition(opacity 0ms ease-in-out)
+ opacity: 0.2
+
+div.video
+ position: absolute
+ top: $headerHeight
+ width: 100%
+ height: $panelHeightPct
+
+
+/* Imports
+ * ---------------------------------------------------------------------- */
+
+@import ui/footer
+@import ui/panel
+@import ui/effects
+@import ui/edit
+@import ui/library
+@import ui/composition
+@import ui/player
+@import ui/scrollbars
+
+
+
+
+
+
diff --git a/styles/ui/_composition.sass b/styles/ui/_composition.sass
new file mode 100644
index 0000000..0869085
--- /dev/null
+++ b/styles/ui/_composition.sass
@@ -0,0 +1,18 @@
+#composition
+ position: absolute
+ left: $panelWidth + $sideMargin + $panelMargin
+ right: $panelWidth + $sideMargin + $panelMargin
+ height: $panelHeightPct
+ z-index: 99999999
+
+ &.fullwidth
+ h2
+ margin-left: 40px
+
+ .controls
+ z-index: 1
+ position: absolute
+ vertical-position: bottom
+ top: 500px
+ left: 20px
+
\ No newline at end of file
diff --git a/styles/ui/_edit.sass b/styles/ui/_edit.sass
new file mode 100644
index 0000000..7d83e4d
--- /dev/null
+++ b/styles/ui/_edit.sass
@@ -0,0 +1,69 @@
+$levelWidth: 235px
+
+
+#edit
+ display: none
+ h2
+ margin-bottom: 20px
+ float: left
+
+ #btnCloseEdit
+ color: #fff
+ float: right
+ margin-top: 24px
+
+ h3
+ font-size: 20px
+ margin: 10px 0 10px 20px
+ clear: both
+
+ div.level
+ position: relative
+ display: block
+ width: $levelWidth
+ height: 30px
+ padding-top: 5px
+
+ .right
+ -ms-touch-action: none
+ display: block
+ position: absolute
+ right: $levelWidth -22px
+ top: 0
+ height: 30px
+ width: 2px
+ cursor: w-resize
+ z-index: 99
+ padding-left: 20px
+ border-right: 2px solid white
+
+ &:after
+ content: ''
+ position: absolute
+ display: block
+ width: 22px
+ height: 100%
+ right: -22px
+ top: 0
+
+ .holder
+
+ position: relative
+ height: 20px
+ overflow: hidden
+ width: $levelWidth
+ padding-right: $levelWidth
+ margin-bottom: 34px
+ margin-left: 20px
+
+ +background(linear-gradient(top, #262526, #323132))
+
+ .middle
+ -ms-touch-action: none
+ display: block
+ position: relative
+ height: 20px
+ width: 100%
+ z-index: 80
+ +background(linear-gradient(top, #199DCA, #127EA2))
+
diff --git a/styles/ui/_effects.sass b/styles/ui/_effects.sass
new file mode 100644
index 0000000..2eb1fb5
--- /dev/null
+++ b/styles/ui/_effects.sass
@@ -0,0 +1,37 @@
+#effects.ui-panel
+ li
+ background-color: #000
+
+ a
+ display: block
+ padding-top: 68px
+ height: 155px
+ text-align: center
+ color: #1D1D1D
+ text-decoration: none
+ text-transform: capitalize
+ font-size: 27px
+ width: 100%
+ position: absolute
+ z-index: 10
+
+ img
+ position: absolute
+ width: 100%
+ height: 100%
+ border: none
+ z-index: 8
+
+ span
+ position: absolute
+ display: block
+ right: 10px
+ top: 10px
+ width: 20px
+ height: 20px
+ z-index: 9
+
+ &.off span
+ +getSprite($interface-sprite, $interface-sprite2x, icon-effect-off)
+ &.on span
+ +getSprite($interface-sprite, $interface-sprite2x, icon-effect-on)
\ No newline at end of file
diff --git a/styles/ui/_footer.sass b/styles/ui/_footer.sass
new file mode 100644
index 0000000..961b4e7
--- /dev/null
+++ b/styles/ui/_footer.sass
@@ -0,0 +1,274 @@
+$experimental-support-for-svg: true
+footer
+ background: #333333
+ min-height: 20%
+ position: absolute
+ bottom: 0
+ width: 100%
+ padding: 0 30px 30px
+ padding-bottom: 20px
+ color: #999999
+ font-size: 14px
+ z-index: 9999999
+
+ h2
+ position: absolute
+ font-size: 20px
+ top: 9px
+
+ .zoom
+ position: absolute
+ top: 13px
+ width: 34px
+ height: 34px
+
+ &.in
+ left: 136px
+ +imageAfter($interface-sprite, $interface-sprite2x, button-zoom-in,8,8)
+ &.out
+ left: 160px
+ +imageAfter($interface-sprite, $interface-sprite2x, button-zoom-out,8,8)
+
+ .controls
+ position: absolute
+ top: 21px
+ left: 40px
+
+ button
+ width: 20px
+ height: 30px
+ position: relative
+
+ &.play
+ +imageAfter($interface-sprite, $interface-sprite2x, button-play, 0,0)
+
+ &.stop
+ +imageAfter($interface-sprite, $interface-sprite2x, button-stop, 0,0)
+
+ &.pause
+ +imageAfter($interface-sprite, $interface-sprite2x, button-pause, 0,0)
+
+
+ #scrubber
+ position: absolute
+ height: 100%
+ z-index: 999
+ margin: 0 0 0 -25px
+ width: 50px
+ text-align: center
+ padding: 3px
+ color: white
+ top: 0
+
+ cursor: -webkit-grab
+ #cursor: -webkit-grabbing
+
+ &:after
+ content: ''
+ position: absolute
+ height: 100%
+ border: 1px solid #FFFFFF
+ top: 20px
+ left: 50%
+
+ .labels
+ width: 170px
+ height: 50px
+ position: absolute
+ top: 50px
+ li
+ height: 20px
+ position: relative
+ margin-top: 10px
+ background: #2C2B2C
+ color: white
+ line-height: 20px
+ padding: 0 0 0 20px
+
+ &>button
+ position: absolute
+ right: 5px
+ top: 0
+ width: 20px
+ height: 20px
+ +imageAfter($interface-sprite, $interface-sprite2x, button-menu-active, 5, 0)
+
+ &>div
+ display: none
+ position: absolute
+ width: 50px
+ height: 20px
+ z-index: 9999
+ top: 0
+ right: -50px
+ background: #2C2B2C
+
+ button
+ display: inline-block
+ width: 20px
+ height: 20px
+ position: relative
+
+ &.delete
+ +imageAfter($interface-sprite, $interface-sprite2x, button-delete, 3, 0)
+
+ &.duplicate
+ +imageAfter($interface-sprite, $interface-sprite2x, button-duplicate, 3, 0)
+
+ &.active>div
+ display: block
+
+
+ &:first-child
+ margin: 0
+
+ .layers
+ position: relative
+ width: 100%
+
+ .layer-holder
+ position: relative
+ margin: 0 0 0 170px
+ padding: 20px 0 0
+ overflow: hidden
+
+
+ ol
+ li
+ background-color: #2d2c2d
+ height: 20px
+ position: relative
+ margin-top: 10px
+
+ &:first-child
+ font-size: 0
+ margin-top: 0px
+ cursor: move
+
+ span
+ width: 10%
+ display: inline-block
+ height: 100%
+ border-left: 1px solid #424142
+ position: relative
+ color: #858585
+ +background( linear-gradient(left, #2C2B2D, #2A282A) )
+
+ &:first-child
+ border: 0
+
+ div
+ position: absolute
+ font-size: 12px
+ top: -15px
+ left: -16px
+
+
+ .layer
+ position: absolute
+ right: 0
+ top: 0
+ left: 0
+ height: 100%
+ font-size: 11px
+ height: 20px
+ background: #282628
+ overflow: hidden
+
+ &>button
+ position: absolute
+ left: 0
+ width: 20px
+ height: 20px
+ background: white
+ &.effect
+ .media
+ .middle
+ +background(linear-gradient(top, #4cffa7, #3dcd87))
+
+ &.audio
+ .media
+ .middle
+ +background(linear-gradient(top, #EEEEEE, #C1C1C1))
+
+ .media
+ position: absolute
+ height: 100%
+ cursor: move
+ overflow: hidden
+
+ +background( linear-gradient(top, #1F1F1F, #191919) )
+
+
+ .left
+ -ms-touch-action: none
+ display: block
+ position: absolute
+ left: 0
+ top: 0
+ height: 26px
+ width: 26px
+ cursor: e-resize
+ z-index: 99
+ +imageBefore($interface-sprite, $interface-sprite2x, drag-left, 2, 2)
+
+ .middle
+ -ms-touch-action: none
+ display: block
+ position: relative
+ height: 26px
+ width: 100%
+ z-index: 80
+ +background( linear-gradient(top, #199DCA, #127EA2) )
+
+
+ .right
+ -ms-touch-action: none
+ display: block
+ position: absolute
+ right: 0
+ top: 0
+ height: 26px
+ width: 26px
+ cursor: w-resize
+ z-index: 99
+ +imageAfter($interface-sprite, $interface-sprite2x, drag-right, 2, 2)
+
+
+ &.selected
+ // +background( linear-gradient(top, darken(#191919, 15), darken(#1F1F1F, 15)) )
+
+ .middle
+ +background( linear-gradient(top, darken(#127EA2, 15), darken(#199DCA, 15)) )
+
+ .layer span
+ float: right
+ margin-right: 6px
+
+ .layer .part
+ position: absolute
+ height: 100%
+ +background( linear-gradient(top, #199DCA, #127EA2) )
+
+
+footer .part .left, footer .part .right
+ position: absolute
+ width: 40px
+ height: 40px
+ background: rgba(255, 255, 255, 0.3)
+ top: -10px
+
+footer .part .left
+ left: -10px
+
+footer .part .right
+ right: -10px
+
+footer .layer .part
+ background: -moz-layerar-gradient(top, #4cffa7 0%, #36d486 100%)
+ background: -webkit-gradient(layerar, left top, left bottom, color-stop(0%, #4cffa7), color-stop(100%, #36d486))
+ background: -webkit-layerar-gradient(top, #4cffa7 0%, #36d486 100%)
+ background: -o-layerar-gradient(top, #4cffa7 0%, #36d486 100%)
+ background: -ms-layerar-gradient(top, #4cffa7 0%, #36d486 100%)
+ background: layerar-gradient(to bottom, #4cffa7 0%, #36d486 100%)
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4cffa7', endColorstr='#36d486',GradientType=0 )
diff --git a/styles/ui/_library.sass b/styles/ui/_library.sass
new file mode 100644
index 0000000..82bc3ba
--- /dev/null
+++ b/styles/ui/_library.sass
@@ -0,0 +1,80 @@
+#library
+ //display: none
+ .file-selector
+ width: $panelWidth
+ +imageBefore($interface-sprite, $interface-sprite2x, button-add, 47, 110)
+
+ form
+ cursor: pointer
+ +opacity(0)
+ width: $panelWidth
+ height: 100%
+ overflow: hidden
+
+ input
+ +opacity(0)
+ width: $panelWidth * 2
+ height: 100%
+ position: absolute
+ right: 0
+ &::-ms-browse
+ width: 300px
+
+ label
+ cursor: pointer
+ opacity: 0
+ width: 280px
+ height: 100%
+ position: absolute
+ display: block
+ top: 0
+
+ &:hover
+ background-color: $titleBlue
+
+ .library-item
+ width: $panelWidth
+ height: $libraryItemHeight
+ background: rgba(0, 0, 0, 0.5) no-repeat center center
+ background-size: cover
+
+ > *
+ position: absolute
+
+ h3
+ background: rgba(0, 0, 0, 0.5)
+ width: 100%
+ padding: 5px
+ line-height: 1.5em
+ text-indent: 5px
+
+ button
+ color: black
+ height: 34px
+ width: 34px
+ bottom: 10px
+ right: 10px
+ position: absolute
+ +imageAfter($interface-sprite, $interface-sprite2x, button-zoom-in, 8, 8)
+ +hide-text()
+
+ img, video
+ width: 100%
+ height: auto
+
+ &:hover
+ h3
+ opacity: 1
+
+ &.audio
+ height: 95px
+
+ +imageAfter($interface-sprite, $interface-sprite2x, icon-sound, 16, 16)
+
+ &:after
+ background-color: white
+ h3
+ opacity: 1
+ padding: 5px 50px 5px 5px
+ background: none
+
diff --git a/styles/ui/_panel.sass b/styles/ui/_panel.sass
new file mode 100644
index 0000000..74874a5
--- /dev/null
+++ b/styles/ui/_panel.sass
@@ -0,0 +1,33 @@
+.ui-panel
+
+ width: $panelWidth
+ position: absolute
+ top: 0
+ bottom: $headerHeight
+
+ &.left
+ left: $sideMargin
+
+ &.right
+ right: $sideMargin
+
+ ul
+ width: 100%
+ position: absolute
+ top: 50px
+ bottom: 0
+ overflow: hidden
+ overflow-y: auto
+
+ li
+ position: relative
+ width: 100%
+ height: $libraryItemHeight
+ margin: 10px 0 0
+
+ &:first-child
+ margin: 0
+
+
+
+
\ No newline at end of file
diff --git a/styles/ui/_player.sass b/styles/ui/_player.sass
new file mode 100644
index 0000000..7b2793d
--- /dev/null
+++ b/styles/ui/_player.sass
@@ -0,0 +1,3 @@
+#player
+ width: 100%
+ pointer-events: none
\ No newline at end of file
diff --git a/styles/ui/_scrollbars.sass b/styles/ui/_scrollbars.sass
new file mode 100644
index 0000000..b957371
--- /dev/null
+++ b/styles/ui/_scrollbars.sass
@@ -0,0 +1,63 @@
+/* WEBKIT
+ * ---------------------------------------------------------------------- */
+
+::-webkit-scrollbar
+ width: 10px
+ height: 6px
+
+::-webkit-scrollbar-button
+ background-color: #666
+
+::-webkit-scrollbar-track
+ background-color: #999
+
+::-webkit-scrollbar-track-piece
+ background-color: #666
+
+::-webkit-scrollbar-thumb
+ height: 50px
+ background-color: $titleBlue
+ border-radius: 3px
+
+::-webkit-scrollbar-corner
+ background-color: #999
+
+::-webkit-resizer
+ background-color: #666
+
+/* IE
+ * ---------------------------------------------------------------------- */
+
+body
+ scrollbar-base-color: $titleBlue
+ scrollbar-3dlight-color: #666
+ scrollbar-highlight-color: #666
+ scrollbar-track-color: #666
+ scrollbar-arrow-color: #666
+ scrollbar-shadow-color: #666
+ scrollbar-dark-shadow-color: #1D1D1D
+
+/* MOZ
+ * ---------------------------------------------------------------------- */
+
+@-moz-document url-prefix(http://),url-prefix(https://)
+ scrollbar
+ -moz-appearance: none !important
+ background: rgb(255, 255, 0) !important
+ thumb, scrollbarbutton
+ -moz-appearance: none !important
+ background-color: $titleBlue !important
+ thumb:hover
+ -moz-appearance: none !important
+ background-color: rgb(255, 0, 0) !important
+ scrollbarbutton
+ &:hover
+ -moz-appearance: none !important
+ background-color: rgb(255, 0, 0) !important
+ display: none !important
+ scrollbar[orient="vertical"]
+ min-width: 10px !important
+
+
+
+
\ No newline at end of file
diff --git a/stylesheet.css b/stylesheet.css
deleted file mode 100644
index 428a23d..0000000
--- a/stylesheet.css
+++ /dev/null
@@ -1,265 +0,0 @@
-@import url(http://fonts.googleapis.com/css?family=Open+Sans:300);
-
-@CHARSET "UTF-8";
-html, body, div, span, applet, object, iframe,
-h1, h2, h3, h4, h5, h6, p, blockquote, pre,
-a, abbr, acronym, address, big, cite, code,
-del, dfn, em, img, ins, kbd, q, s, samp,
-small, strike, strong, sub, sup, tt, var,
-b, u, i, center,
-dl, dt, dd, ol, ul, li,
-fieldset, form, label, legend,
-table, caption, tbody, tfoot, thead, tr, th, td,
-article, aside, canvas, details, embed,
-figure, figcaption, footer, header, hgroup,
-menu, nav, output, ruby, section, summary,
-time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font: inherit;
- font-size: 100%;
- vertical-align: baseline;
-}
-
-html {
- line-height: 1;
-}
-
-ol, ul {
- list-style: none;
-}
-
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-
-caption, th, td {
- text-align: left;
- font-weight: normal;
- vertical-align: middle;
-}
-
-q, blockquote {
- quotes: none;
-}
-
-q:before, q:after, blockquote:before, blockquote:after {
- content: "";
- content: none;
-}
-
-a img {
- border: none;
-}
-
-article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
- display: block;
-}
-
-* {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- -o-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-html {
- height: 100%;
-}
-
-body {
- height: 100%;
- background: #1d1d1d;
- color: #fff;
- font-family: 'Open Sans';
- font-weight: 300;
-}
-
-header {
- background: #333333;
- height: 50px;
-}
-
-footer {
- background: #333333;
- min-height: 50px;
- position: absolute;
- bottom: 0;
- width: 100%;
- padding: 30px;
- padding-bottom: 20px;
- color: #999999;
- font-size: 14px;
-}
-
- footer div:first-child {
- background: none;
- }
-
- footer div:first-child .line {
- background: none;
- background-color: #2d2c2d;
- padding-left: 6px;
- }
-
- footer .bar {
- background-color: #2d2c2d;
- padding: 3px 30px;
- position: relative;
- margin-bottom: 10px;
- }
-
- footer .bar .line {
- position: absolute;
- right: 0;
- top: 0;
- width: 90%;
- height: 100%;
- font-size: 11px;
- line-height: 20px;
- background: #282628;
- }
-
- footer .bar .line span {
- float: right;
- margin-right: 6px;
- }
-
- footer .bar .line .part {
- position: absolute;
- height: 100%;
- background: #24687d; /* Old browsers */
- background: -moz-linear-gradient(top, #24687d 0%, #144454 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#24687d), color-stop(100%,#144454)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #24687d 0%,#144454 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #24687d 0%,#144454 100%); /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #24687d 0%,#144454 100%); /* IE10+ */
- background: linear-gradient(to bottom, #24687d 0%,#144454 100%); /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#24687d', endColorstr='#144454',GradientType=0 ); /* IE6-9 */
- }
-
- footer .bar.effects .line .part {
- background: -moz-linear-gradient(top, #4cffa7 0%, #36d486 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4cffa7), color-stop(100%,#36d486)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #4cffa7 0%,#36d486 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #4cffa7 0%,#36d486 100%); /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #4cffa7 0%,#36d486 100%); /* IE10+ */
- background: linear-gradient(to bottom, #4cffa7 0%,#36d486 100%); /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4cffa7', endColorstr='#36d486',GradientType=0 ); /* IE6-9 */
- }
-
-#player {
-
-}
-
-button {
- width: 40px;
- height: 40px;
- border: 0;
- background: center center no-repeat;
- cursor: pointer;
-}
-
-button:hover {
- opacity: 0.8;
-}
-
-#library {
- position: absolute;
- top: 20px;
- left: 20px;
-}
-
-#library li {
- background: white;
- color: black;
- font-size: 20px;
- padding: 10px;
- position: relative;
- text-transform: uppercase;
- cursor: pointer;
- width: 280px;
- height: 160px;
- margin: 5px 0;
-}
-
-#library li>div {
- margin: 56px 0;
- width: 100%;
- text-align: center;
- color: white;
-}
-
-#library li>img {
- position: absolute;
- top: 10px;
-}
-
-#library li:first-child {
-
-}
-
-button.play {
- background-image: url(images/play.png);
- margin-top: 200px;
-}
-
-button.pause {
- background-image: url(images/pause.png);
- margin-top: 200px;
-}
-
-button.stop {
- background-image: url(images/stop.png);
- margin-top: 200px;
-}
-
-button.pixelize {
- background-image: url(images/pixelize.png);
-}
-
-button.threshold {
- background-image: url(images/threshold.png);
-}
-
-button.grayscale {
- background-image: url(images/grayscale.png);
-}
-
-button.red {
- background-color: red;
-}
-
-button.green {
- background-color: green;
-}
-
-button.contrast {
- background-color: blue;
-}
-
-button.hipster {
- background-color: yellowgreen;
-}
-
-#rgb {
- position: absolute;
- z-index: 99;
- right: 0;
- display: none;
-}
-
-#rgb input {
- width: 300px;
-}
-
-#fps {
- position: absolute;
- bottom: 10px;
- left: 10px;
-}
-
-
-
diff --git a/usa.mp4 b/usa.mp4
new file mode 100644
index 0000000..0afb4ab
Binary files /dev/null and b/usa.mp4 differ