Skip to content

Instantly share code, notes, and snippets.

@dkgrieshammer
Created June 25, 2020 17:26
Show Gist options
  • Save dkgrieshammer/f2d816b6f0ba3214833f3d28cff1e2ac to your computer and use it in GitHub Desktop.
Save dkgrieshammer/f2d816b6f0ba3214833f3d28cff1e2ac to your computer and use it in GitHub Desktop.
Transform canvas elements
.canvas_container {
position: absolute;
left: 50%;
bottom: 0px;
perspective: 1000; //fucking perpective needed :D
-webkit-perspective: 1000;
canvas {
// width: 200px !important; //important to force p5js canvas to scale
// height: 200px !important;
// transform: rotateY(20deg); //works
// transform: translateZ(-100px); //works if parent has perspective :)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment