Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <script async src="https://ga.jspm.io/npm:es-module-shims@1.5.1/dist/es-module-shims.js" crossorigin="anonymous"></script>
<script type="importmap">
  {
    "imports": {
      "three": "https://unpkg.com/three@0.162.0/build/three.module.js",
      "three/addons/": "https://unpkg.com/three@0.162.0/examples/jsm/"
    }
  }
</script>

<img id="logo1" style="display:none" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG8AAABoCAYAAAD/wK7YAAAAMXRFWHRDb21tZW50AFBORyBlZGl0ZWQgd2l0aCBodHRwczovL2V6Z2lmLmNvbS9vcHRpcG5n0r3WLgAAABJ0RVh0U29mdHdhcmUAZXpnaWYuY29toMOzWAAAGc5JREFUeNrtXXlM1Ne39+/313t5v/fyXtr+2li1fXWLuMQFCGtYwzIQAX2uwbqkRY1LtVZr3BqrT1NtTdUarUtcIwqRNTMDBASNuKRVG22taVXCMhNQMICY8+7n3O935jvDDMzKoMxNbga+M9/l3nPPued8zvIdNizA7TkVPzaaEkjfHEOPXu+hYYO0mekyGVriSN8SS0/p0KB9zgFt5c1RZDQlU3VrBl1pmOiTSalv/5RKm8KoTFy7i67G+eKa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pBMXpARiVIX4WzFSK1+iLg10uy5doVpv+xt1TK1CYZlkQbGX6YlxxknUzZtdW5eDMk8KkrXrdellrb4D/WLKqpeTEwA3d7SOOT9D9T7jGS3yiXoYEjR1SFaJ/mVIDdxfc2vqtXESJp6FXeaSFXevyx1nllILQKyPaA7EIhdg4yM9zR8dkt5G6LnqQ85SdUExmCVJCxxhh77W77pBHP3SsE1oHEVj+GubVNxx5JgKkpYsl7hGjGeOev/h7r/j8N77pIHAIpAOGE5prsRf5hgatiVUDnNnYZtMFm3GFVtKPOlAc7h0usv66vKawpCn8Pd/3ssejLikxiBKv2/gvWdQqvQ50SaCEqCfDZ4cuT2QcX2LYYCY67uvF0jRho32n/vWC47z8Y4D3JvugE9UjQpeOp5ANytiCVGbwaomADHH9wiw8D1sSbbRwZpsXjdWkL7sO3GHXQZj0mSVDA0Zbrfa6gBG/2+8AIKgyDueQw2yvuF8eP5yog6HuXLC1Vt1vevagRckydzFXmOpdLP8JwHwiG1obEX3e1T0s7/4eO8lDryThCCKXaN3XomO02N133d5HVSVYYd6ukESqlKYm22QBGiwQ82tL//331TbvEWVx/COAownc1Ha/9FOs+fuvO/Inug8Pb9INYPi1YOp06SB/E7m/De1T4soFrIUEgAAAABJRU5ErkJggg==" alt="" />

              
            
!

CSS

              
                body {
  overflow: hidden;
  margin: 0;
}

              
            
!

JS

              
                // https://discourse.threejs.org/t/distorted-decal-texture/18442

import * as THREE from "three";
import { OrbitControls } from "three/addons/controls/OrbitControls.js";


// general setup, boring, skip to the next comment

console.clear( );

var scene = new THREE.Scene();
    scene.background = new THREE.Color( 'gainsboro' );

var camera = new THREE.PerspectiveCamera( 30, innerWidth/innerHeight );
    camera.position.set( -1, 2, -4 );
    camera.lookAt( scene.position );

var renderer = new THREE.WebGLRenderer( {antialias: true} );
    renderer.setSize( innerWidth, innerHeight );
    renderer.setAnimationLoop( animationLoop );
    document.body.appendChild( renderer.domElement );
			
window.addEventListener( "resize", (event) => {
    camera.aspect = innerWidth/innerHeight;
    camera.updateProjectionMatrix( );
    renderer.setSize( innerWidth, innerHeight );
});

var controls = new OrbitControls( camera, renderer.domElement );
    controls.enableDamping = true;

var light = new THREE.DirectionalLight( 'white', 2 );
    scene.add( light );


// procedurally defined texture

var canvas = document.createElement( 'CANVAS' );
    canvas.width = 1024;
    canvas.height = 256;

var context = canvas.getContext( '2d' );

var texture = new THREE.CanvasTexture(canvas);

	
	
// next comment

const N = 200;

var geometry = new THREE.CylinderGeometry( 0.5, 1, 1, N, 10, true ),
		position = geometry.getAttribute( 'position' ),
		material = new THREE.MeshPhongMaterial({
				shininess: 400,
				side: THREE.DoubleSide,
				map: texture,
		});

for( var i=0; i<position.count; i++ )
{
		var angle = (i/N)*2*Math.PI,
				k = 1+0.05*Math.sin(10*angle)-0.025*Math.cos(20*angle);
	
		k = k*(0.7+0.2*(Math.sin(2+1.5*position.getY(i))));
	
		position.setX( i, k*position.getX(i) );
		position.setZ( i, k*position.getZ(i) );
}

position.needsUpdate = true;
geometry.computeVertexNormals();


var object = new THREE.Mesh( geometry, material );

scene.add( object );


var logo1 = document.getElementById( 'logo1' );
var logo2 = document.getElementById( 'logo2' );

function updateCanvas( t )
{
    context.fillStyle = 'white';
    context.fillRect( 0, 0, 1024, 256 );
    context.strokeStyle = 'black';
    context.lineWidth = 10;
    context.strokeRect( 0, 2, 1024, 2 );
    context.strokeRect( 0, 251, 1024, 251 );
    context.lineWidth = 1;
		context.beginPath();
		for( var dx = 5; dx<1024; dx+=32 )
		{
				context.moveTo( dx, 0 );
				context.lineTo( dx, 256 );
		}
		for( var dy = 5; dy<256; dy+=32 )
		{
				context.moveTo( 0, dy );
				context.lineTo( 1024, dy );
		}
		context.stroke();
	
	
		var sx = 70+50*Math.sin(t/30);
		var sy = 70+50*Math.cos(t/30);
		for( var dx = 0; dx<5; dx++ )
		{	
				var x = (-t+(0.5+dx)*204.8)%1024,
						y = 80;
				context.drawImage(logo2, x, y, sx, sy);
			
				x += x>512?-1024:1024;
				context.drawImage(logo2, x, y, sx, sy);
		}

		for( var dx = 0; dx<5; dx++ )
		{	
				var x = (t+dx*204.8)%1024,
						y = 70 + 50*Math.sin(0.04*t);
				context.drawImage(logo1, x, y);
			
				x += x>512?-1024:1024;
				context.drawImage(logo1, x, y);
		}
	
	
		texture.needsUpdate = true;
}


function animationLoop( t )
{
		updateCanvas( t/10 );
	
    controls.update( );
		light.position.copy( camera.position );
    renderer.render( scene, camera );
}

              
            
!
999px

Console