summaryrefslogtreecommitdiff
path: root/site/public/assets/javascripts/_env.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-04-14 15:37:19 -0400
committerJules Laplace <jules@okfoc.us>2015-04-14 15:37:27 -0400
commit55bba9f4aab51fb05ebeb01987924e1f97226210 (patch)
tree7581fcccdcf0c84df4bd90542976849995a96902 /site/public/assets/javascripts/_env.js
parentfc7ba0f29f549820885fcb11e88c68256d3eacca (diff)
store shape images in CMS
Diffstat (limited to 'site/public/assets/javascripts/_env.js')
-rw-r--r--site/public/assets/javascripts/_env.js49
1 files changed, 11 insertions, 38 deletions
diff --git a/site/public/assets/javascripts/_env.js b/site/public/assets/javascripts/_env.js
index 5fddaa7..ac155b3 100644
--- a/site/public/assets/javascripts/_env.js
+++ b/site/public/assets/javascripts/_env.js
@@ -1,13 +1,4 @@
-var base_href = "http://okfocus.s3.amazonaws.com/2h/"
-var box_images = shuffle([
- "1.gif", "2.gif", "3.gif", "4.gif", "5.gif",
-// "dies2.gif", "dies3.gif",
- "6.gif", "7.gif", "8.gif", "9.gif",
- "12.gif", "13.gif", "14.gif", "15.gif",
- "16.gif", "17.gif", // "CCP-GIF.gif", "dies1.gif",
-])
-
-var strips = []
+var strips = [], boxImages = []
var done_loading = false, menu_open = false, entry_open = false
@@ -16,9 +7,8 @@ environment.init = function(){
$("#scene").addClass("fade")
var loader = new Loader(environment.ready, new HustleLoader)
var preloadImages = $("#preload-image-list").html().split("\n").filter(function(s){ return !!s })
- loader.preloadImages(box_images.map(function(url){
- return base_href + url
- }).concat(preloadImages))
+ boxImages = $("#box-image-list").html().split("\n").filter(function(s){ return !!s })
+ loader.preloadImages( preloadImages.concat(boxImages) )
loader.ready()
}
environment.ready = function(){
@@ -160,7 +150,9 @@ environment.ready = function(){
}
else {
build_scene()
- $("#scene").removeClass("fade")
+ setTimeout(function(){
+ $("#scene").removeClass("fade")
+ }, 50)
}
setTimeout(function(){ done_loading = true }, 200)
@@ -194,7 +186,7 @@ function build_scene () {
controls.zoom(1000)
strips.push( new Strip({
- images: box_images.slice(0, 5),
+ images: boxImages.slice(0, 5),
x: -100,
y: 100,
rotationY: PI/4,
@@ -202,7 +194,7 @@ function build_scene () {
}) )
strips.push( new Strip({
- images: box_images.slice(5, 10),
+ images: boxImages.slice(5, 10),
x: 100,
y: 100,
rotationX: PI/4,
@@ -211,7 +203,7 @@ function build_scene () {
}) )
strips.push( new Strip({
- images: box_images.slice(10, 15),
+ images: boxImages.slice(10, 15),
x: 0,
y: 100,
z: 100,
@@ -220,7 +212,7 @@ function build_scene () {
}) )
strips.push( new Strip({
- images: box_images.slice(15, 20),
+ images: boxImages.slice(15, 20),
x: 0,
y: 100,
z: -50,
@@ -438,24 +430,6 @@ environment.updateOnReady = function(t){
controls.update()
}
-var titles = [
- "BARNEY'S, GAGA CONSTELLATION",
- "CCP GAMES, EVE ONLINE",
- "DIESEL ACCESSORIES",
- "DIESEL CAMPAIGN FW13/SS14",
- "DIESEL CAMPAIGN FW14",
- "#DIESELREBOOT",
- "#DIESELTRIBUTE",
- "DIESEL JOGG JEANS",
- "DIESEL WATCHES",
- 'MAC, "UNTITLED, SELF-PORTRAIT"',
- "MUGLER, BROTHERS OF ARCADIA",
- "MUGLER, LADY GAGA",
- "MUGLER, MEN’S FW11",
- "NICOLA’S, HO HO HO CHRISTMAS SHOP",
- "NICOLA'S, LANE CRAWFORD",
- "NICOLA’S, NEW YORK"
-]
var Strip = function( opt ){
this.opt = opt
@@ -471,11 +445,10 @@ var Strip = function( opt ){
var prev = root
this.els = opt.images.map(function(url, i){
var el = new MX.Image({
- src: base_href + url,
+ src: url,
onload: function(img){
}
})
- $(el.el).attr("data-title", choice(titles))
el.setCSSTransformOrigin( "50% 100%" )
el.addTo(prev)
el.update()