cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              body{
  margin:0;
  padding: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

            
          
!
            
              // Other sample pens:
// Interactive test: https://codepen.io/molamil/pen/ggRdeK
// Loops: https://codepen.io/molamil/pen/egRQZK
// JavaScript: https://codepen.io/molamil/pen/EZXdpE
// Video Masking: https://codepen.io/molamil/pen/zNzYqe

//Globalt
        var background;
        var maskBackground;

        var sprite;
        var circle;

        var masker;
        var maskActive = true;
        
        var Fugl;
        var Blomst;
        var Blomst2;
        var Blomst3;
        var Blomst4;
        var Blomst5;
        var Fugl1;
        var Blomst6;
        var Blomst7;

        var e;
        var e1;
        var e2;
        var e3;
        var e4;
        var e5;
        var e6;
        var e7;
        var e8;
       
        
        



        SPF.set({

            at:"back",
//Tilføj baggrund
            init: function(PIXI, input) {
                background = new PIXI.Graphics();
                background.beginFill(input.colors[6])
                background.drawRect(0,0, input.width, input.height);
                background.endFill();
                input.container.addChild(background);
              
               
              
              /*circle = new PIXI.Graphics();
                circle.beginFill(input.colors[8]);
                circle.drawCircle(input.width / 2, input.height / 2, input.height / 2);
                circle.endFill();
                input.container.addChild(circle); */
            },

            render: function(PIXI, input) {
              
            }

        });

        SPF.set({

            at:"mid",

            load: function(PIXI, input) {

                return [input.patterns.botanicorganic3];

            },

            init: function(PIXI, input) {
                
                //Maske baggrund
                maskBackground = new PIXI.Graphics();
                maskBackground.beginFill(input.colors[15])
                maskBackground.drawRect(0,0, input.width, input.height);
                maskBackground.endFill();
                input.container.addChild(maskBackground);
            
              
                // Slå masken til
                SPF.midgroundMask(true);
              
               /*Pape = new PIXI.Sprite(input.graphics.bbbbird1);
                input.container.addChild(Pape);
               Pape1 = new PIXI.Sprite(input.graphics.bbbbird1);
                input.container.addChild(Pape1);*/
              
              e = new PIXI.Sprite(input.graphics.wingwave);
              input.container.addChild(e);
              e.anchor.x = 0.5;
              e.anchor.y = 0.1;
              e.scale.x = 1.5;
              e.scale.y = 1.5;
              
              e1 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e1)
              e1.anchor.x = 0.5;
              e1.anchor.y = 0.1;
              e1.scale.x = 1.5;
              e1.scale.y = 1.5;
              
              e2 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e2)
              e2.anchor.x = 0.5;
              e2.anchor.y = 0.1;
              e2.scale.x = 1.5;
              e2.scale.y = 1.5;
              
              e3 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e3)
              e3.anchor.x = 0.5;
              e3.anchor.y = 0.1;
              e3.scale.x = 1.5;
              e3.scale.y = 1.5;
              
              e4 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e4)
              e4.anchor.x = 0.5;
              e4.anchor.y = 0.1;
              e4.scale.x = 1.5;
              e4.scale.y = 1.5;
              
              e5 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e5)
              e5.anchor.x = 0.5;
              e5.anchor.y = 0.1;
              e5.scale.x = 1.5;
              e5.scale.y = 1.5;
              
              e6 = new PIXI.Sprite(input.graphics.wingwave);
              input.container.addChild(e6);
              e6.anchor.x = 0.5;
              e6.anchor.y = 0.1;
              e6.scale.x = 1.5;
              e6.scale.y = 1.5;
              
              e7 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e7)
              e7.anchor.x = 0.5;
              e7.anchor.y = 0.1;
              e7.scale.x = 1.5;
              e7.scale.y = 1.5;
              
              e8 = new PIXI.Sprite(input.graphics.wingwave)
              input.container.addChild(e8)
              e8.anchor.x = 0.5;
              e8.anchor.y = 0.1;
              e8.scale.x = 1.5;
              e8.scale.y = 1.5;
            
              
              Fugl = new PIXI.Sprite(input.graphics.bbbbird1);
              input.container.addChild(Fugl);
              Fugl.anchor.x = 0.5;
              Fugl.anchor.y = 0.1;
              
              Blomst = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst)
              Blomst.anchor.x = 0.5;
              Blomst.anchor.y = 0.1;
              
              Blomst2 = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst2)
              Blomst2.anchor.x = 0.5;
              Blomst2.anchor.y = 0.1;
              
              Blomst3 = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst3)
              Blomst3.anchor.x = 0.5;
              Blomst3.anchor.y = 0.1;
              
              Blomst4 = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst4)
              Blomst4.anchor.x = 0.5;
              Blomst4.anchor.y = 0.1;
              
              Blomst5 = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst5)
              Blomst5.anchor.x = 0.5;
              Blomst5.anchor.y = 0.1;
              
                 Fugl1 = new PIXI.Sprite(input.graphics.bbbbird1);
              input.container.addChild(Fugl1);
              Fugl1.anchor.x = 0.5;
              Fugl1.anchor.y = 0.1;
              
              Blomst6 = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst6)
              Blomst6.anchor.x = 0.5;
              Blomst6.anchor.y = 0.1;
              
              Blomst7 = new PIXI.Sprite(input.graphics.bbbbird1)
              input.container.addChild(Blomst7)
              Blomst7.anchor.x = 0.5;
              Blomst7.anchor.y = 0.1;
              
              
            
              
              
              
             
              
               
           
               
              

            },
          

            mouseDownTouchStart: function(PIXI, input) {
              console.log('Masken var: ', maskActive);
                // Er masken til (true) eller fra (false)?
                if (maskActive) {
                  // Hvis den er fra så slå den til
                  SPF.midgroundMask(false);
                  // Husk at masken nu er slået til
                  maskActive = false;
                } else {
                  // Hvis den er til så slå den fra
                  SPF.midgroundMask(true);
                  // Husk at masken nu er slået fra
                  maskActive = true;
                }
              console.log('Masken er nu: ', maskActive)
            },
          
  

            //mouseUpTouchEnd: function(PIXI, input) {
            //    SPF.midgroundMask(true);
            //},


            resize: function(PIXI, input) {

              var w =  input.width;
              var h =  input.height;

            

            },
          
          render: function(PIXI, input) {
              var xPos = input.mouseTouchPosition.x ;
              var yPos = input.mouseTouchPosition.y;
            
          
            
              Fugl.x = input.width/2;
              Fugl.y = input.height/2;
              Fugl.rotation += 0.001;
            
            Blomst.x = input.width/2;
            Blomst.y = input.height/2;
            Blomst.rotation += 0.002;
              
            Blomst2.x = input.width/2;
            Blomst2.y = input.height/2;
            Blomst2.rotation += 0.003;
            
            Blomst3.x = input.width/2;
            Blomst3.y = input.height/2;
            Blomst3.rotation += 0.004;
           
            Blomst4.x = input.width/2;
            Blomst4.y = input.height/2;
            Blomst4.rotation += 0.005;
            
            Blomst5.x = input.width/2;
            Blomst5.y = input.height/2;
            Blomst5.rotation += 0.006;
            
             Fugl1.x = input.width/2;
              Fugl1.y = input.height/2;
              Fugl1.rotation += 0.007;
            
            Blomst6.x = input.width/2;
            Blomst6.y = input.height/2;
            Blomst6.rotation += 0.008;
              
            Blomst7.x = input.width/2;
            Blomst7.y = input.height/2;
            Blomst7.rotation += 0.009;
            
            e.x = input.width/2;
            e.y = input.height/2;
            e.rotation += 0.001;
            
            e1.x = input.width/2;
            e1.y = input.height/2;
            e1.rotation += 0.002;
              
            e2.x = input.width/2;
            e2.y = input.height/2;
            e2.rotation += 0.003;
            
            e3.x = input.width/2;
            e3.y = input.height/2;
            e3.rotation += 0.004;
           
            e4.x = input.width/2;
            e4.y = input.height/2;
            e4.rotation += 0.005;
            
            e5.x = input.width/2;
            e5.y = input.height/2;
            e5.rotation += 0.006;
            
            e6.x = input.width/2;
            e6.y = input.height/2;
            e6.rotation += 0.007;
            
            e7.x = input.width/2;
            e7.y = input.height/2;
            e7.rotation += 0.008;
              
            e8.x = input.width/2;
            e8.y = input.height/2;
            e8.rotation += 0.009;
           
              

              
              
           
            
          }

        });

        SPF.start();


            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console