diff options
| -rw-r--r-- | public/assets/img/360.png | bin | 0 -> 7687 bytes | |||
| -rw-r--r-- | public/assets/javascripts/app.js | 24 | ||||
| -rw-r--r-- | public/assets/javascripts/rectangles/engine/rooms/_walls.js | 2 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/EditorToolbar.js | 10 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/EditorView.js | 1 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/HelpCursor.js | 13 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/editor/WallpaperPicker.js | 46 | ||||
| -rw-r--r-- | public/assets/javascripts/ui/site/HomeView.js | 24 | ||||
| -rwxr-xr-x | public/assets/stylesheets/app.css | 35 | ||||
| -rw-r--r-- | views/controls/editor/wallpaper.ejs | 6 |
10 files changed, 114 insertions, 47 deletions
diff --git a/public/assets/img/360.png b/public/assets/img/360.png Binary files differnew file mode 100644 index 0000000..853952b --- /dev/null +++ b/public/assets/img/360.png diff --git a/public/assets/javascripts/app.js b/public/assets/javascripts/app.js index 028ebb8..fddbd5a 100644 --- a/public/assets/javascripts/app.js +++ b/public/assets/javascripts/app.js @@ -17,30 +17,6 @@ else { new WOW().init(); -$(function(){ - var player = $f( okplayer ) - player.addEvent('ready', function(){ - player.addEvent('finish', function(){ - hide() - }) - }) - $('.hero .circle').click( function(){ - $('.videoModal').css("display","table").addClass('active'); - player.api('play') - }) - - $('.videoModal .ion-ios7-close-empty').click( function(){ - player.api('pause') - hide() - }) - - function hide() { - $('.videoModal').fadeOut(300, function(){ - $('.videoModal').removeClass('active') - }) - } -}) - var scene, cam, map; var app = new function(){} diff --git a/public/assets/javascripts/rectangles/engine/rooms/_walls.js b/public/assets/javascripts/rectangles/engine/rooms/_walls.js index 653278c..25b1c58 100644 --- a/public/assets/javascripts/rectangles/engine/rooms/_walls.js +++ b/public/assets/javascripts/rectangles/engine/rooms/_walls.js @@ -157,7 +157,7 @@ wall.wallpaper(background, img) }) }.bind(this) - img.src = background.src + img.src = background.src.replace("url(","").replace(")","") img.complete && img.onload() }, floor: function(background){ diff --git a/public/assets/javascripts/ui/editor/EditorToolbar.js b/public/assets/javascripts/ui/editor/EditorToolbar.js index dceae3c..3c75b95 100644 --- a/public/assets/javascripts/ui/editor/EditorToolbar.js +++ b/public/assets/javascripts/ui/editor/EditorToolbar.js @@ -4,6 +4,8 @@ var EditorToolbar = View.extend({ events: { "mousedown": 'stopPropagation', + "mouseenter": 'mouseenter', + "mouseleave": 'mouseleave', "click [data-role='undo']": 'undo', "click [data-role='toggle-map-view']": 'toggleMap', "click [data-role='toggle-project-settings']": 'toggleSettings', @@ -157,6 +159,14 @@ var EditorToolbar = View.extend({ this.toggleMap(false) this.parent.presets.toggle(state) }, + + mouseenter: function(){ + this.parent.cursor.hide() + }, + + mouseleave: function(){ + this.parent.cursor.show() + }, }) var editor = new function(){ diff --git a/public/assets/javascripts/ui/editor/EditorView.js b/public/assets/javascripts/ui/editor/EditorView.js index 9946feb..2872ab9 100644 --- a/public/assets/javascripts/ui/editor/EditorView.js +++ b/public/assets/javascripts/ui/editor/EditorView.js @@ -47,6 +47,7 @@ var EditorView = View.extend({ readyLayout: function(data){ data.isNew = true + $('#help-button').trigger("click") this.ready(data) }, diff --git a/public/assets/javascripts/ui/editor/HelpCursor.js b/public/assets/javascripts/ui/editor/HelpCursor.js index d0e1825..de0ca01 100644 --- a/public/assets/javascripts/ui/editor/HelpCursor.js +++ b/public/assets/javascripts/ui/editor/HelpCursor.js @@ -16,7 +16,7 @@ var HelpCursor = View.extend({ }, initialize: function(){ - $('#help-button').click(this.toggle.bind(this)); + $('#help-button').click(this.toggle.bind(this)) }, toggle: function(){ @@ -28,10 +28,6 @@ var HelpCursor = View.extend({ this.active = true this.message('start') this.$el.show() -// $('body').chardinJs('start') -// $(window).one("click", function(){ -// $('body').chardinJs('stop') -// }) this.move({ pageX: -1000, pageY: -10000 }) this.moveFn = this.move.bind(this) document.addEventListener("mousemove", this.moveFn) @@ -52,7 +48,12 @@ var HelpCursor = View.extend({ }, show: function(name){ - this.showMessage(name) + if (this.active) { + this.$el.show() + } + }, + hide: function(){ + this.$el.hide() }, message: function(name){ diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js index 6e0d5c6..2d60f11 100644 --- a/public/assets/javascripts/ui/editor/WallpaperPicker.js +++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js @@ -7,11 +7,12 @@ var WallpaperPicker = UploadView.extend({ uploadAction: "/api/media/upload", events: { + "contextmenu": 'contextmenu', "mousedown": 'stopPropagation', "click .swatch": 'pick', "click .wallpaperRemove": 'remove', "input [data-role='wallpaper-scale']": 'updateScale', - "change .url": "tileWalls", + "change .url": "enterUrl", "keydown .url": "enterSetUrl", }, @@ -120,8 +121,22 @@ var WallpaperPicker = UploadView.extend({ $(".floatingSwatch").addClass("scissors") } }, + + contextmenu: function(e){ + if (Scenery.nextWallpaper) { + e.preventDefault() + this.cancel() + } + }, + cancel: function(){ + if (Scenery.nextWallpaper) { + Scenery.nextWallpaper = null + app.tube('cancel-wallpaper') + } + }, follow: function(e, wallpaper, icon){ + var base = this icon = icon || wallpaper var $floatingSwatch = $(".floatingSwatch") @@ -130,6 +145,8 @@ var WallpaperPicker = UploadView.extend({ Scenery.nextWallpaper = wallpaper + $(".floodMessage").show() + setTimeout(function(){ function _followCursor(e) { $floatingSwatch.css({ @@ -138,11 +155,18 @@ var WallpaperPicker = UploadView.extend({ }); } function _hideCursor (e) { + $(window).off('keydown', _floodRoom) $(window).off('mousemove', _followCursor) - // $(window).off('click', _hideCursor) app.off('cancel-wallpaper', _hideCursor) $floatingSwatch.removeClass("scissors").hide() + $(".floodMessage").hide() + } + function _floodRoom (e) { + if (e.keyCode == 13) { + base.flood() + } } + $(window).on('keydown', _floodRoom) $(window).on('mousemove', _followCursor) // $(window).one('click', _hideCursor); app.on('cancel-wallpaper', _hideCursor) @@ -169,22 +193,26 @@ var WallpaperPicker = UploadView.extend({ this.wall.wallpaperPosition({ scale: scale }) }, - tileWalls: function(){ + enterUrl: function(){ var url = this.$url.sanitize() - if (url.length && url.indexOf("http") == 0) { - Walls.setWallpaper.wall({ src: url }) - Walls.setWallpaper.floor({ src: url }) - Walls.setWallpaper.ceiling({ src: url }) - } this.addUrl(url) this.$url.val("") }, enterSetUrl: function (e) { e.stopPropagation() if (e.keyCode == 13) { - setTimeout(this.tileWalls.bind(this), 100) + setTimeout(this.enterUrl.bind(this), 100) } }, + + flood: function(url){ + url = url || Scenery.nextWallpaper + if (! url) return + Walls.setWallpaper.wall({ src: url }) + Walls.setWallpaper.floor({ src: url }) + Walls.setWallpaper.ceiling({ src: url }) + this.cancel() + }, initializePositionCursor: function(){ var base = this diff --git a/public/assets/javascripts/ui/site/HomeView.js b/public/assets/javascripts/ui/site/HomeView.js index 02f9ab9..ba2ead3 100644 --- a/public/assets/javascripts/ui/site/HomeView.js +++ b/public/assets/javascripts/ui/site/HomeView.js @@ -6,6 +6,28 @@ var HomeView = View.extend({ load: function() { this.projectList = new ProjectList () - } + + var player = $f( okplayer ) + player.addEvent('ready', function(){ + player.addEvent('finish', function(){ + hide() + }) + }) + $('.hero .circle').click( function(){ + $('.videoModal').css("display","table").addClass('active'); + player.api('play') + }) + + $('.videoModal .ion-ios7-close-empty').click( function(){ + player.api('pause') + hide() + }) + + function hide() { + $('.videoModal').fadeOut(300, function(){ + $('.videoModal').removeClass('active') + }) + } + }, }) diff --git a/public/assets/stylesheets/app.css b/public/assets/stylesheets/app.css index 894483d..bc52d5a 100755 --- a/public/assets/stylesheets/app.css +++ b/public/assets/stylesheets/app.css @@ -151,7 +151,7 @@ a{ } .topLinks a.ion-help-circled { font-size: 24px; - padding: 21px 27px 0 8px; + padding: 18px 27px 0 8px; } .topLinks a.ion-help-circled:hover { background:transparent; @@ -668,6 +668,7 @@ iframe.embed { display: table; height: 50vh; float: left; + background:white!important; } .profilepage .bio a:hover { @@ -716,9 +717,9 @@ iframe.embed { .profilepage .bio h2 { - text-align: left; - font-weight: 100; - font-size: 70px; + text-align: left; + font-weight: 500; + font-size: 18px; } .profilepage .bio span { font-size: 16px; @@ -1702,6 +1703,21 @@ input[type="range"]::-webkit-slider-thumb { .wallpaperResizeControls span { cursor: pointer; } +.floodMessage { + display: none; + animation: flicker 0.2s infinite; + color: black; + float: left; + margin: 10px 5px 5px 5px; + font-size: 13px; + font-weight: 300; + text-align: center; +} +@keyframes flicker { + 49% { color: black; } + 50% { color: red; } + 100% { color: red; } +} #color-picker { position: relative; @@ -2722,9 +2738,18 @@ a[data-role="forgot-password"] { width: 170px; background: rgba(255,255,255,0.95); padding: 6px 8px 8px 8px; - position: fixed; bottom: 10px; left: 10px; border: 1px solid; } +} + +@media screen and (orientation:landscape) { + .mobile #scene:after{ + content:url(/assets/img/360.png); + z-index: 3; + position: fixed; + bottom: -3px; + right: -3px; + } }
\ No newline at end of file diff --git a/views/controls/editor/wallpaper.ejs b/views/controls/editor/wallpaper.ejs index 6d8f209..3168f1c 100644 --- a/views/controls/editor/wallpaper.ejs +++ b/views/controls/editor/wallpaper.ejs @@ -10,7 +10,7 @@ <span class="swatch" style="background-image:url(/assets/img/plainpattern2.png)"></span> </span> - <input type="text" class="url" placeholder="Enter image URL 2 Flood...!"> + <input type="text" class="url" placeholder="Enter image URL"> <div class="wallpaperRemove toolButton"> <span class="ion-scissors"></span> @@ -30,6 +30,10 @@ <input data-role="wallpaper-scale" type="range" min="-4" max="4" step="0.01" value="0.0"> </div> + <div class="floodMessage"> + Hit Enter to Flood the room! + </div> + </div> <div class="floatingSwatch"></div> |
