MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    hi, i need your help... tell me, how i do a new modules please

    Scheduled Pinned Locked Moved Troubleshooting
    14 Posts 5 Posters 3.8k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bjjsoulB Offline
      bjjsoul
      last edited by sdetweil

      mmmm sorry , i dont understand… :( my magic mirror is run perfect , whitout this module0_1570743430371_WhatsApp Image 2019-10-07 at 9.50.47 AM.jpeg

      AND THIS is , file MM-Snow.js

      /* Magic Mirror
       * Module: MMM-Snow
       *
       * By Michael Teeuw http://michaelteeuw.nl
       * MIT Licensed.
       * 
       * Comment on terminology: a 'flake' is any moving item being shown on the mirror, while
       * the specific themed items are called 'snow' or 'heart'. This applies to variable names
       * file names and css class names.
       */
      
      Module.register("MMM-Snow",{
      
      	defaults: {
      		flakeCount: 100,
      		theme: "winter"                 // pick from themes map below, i.e. winter, love
      	},
      
      	themes: {
      		"winter" : { 
      			"flakePrefix"  : "snow",    // prefix of css name, e.g. snow1 
      			"imagesCount"  : 3,         // number of images available in this theme, here:  snow1, snow2, snow3
      			"downwards"    : true,      // direction of flake movements, snow goes downwards
      			"sizeFactor"   : 1},        // adapt size of flakes to your liking, use original flake size
      		"love"   : { 
      			"flakePrefix" : "heart",    // prefix of css name, e.g. heart1 
      			"imagesCount"  : 2,         // number of images in this theme, here:  heart1, heart2
      			"downwards"    : false,     // direction of flake movements, hearts raise upwards			
      			"sizeFactor"   : 2},        // adapt size of flakes to your liking, we like bigger hearts
      		"water"   : { 
      			"flakePrefix" : "bubble",   // prefix of css name, e.g. bubble1 
      			"imagesCount"  : 1,         // number of images in this theme, here:  bubble1
      			"downwards"    : false,     // direction of flake movements, bubbles raise upwards			
      			"sizeFactor"   : 2}         // adapt size of flakes to your liking, we like bigger bubbles
      	},
      
      	getStyles: function() {
      		return [ "MMM-Snow.css" ]
      	},
      
      	getDom: function() {
      		var themeSettings = this.themes[this.config.theme];
      		var wrapper = document.createElement("div")
      		wrapper.className = "wrapper"
      
      		var flake, jiggle, size;
      
      		for(var i = 0; i < this.config.flakeCount; i++) {
      
      			size = themeSettings.sizeFactor * (Math.random() * 0.75) + 0.25;
      			flakeImage = document.createElement("div")
      			
      			var flakeSuffix = Math.round(1 + Math.random() * (themeSettings.imagesCount - 1));
      			flakeImage.className = themeSettings.flakePrefix + flakeSuffix;
      			flakeImage.style.transform = "scale(" + size +", " + size + ")";
      			flakeImage.style.opacity = size;
      
      			flake = document.createElement("div");
      			if(themeSettings.downwards) {
      				flake.className = "flake-downwards";
      			}
      			else {
      				flake.className = "flake-upwards"
      			}
      
      			jiggle = document.createElement("div");
      			jiggle.style.animationDelay = (Math.random() * 4) + "s";
      			jiggle.style.animationDuration = ((Math.random() * 30) + 30) + "s";
      			jiggle.appendChild(flakeImage);
      
      			size = (Math.random() * 0.75) + 0.25;
      			jiggle.style.transform = "scale(" + size +", " + size + ")";
      			jiggle.style.opacity = size;
      
      			flake.appendChild(jiggle);
      			flake.style.left = ((Math.random() * 100) - 10) + "%";
      			flake.style.animationDelay = (Math.random() * 100) + "s";
      			flake.style.animationDuration = 100 - (Math.random() * 50 * size) + "s";
      
      			wrapper.appendChild(flake);
      		}
      		return wrapper;
      	}
      
      });
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @bjjsoul
        last edited by sdetweil

        @bjjsoul can’t be perfect if you want to add another module

           	{   < --- start module
           		module: "newsfeed",
           		position: "bottom_bar",
           		config: {  < ---  start module config
           			feeds: [  < --- start array of feeds
           				{ < --- start feed 
           					title: "New York Times",
           					url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
           				}  < -- end feed
           			], < --- end array (only one entry)
           			showSourceTitle: true,
           			showPublishDate: true,
           			broadcastNewsFeeds: true,
           			broadcastNewsUpdates: true
           		} < ----  end module config
           	}, < --- end module
                {  < --- start module
           	module: "MMM-Snow",
           	position: "fullscreen_above",
           	config: {   < - start module config
                           // See 'Configuration options' for more information.
           		flakeCount: 100,
           		theme: "winter",			
           	} < ---- end module config
           } < ---- end module , no comma, no more modules to follow
               },   < ------ what is this??????? -------------------------------
           ]    < --- no more modules, end module array 
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 1
        • bjjsoulB Offline
          bjjsoul
          last edited by bjjsoul

          HEY BRO YOU ARE AWESOME … THANK YOU DUDE, I AM VERY HAPPY! IS WORKING … HEY BRO YOU HAVE WHATSAPP THIS MY NUMBER 504 98674031 … I AM GONNA BE NEEDING YOU, IN MY NEXT MODULES INSTALLATIONS… THANKS

          0_1570746677017_WhatsApp Image 2019-10-10 at 4.02.42 PM.jpeg

          VIDEO

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @bjjsoul
            last edited by

            @bjjsoul no whatsapp…

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @bjjsoul
              last edited by

              @bjjsoul

              Adding modules

              https://forum.magicmirror.builders/topic/4231/how-to-add-modules-for-absolute-beginners

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 0
              • bjjsoulB Offline
                bjjsoul
                last edited by

                hey bro, i need help with mmm.awesomealexa… you know if this module is working

                1 Reply Last reply Reply Quote 0
                • R Offline
                  ryanroy837
                  last edited by

                  thanks all for your responses. i was having similar questions and your answers were helpful to me.

                  1 Reply Last reply Reply Quote 1
                  • 1
                  • 2
                  • 1 / 2
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy