Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update

  • Loading branch information...
commit d7d5dd43c6e36f1662c2b65b70d9f1397b8a6182 1 parent adba2cf
CodeHunger authored
Showing with 29 additions and 10 deletions.
  1. +29 −10 source/jarallax_image_sequence.js
View
39 source/jarallax_image_sequence.js
@@ -1,11 +1,32 @@
-JarallaxImageSequence = function(conainer, image_name, amount, leading_numbers){
- this.base_name = image_name.split('.')[0];;
+var JarallaxImageSequence = function(conainer, image_name, amount, leading_numbers){
+ this.base_name = image_name.split('.')[0];
this.file_extension = '.' + image_name.split('.')[1];
-
-
-}
+ this.qeue = JarallaxImageSequence.BuildQeue(this.base_name,
+ this.file_extension,
+ amount,
+ leading_numbers);
+ console.log(this);
+ //this.loadQeue();
+};
+
+JarallaxImageSequence.prototype.loadQeue = function() {
+ if(this.qeue.length > 0){
+ var temp_image = new Image();
+ temp_image.src = this.qeue.pop();
+ temp_image.onload = this.imageLoaded.bind(this);
+ //images.push(temp_image);
+ }else{
+ //next();
+ }
+};
-JarallaxImageSequence.BuilQeue = function(base_name, file_extension, amount, leading_numbers){
+JarallaxImageSequence.prototype.imageLoaded = function() {
+ console.log(this);
+};
+
+JarallaxImageSequence.BuildQeue = function(base_name, file_extension, amount, leading_numbers){
+ var qeue = [];
+
for(var i = 0; i < amount; i ++) {
var url;
var id = i.toString();
@@ -13,8 +34,6 @@ JarallaxImageSequence.BuilQeue = function(base_name, file_extension, amount, lea
id = '0' + id;
}
- console.log('id');
+ console.log(base_name + id + file_extension);
}
-}
-
-
+};
Please sign in to comment.
Something went wrong with that request. Please try again.