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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

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.

            
              <!--
		The idea arround this 3D world is to build blocks linked to each other through node point

		Example :

		> Main node
			> Body, linked to main node
				> Tail 1, linked to body that is linked to main node
					> Tail 2, linked to tail 1, that is linked to [...]
				> Left Wing, linkrf yo body, [...]

		This is made in order to make an animation on a specific node affects their children too

		A block "set" looks like this :

		<div class="exampleNode node">					Node div
			<div class="exampleBlock node">				Block div
				<div class="item index1"></div>			
				<div class="item index2"></div>			From .index1 to .index6 are
				<div class="item index3"></div>			all the div that are used
				<div class="item index4"></div>			to create a 3D block
				<div class="item index5"></div>			(do not touch them preferably)
				<div class="item index6"></div>			
			</div>																
			[...]																	Here go the children of .exampleNode (aKa other block "set")
		</div>																	End of node
	-->
	<div class="container">
		<div class="items node mainNode">
			<div class="bodyNode node">
				<div class="bodyBlock node">
					<div class="item index1"></div>
					<div class="item index2"></div>
					<div class="item index3"></div>
					<div class="item index4"></div>
					<div class="item index5"></div>
					<div class="item index6"></div>
				</div>
				<div class="headNode1 node">
					<div class="headBlock1 node">
						<div class="item index1"></div>
						<div class="item index2"></div>
						<div class="item index3"></div>
						<div class="item index4"></div>
						<div class="item index5"></div>
						<div class="item index6"></div>
					</div>
					<div class="eyeNode1 node">
						<div class="eyeBlock1 node">
							<div class="item index1"></div>
							<div class="item index2"></div>
							<div class="item index3"></div>
							<div class="item index4"></div>
							<div class="item index5"></div>
							<div class="item index6"></div>
						</div>
					</div>
					<!-- /.eyeNode1 node -->
					<div class="eyeNode2 node">
						<div class="eyeBlock2 node">
							<div class="item index1"></div>
							<div class="item index2"></div>
							<div class="item index3"></div>
							<div class="item index4"></div>
							<div class="item index5"></div>
							<div class="item index6"></div>
						</div>
					</div>
					<!-- /.eyeNode2 node -->
				</div>
				<!-- /.headNode1 node -->
				<div class="tailNode1 node">
					<div class="tailBlock1 node">
						<div class="item index1"></div>
						<div class="item index2"></div>
						<div class="item index3"></div>
						<div class="item index4"></div>
						<div class="item index5"></div>
						<div class="item index6"></div>
					</div>
					<div class="tailNode2 node">
						<div class="tailBlock2 node">
							<div class="item index1"></div>
							<div class="item index2"></div>
							<div class="item index3"></div>
							<div class="item index4"></div>
							<div class="item index5"></div>
							<div class="item index6"></div>
						</div>
						<div class="tailNode3 node">
							<div class="tailBlock3 node">
								<div class="item index1"></div>
								<div class="item index2"></div>
								<div class="item index3"></div>
								<div class="item index4"></div>
								<div class="item index5"></div>
								<div class="item index6"></div>
							</div>
						</div>
						<!-- /.tailNode2 node -->
					</div>
					<!-- /.tailNode2 node -->
				</div>
				<!-- /.tailNode1 node -->
				<div class="rWingNode1 node">
					<div class="rWingBlock1 node">
						<div class="item index1"></div>
						<div class="item index2"></div>
						<div class="item index3"></div>
						<div class="item index4"></div>
						<div class="item index5"></div>
						<div class="item index6"></div>
					</div>
				</div>
				<!-- /.rWingNode1 node -->
				<div class="rWingNode2 node">
					<div class="rWingBlock2 node">
						<div class="item index1"></div>
						<div class="item index2"></div>
						<div class="item index3"></div>
						<div class="item index4"></div>
						<div class="item index5"></div>
						<div class="item index6"></div>
					</div>
				</div>
				<!-- /.rWingNode2 node -->
				<div class="lWingNode1 node">
					<div class="lWingBlock1 node">
						<div class="item index1"></div>
						<div class="item index2"></div>
						<div class="item index3"></div>
						<div class="item index4"></div>
						<div class="item index5"></div>
						<div class="item index6"></div>
					</div>
				</div>
				<!-- /.lWingNode1 node -->
				<div class="lWingNode2 node">
					<div class="lWingBlock2 node">
						<div class="item index1"></div>
						<div class="item index2"></div>
						<div class="item index3"></div>
						<div class="item index4"></div>
						<div class="item index5"></div>
						<div class="item index6"></div>
					</div>
				</div>
				<!-- /.lWingNode2 node -->
			</div>
			<!-- /.body node -->
		</div>
		<!-- /.items node mainNode -->
	</div>
            
          
