Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


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


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.


Auto Save

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.


                <svg viewBox="0 0 640 512" width="100" title="shoe-logo" id="logo" style="display:none">
	<path d="M192 160h32V32h-32c-35.35 0-64 28.65-64 64s28.65 64 64 64zM0 416c0 35.35 28.65 64 64 64h32V352H64c-35.35 0-64 28.65-64 64zm337.46-128c-34.91 0-76.16 13.12-104.73 32-24.79 16.38-44.52 32-104.73 32v128l57.53 15.97c26.21 7.28 53.01 13.12 80.31 15.05 32.69 2.31 65.6.67 97.58-6.2C472.9 481.3 512 429.22 512 384c0-64-84.18-96-174.54-96zM491.42 7.19C459.44.32 426.53-1.33 393.84.99c-27.3 1.93-54.1 7.77-80.31 15.04L256 32v128c60.2 0 79.94 15.62 104.73 32 28.57 18.88 69.82 32 104.73 32C555.82 224 640 192 640 128c0-45.22-39.1-97.3-148.58-120.81z" />




                const assets = [{src:";400;600"}, "footbacking.jpg"];
const path = "";
const frame = new Frame(FIT, 1024, 768, white, darker, assets, path);
frame.on("ready", ()=>{ // ES6 Arrow Function - similar to function(){}
	zog("ready from ZIM Frame"); // logs in console (F12 - choose console)

	// often need below - so consider it part of the template
	const stage = frame.stage;
	const stageW = frame.width;
	const stageH = frame.height;

	// see for an intro example
	// see for video and code tutorials
	// see for documentation
	// see for ZIM on CodePen
	// sometimes for blendmode to work the stage needs a shape on it
	new Rectangle(stageW, stageH, white).addTo();
	// make a container for the content and spin it slowly
	const holder = new Container(stageW, stageH)
		.noMouse() // if nothing is interactve... noMouse() optimizes
			ease:"linear" // imporant for constant rotation speed 
	// grab the logo SVG to add to Beads
	const svg = zid("logo");
	// make the path for the Beads - must be a Blob or Squiggle 
	// here we make a Blob from Circle
	const path = new Blob({radius:300, points:new Circle(800)});
	// if we have a remote SVG file then just load into Frame assets parameter and use asset(file.svg) 
	// but here we load from an SVG tag in the HTML
	// this will provide a callback with the Bitmap as a parameter
	svgToBitmap(svg, s=>{		
		// create Beads which place objects along the provided path
		// centerReg these so we can invert their scale to make walking effect
		const ring = new Beads({
			visible:false // hide the path
		// make the steps effect 
		// we did a variety of animation effects and eventually chose this one
		// obj is the interval object and includes a count parameter 
		// we use this to cycle through the items 
		// the modulus % will start at the array beginning when equal to the count
		// we swap scaleY in two places as we go
		interval(.05, obj=>{
			let step1 = ring.items[obj.count%ring.count];
			let step2 = ring.items[(obj.count+ring.count/2)%ring.count];
			step1.scaleY *= -1;
			step2.scaleY *= -1;
		// add some color to the feet 
		// by applying a lighten blend mode
		// so far, underneath this picture is a white rectangle and black feet 
		// the lightest color will be kept so this is the white background 
		// and the color of the footbacking when it is on the black feet 
		// If we did not have the white background, the stage color is ignored 
		// so we would see the whole footbacking picture and not get the effect
		// make the rays - or just get an image and bring it in as an asset
		const a = 360/ring.count;
		// a Triangle() can have a 90 angle if -1 is provided to the third length parameter 
		// so if the adjacent side of the angle is 1000 then this is the opposite length
		const op = Math.tan(a*RAD)*1000;		
		const rays = new Container().center(holder);
		// we will just make a ray every other angle
		loop(ring.count/2, i=>{
			// come back half an angle so the ray is centered on the feet 
			// and spread the rays out at double the angle (for every other one)
 			// put the registration point of the ray at the left bottom corner
			// so this gets put at 0,0 of the rays container
			new Triangle(1000,op,-1).rot(-a/2+a*i*2).reg(0,op).alp(.05).addTo(rays);
		// fade out the center by making a white circle that gradients to 0 alpha
		// put this on the rays but under the logo text
		new Circle(300,new RadialColor([white,white.toAlpha(0)],[0.5,1], 0,0,0, 0,0,300)).center(holder);
		// animate in the logo text using the google font 
		// put a little spin on it and an elastic ease
		new Label("LikeNuShus", 55, "Nunito")			
			.cache() // text animates better cached - but uncache after
				props:{scale:1, rotation:0},
	}); // end of svg processed

	// call remote script to make ZIM icon - you will not need this

}); // end of ready