Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <main id="main">
  <canvas id="view"></canvas>
</main>
              
            
!

CSS

              
                body {
   margin: 0;
   overflow: hidden;
}
main {
  position: fixed;
  overflow: hidden;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;  
  background: brown;
}
              
            
!

JS

              
                var wScreen = $(window).width();
// ---------- alias photo ...
var baseUrl = 'https://raw.githubusercontent.com/Efetivos/Barbara_vue/master/src/components/images/galeria/';




// ---------- alias Pixi ...
var Application = PIXI.Application, //Var Pixi init
    loader = PIXI.loader, //Var Pixi load Images
    resources = PIXI.loader.resources, //Var Pixi  Use Loadr Spritws
    Sprite = PIXI.Sprite, //Var Pixi  Sprite Create
    resources = PIXI.loader.resources; //Var Pixi source Sprite


// ---------- Init Pixi ...
var app = new Application ({
  width: main.clientWidth, //Width Size from Id Main
  height: main.clientHeight, //Height Size from Id Main
  antialias: true,
   transparent: true,
  view  //Choice Canvas Id View
});



// ---------- Load Images ...
loader 
   .add('be1', baseUrl+'photo-be1.jpg')
   .add('be2', baseUrl+'photo-be2.jpg')
   .add('be3', baseUrl+'photo-be3.jpg')
   .add('be4', baseUrl+'photo-be4.jpg')
   .add('be5', baseUrl+'photo-be5.jpg')
   .add('be6', baseUrl+'photo-be6.jpg')
   .add('be7', baseUrl+'photo-be7.jpg')
  .on("progress", loadindFunction) //function while loading Sprites
  .load(setup);//Call Function after Loading

function loadindFunction(loader, resource) {

  //Display the file `url` currently being loaded
  console.log("loading: " + resource.url); 

  //Display the percentage of files currently loaded
  console.log("progress: " + loader.progress + "%"); 

  //If you gave your files names as the first argument 
  //of the `add` method, you can access them like this
  //console.log("loading: " + resource.name);
}

var be1, be2;
// ---------- Function after Loading ...
function setup() {
console.log("All files loaded");
  //Create the cat sprite
  be1 = new Sprite(resources.be1.texture);
  be2 = new Sprite(resources.be2.texture);
  app.stage.addChild(be1, be2);
   
   greensock();   
   //call Animation Function
   //app.ticker.add(delta => gameLoop(delta));   
}


// ---------- Function Loop Animation ...
// function gameLoop(delta){
//   //Move the cat 1 pixel 
//   be2.x += 1; 
// }

function greensock () {
      var tlPixi = new TimelineMax()
   .to(be1, 2,{pixi:{x:  -wScreen -10}, ease: Power3.easeInOut})
   .from(be2, 2,{pixi:{x:  wScreen -10}, ease: Power3.easeInOut},0);
}






              
            
!
999px

Console