!
            
              body{
	color: #7fff00;
	background: #191919;
  margin: 0;
}

/** 3D world
 *
 * Here's the 3D world core config
 *
 */

/** 3D box
 *
 * The 3D box is the limit of the 3D that you'll create in, nothing can get out of it
 *
 */

div.container{
	width: 100vw;
	height: 100vh;
	background: #cccccc;
	position: relative;
	margin: 0 auto;
	perspective: 800px;
	overflow: hidden;
}

/** 3D world main node
 *
 * This main node if the center of everything in you 3D world (pos : 0 0 0) everything you'll going to build in will at least start from this node
 * Animating this node can be usefull to showcase your world
 *
 */

div.container .items{
	top: 50%;
	left: 50%;
	animation: rotate 10s infinite linear;
}

/** Nodes
 *
 * Nodes are dot used for two thing :
 *
 * > Nodes are the position arround which you can animate blocks linked to, that mean that you have to place the node in terms of the "previous" node (main node = 0 0 0)
 * > Blocks DIRECTLY linked to a specific node must be positionned in terms of this one on the 3D space
 *
 */

div.container .node{
	position: absolute;
	transform-style: preserve-3d;
}

/** Blocks
 *
 * Here's the basic block setup which is a basic 100*100*100px cube by default.
 *
 */

div.container .item{
	width: 100px;
	height: 100px;
	position: absolute;
	top: -50px;
	left: -50px;
	background: #292929;
}

/* Creating the cube... */

div.container .item.index1{ transform: translateZ(50px);}
div.container .item.index2{ transform: rotateY(90deg) translateZ(50px);}
div.container .item.index3{ transform: rotateY(180deg) translateZ(50px);}
div.container .item.index4{ transform: rotateY(270deg) translateZ(50px);}
div.container .item.index5{ transform: rotateX(90deg) translateZ(50px);}
div.container .item.index6{ transform: rotateX(270deg) translateZ(50px);}

/** Construction
 *
 * Construction of your 3D world start here, the idea is to have 3 elements par block : a node, a block, an item :
 *
 * Node must be the first thing you need to place in the world using translate3d and rotate3d if needed, animation of the block (and its attached block) will be made through the node
 * Once your node is placed you'll need to scale THEN place the block attached to it using scale3d, translate3d and rotate3d if needed
 * Finally you can skin the block using the .item link, if you want to skin faces differently you can used their index (.indexX) : 
 * (1 = face 2 = left side 3 = backface 4 = right side 5 = top 6 = bottom)
 *
 */

div.container .bodyNode{
	animation: fly 10s infinite linear alternate-reverse;
}

div.container .bodyBlock{
	transform: scale3d(1, 0.8, 1.4);
}

div.container .bodyBlock .item{
	background: #858E17 !important;
}

/* Head */

div.container .headNode1{
	transform: translate3d(0, 0, 70px) rotateX(-30deg);
}
div.container .headBlock1{
	transform: translate3d(0, -10px, 40px) scale3d(1, 0.6, 0.8);
}
div.container .headBlock1 .item{
	background: #6D7711 !important;
}

div.container .eyeNode1{
	transform: translate3d(25px, 0, 60px) rotateY(5deg) rotateX(10deg);
}
div.container .eyeBlock1{
	transform: translate3d(0, -10px, 0px) scale3d(0.2, 0.8, 0.6);
}
div.container .eyeBlock1 .item{
	background: #234177 !important;
}

div.container .eyeNode2{
	transform: translate3d(-25px, 0, 60px) rotateY(-5deg) rotateX(10deg);
}
div.container .eyeBlock2{
	transform: translate3d(0, -10px, 0px) scale3d(0.2, 0.8, 0.6);
}
div.container .eyeBlock2 .item{
	background: #234177 !important;
}

/* Tail */

div.container .tailNode1{
	transform: translate3d(0, 0, -60px) rotateX(10deg);
	animation: tail1 1s linear infinite alternate-reverse;
}
div.container .tailBlock1{
	transform: translate3d(0, -10px, -70px) scale3d(0.6, 0.6, 1.4);
}
div.container .tailBlock1 .item{
	background: #214575 !important;
}

