Pen Settings



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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.






                const frame = new Frame("fit", 1024, 768, black, black);
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
    let stage = frame.stage;
    let stageW = frame.width;
    let stageH = frame.height;
		// cheers to the SousBas poster in Hamilton where I saw the pattern!

    // REFERENCES for ZIM at
    // see for video and code tutorials
    // see for documentation
    // see for INTRO to ZIM
    // see for INTRO to CODE

    // CODE HERE
		// the class makes one Ghoul - we will tile them afterwards
		class Ghoul extends Container {
			constructor(r=100, h=600, c=blue, e=orange) { // BLUE AND ORANGE
				// r is radius, h is height, c is color, e is eye color
				super(r*2, h); // super constructor must be called when extending (CreateJS requirement)
				let w = this.leg = r*2/(4+3); // 4 legs and 3 spaces
				new Circle(r, c).pos(0,0,CENTER,TOP,this); // SMOOTH
				// Tile arguments separated by spaces to help see them
				new Tile(new Circle(20,e), 2, 1, 20).pos(0,r*.3,CENTER,TOP,this);
				new Rectangle(r*2,h-r*2,c).center(this);
				// edges of canvas shapes sometimes blead against black - so overlapping a little looks better
				new Tile(new Rectangle(w,h-r*2+1,black,null,null,[w/2,w/2,0,0]), 3, 1, w).pos(0,r,CENTER,TOP,this);
				new Tile(new Rectangle(w,h-r*2+r, c), 2, 1, w).pos(0,r,CENTER,TOP,this);
				// SHARP
				let point = new Tile({obj:new Triangle(w/2+2,r+2,-1,black).sca(-1,1), cols:2, mirrorH:true})

		const ghoul = new Ghoul(100,700);
		const animation = {
			props:{scaleY:.6}, // BIG AND SMALL
			time:series(800, 5000), // FAST AND SLOW
		new Tile(ghoul.clone(), 3, 1, ghoul.width-ghoul.leg*2)
		new Tile(ghoul.clone(), 2, 1, ghoul.width-ghoul.leg*2)

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


		// call remote script to make ZIM Foundation for Creative Coding icon

}); // end of ready