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

              
                
              
            
!

CSS

              
                
              
            
!

JS

              
                
// Sprite by Antonio Caggiano - use for educational purposes only

const scaling = "fit"; // this will resize to fit inside the screen dimensions
const width = 3000;
const height = 768;
const color = dark; // ZIM colors like green, blue, pink, faint, clear, etc.
const outerColor = darker; // any HTML colors lke "violet", "#333", etc. are fine to use
const assets = 
		
		["https://raw.githubusercontent.com/karelrosseel/fietsverzet/master/blauw50.png",
  "https://i.ibb.co/Jy2PfD6/g"];



const frame = new Frame(scaling, width, height, color, outerColor, assets);
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;

	// REFERENCES for ZIM at https://zimjs.com
	// see https://zimjs.com/intro.html for an intro example
	// see https://zimjs.com/learn.html for video and code tutorials
	// see https://zimjs.com/docs.html for documentation
	// see https://codepen.io/topic/zim/ for ZIM on CodePen

	// CODE HERE
	
	var points = [[-230.1,226.1,0,0,-148.6,-27.6,148.6,27.6],[-17,59,19.4,-5.1,-30,47.1,68.9,-57.3],[154.1,51.1,0,0,-39.2,-53.2,39.2,53.2],[216.8,250.3,0,0,-76,-50.1,76,50.1],[420.9,213.8,0,0,-65.8,-3.1,65.8,3.1]];
	
	const path = new Squiggle({
		thickness:20,
		points:points,
		color:"yellow",		
		dashed:false,
		interactive:true,
		onTop: false,
	}).sca(1.5).center().mov(100,-100);
		
	asset("https://raw.githubusercontent.com/karelrosseel/fietsverzet/master/blauw50.png")
		.clone()
		.centerReg()
		.sca(2)
		// .outline()
		.animate({
			props:{path:path, flip:true},
			time:10000,
			ease:"linear",
			rewind:false,
			loop:true	
		});
	
	asset("https://raw.githubusercontent.com/karelrosseel/fietsverzet/master/blauw50.png")
		.clone()
		.centerReg()
		.alp(0)
		.sca(2)
		// .outline()
		.animate({
			props:{path:path, flip:true},
			wait:1000,
			waitedCall:plane=>{plane.alp(1)},
			time:10000,
			ease:"linear",
			rewind:false,
			loop:true	
		});
	
	asset("https://raw.githubusercontent.com/karelrosseel/fietsverzet/master/blauw50.png")
		.clone()
		.alp(0)
		.centerReg()
		.sca(2)
		// .outline()
		.animate({
			props:{path:path, flip:true},
			wait:2000,
			waitedCall:plane=>{plane.alp(1)},
			time:10000,
			ease:"linear",
			rewind:false,
			loop:true	
		});
	
  new Label({ // found on https://zimjs.com/ten/beads3.html
        text:"drag or double tap points - shift (or hold) click to remove - click to add",
        size:20,
        color:white
    }).alp(.7).pos(0,30,CENTER,BOTTOM)
	

	stage.update(); // this is needed to show any changes


}); // end of ready
              
            
!
999px

Console