div.container .tailBlock1 .item.index5{
	background: #92971C !important;
}

div.container .tailNode2{
	transform: translate3d(0, 0, -135px) rotateX(10deg);
	animation: tail2 1s linear infinite alternate-reverse;
}
div.container .tailBlock2{
	transform: translate3d(0, -20px, -70px) scale3d(0.4, 0.4, 1.4);
}
div.container .tailBlock2 .item{
	background: #23487A !important;
}

div.container .tailBlock2 .item.index5{
	background: #9EA21F !important;
}

div.container .tailNode3{
	transform: translate3d(0, 0, -135px) rotateX(10deg);
	animation: tail3 1s linear infinite alternate-reverse;
}
div.container .tailBlock3{
	transform: translate3d(0, -30px, -70px) scale3d(0.2, 0.2, 1.4);
}
div.container .tailBlock3 .item{
	background: #3163A5 !important;
}

div.container .tailBlock3 .item.index5{
	background: #B1B622 !important;
}

/* Right wings */

div.container .rWingNode1{
	transform: translate3d(-55px, -30px, 35px) rotateY(15deg);
	animation: rWing1 100ms linear infinite alternate-reverse;
}
div.container .rWingBlock1{
	transform: translate3d(-150px, 0px, 0px) scale3d(3, 0.15, 0.6);
}
div.container .rWingBlock1 .item{
	background: #79819D !important;
}

div.container .rWingNode2{
	transform: translate3d(-55px, -30px, -35px) rotateY(-15deg);
	animation: rWing2 100ms linear infinite alternate-reverse 50ms;
}
div.container .rWingBlock2{
	transform: translate3d(-130px, 0px, 0px) scale3d(2.6, 0.15, 0.6);
}
div.container .rWingBlock2 .item{
	background: #8F96B4 !important;
}

/* Left wings */

div.container .lWingNode1{
	transform: translate3d(55px, -30px, 35px) rotateY(-15deg);
	animation: lWing1 100ms linear infinite alternate-reverse;
}
div.container .lWingBlock1{
	transform: translate3d(150px, 0px, 0px) scale3d(3, 0.15, 0.6);
}
div.container .lWingBlock1 .item{
	background: #79819D !important;
}

div.container .lWingNode2{
	transform: translate3d(55px, -30px, -35px) rotateY(15deg);
	animation: lWing2 100ms linear infinite alternate-reverse 50ms;
}
div.container .lWingBlock2{
	transform: translate3d(130px, 0px, 0px) scale3d(2.6, 0.15, 0.6);
}
div.container .lWingBlock2 .item{
	background: #8F96B4 !important;
}

/** Animation
 *
 * Here are all the animation of the 3D world
 */

@keyframes rotate{
	100% {transform: rotateY(360deg);}
}

@keyframes fly{
	0%   {transform: rotateX(-20deg) rotateZ(0deg) rotateY(10deg);}
	20%  {transform: rotateX(-10deg) rotateZ(20deg) rotateY(-15deg);}
	40%  {transform: rotateX(-15deg) rotateZ(10deg) rotateY(0deg);}
	60%  {transform: rotateX(5deg) rotateZ(5deg) rotateY(-20deg);}
	80%  {transform: rotateX(20deg) rotateZ(-20deg) rotateY(15deg);}
	100% {transform: rotateX(15deg) rotateZ(10deg) rotateY(-10deg);}
}

/* Tail animation */

@keyframes tail1{
	100% {transform: translate3d(0, 0, -70px) rotateX(15deg);}
}
@keyframes tail2{
	100% {transform: translate3d(0, 0, -135px) rotateX(-10deg);}
}
@keyframes tail3{
	100% {transform: translate3d(0, 0, -135px) rotateX(-10deg);}
}

/* Wing animation */

@keyframes rWing1 {
	100% {transform: translate3d(-55px, -30px, 35px) rotateY(15deg) rotateZ(45deg);}
}
@keyframes rWing2 {
	100% {transform: translate3d(-55px, -30px, -35px) rotateY(-15deg) rotateZ(45deg);}
}
@keyframes lWing1 {
	100% {transform: translate3d(55px, -30px, 35px) rotateY(-15deg) rotateZ(-45deg);}
}
@keyframes lWing2 {
	100% {transform: translate3d(55px, -30px, -35px) rotateY(15deg) rotateZ(-45deg);}
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console