New mission: revamp the portals to make them look actually tolerable to the eye. They are currently placeholders as of now.
The Gold Network: Soyworld | SNCApedia | SoyPlace


I'm not dead, just inactive for the moment. Faggot (talk) 20:16, 9 April 2026 (UTC)

Template:3DCube/style.css: Difference between revisions

From SNCApedia, the shit nobody cares about encyclopedia
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
/* Template:3DCube/style.css */
/* Template:3DCube/style.css */
/* 2D Affine Matrix Engine for True 3D Simulation */
.scene {
.scene {
width: 200px;
width: 200px;
Line 19: Line 21:
top: 0;
top: 0;
left: 0;
left: 0;
/* This animation mathematically projects 3D rotation into 2D space */
transform-origin: 50% 50%;
animation: fake3D 8s linear infinite;
}
 
/* Bind each face to its pre-calculated 3D matrix projection */
.face-front  { animation: wall-front  8s linear infinite; }
.face-right  { animation: wall-right  8s linear infinite; }
.face-back  { animation: wall-back  8s linear infinite; }
.face-left  { animation: wall-left  8s linear infinite; }
.face-top    { animation: face-top    8s linear infinite; z-index: 4; }
.face-bottom { animation: face-bottom 8s linear infinite; z-index: 0; }
 
/* =========================================
  PRE-CALCULATED 3D -> 2D MATRIX KEYFRAMES
  ========================================= */
 
@keyframes wall-front {
0%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
12.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
25%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
37.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
50%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
62.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
75%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
87.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
100% { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
}
 
@keyframes wall-right {
0%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
12.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
25%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
37.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
50%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
62.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
75%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
87.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
100% { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
}
}


/* Offsetting the start times creates the 4 sides of the 3D box */
@keyframes wall-back {
.face-front { animation-delay: 0s; }
0%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
.face-right { animation-delay: -2s; }
12.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
.face-back { animation-delay: -4s; }
25%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
.face-left { animation-delay: -6s; }
37.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
50%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
62.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
75%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
87.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
100% { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
}
 
@keyframes wall-left {
0%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
12.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
25% { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
37.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
50%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
62.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
75% { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
87.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
100% { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
}


/* 16-step sine/cosine projection to simulate flawless 3D spinning */
@keyframes face-top {
@keyframes fake3D {
0%   { transform: matrix(1, 0, 0, 0.5, 0, -86.6); }
0%     { transform: translateX(0px) scaleX(1); z-index: 4; }
12.5%{ transform: matrix(0.707, -0.354, 0.707, 0.354, 0, -86.6); }
6.25%  { transform: translateX(38.3px) scaleX(0.924); z-index: 4; }
25% { transform: matrix(0, -0.5, 1, 0, 0, -86.6); }
12.5%   { transform: translateX(70.7px) scaleX(0.707); z-index: 4; }
37.5%{ transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, -86.6); }
18.75%  { transform: translateX(92.4px) scaleX(0.383); z-index: 3; }
50% { transform: matrix(-1, 0, 0, -0.5, 0, -86.6); }
25%     { transform: translateX(100px) scaleX(0); z-index: 3; }
62.5%{ transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, -86.6); }
31.25%  { transform: translateX(92.4px) scaleX(-0.383); z-index: 2; }
75% { transform: matrix(0, 0.5, -1, 0, 0, -86.6); }
37.5%   { transform: translateX(70.7px) scaleX(-0.707); z-index: 2; }
87.5%{ transform: matrix(0.707, 0.354, -0.707, 0.354, 0, -86.6); }
43.75%  { transform: translateX(38.3px) scaleX(-0.924); z-index: 1; }
100% { transform: matrix(1, 0, 0, 0.5, 0, -86.6); }
50%     { transform: translateX(0px) scaleX(-1); z-index: 1; }
56.25%  { transform: translateX(-38.3px) scaleX(-0.924); z-index: 1; }
62.5%   { transform: translateX(-70.7px) scaleX(-0.707); z-index: 2; }
68.75%  { transform: translateX(-92.4px) scaleX(-0.383); z-index: 2; }
75%     { transform: translateX(-100px) scaleX(0); z-index: 3; }
81.25%  { transform: translateX(-92.4px) scaleX(0.383); z-index: 3; }
87.5%   { transform: translateX(-70.7px) scaleX(0.707); z-index: 4; }
93.75%  { transform: translateX(-38.3px) scaleX(0.924); z-index: 4; }
100%   { transform: translateX(0px) scaleX(1); z-index: 4; }
}
}


/* Top/Bottom are hidden as 2D math cannot fake diagonal tumbling */
@keyframes face-bottom {
.face-top, .face-bottom {
0%  { transform: matrix(1, 0, 0, 0.5, 0, 86.6); }
display: none;
12.5%{ transform: matrix(0.707, -0.354, 0.707, 0.354, 0, 86.6); }
25%  { transform: matrix(0, -0.5, 1, 0, 0, 86.6); }
37.5%{ transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, 86.6); }
50%  { transform: matrix(-1, 0, 0, -0.5, 0, 86.6); }
62.5%{ transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, 86.6); }
75%  { transform: matrix(0, 0.5, -1, 0, 0, 86.6); }
87.5%{ transform: matrix(0.707, 0.354, -0.707, 0.354, 0, 86.6); }
100% { transform: matrix(1, 0, 0, 0.5, 0, 86.6); }
}
}

Revision as of 17:47, 11 April 2026

/* Template:3DCube/style.css */
/* 2D Affine Matrix Engine for True 3D Simulation */

.scene {
	width: 200px;
	height: 200px;
	margin: 100px auto;
	position: relative;
}

.cube {
	width: 100%;
	height: 100%;
	position: relative;
}

.cube-face {
	position: absolute;
	width: 200px;
	height: 200px;
	top: 0;
	left: 0;
	transform-origin: 50% 50%;
}

/* Bind each face to its pre-calculated 3D matrix projection */
.face-front  { animation: wall-front  8s linear infinite; }
.face-right  { animation: wall-right  8s linear infinite; }
.face-back   { animation: wall-back   8s linear infinite; }
.face-left   { animation: wall-left   8s linear infinite; }
.face-top    { animation: face-top    8s linear infinite; z-index: 4; }
.face-bottom { animation: face-bottom 8s linear infinite; z-index: 0; }

/* =========================================
   PRE-CALCULATED 3D -> 2D MATRIX KEYFRAMES
   ========================================= */

@keyframes wall-front {
	0%   { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
	12.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
	25%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
	37.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
	50%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
	62.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
	75%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
	87.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
	100% { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
}

@keyframes wall-right {
	0%   { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
	12.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
	25%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
	37.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
	50%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
	62.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
	75%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
	87.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
	100% { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
}

@keyframes wall-back {
	0%   { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
	12.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
	25%  { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
	37.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
	50%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
	62.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
	75%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
	87.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
	100% { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
}

@keyframes wall-left {
	0%   { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
	12.5%{ transform: matrix(0.707, 0.354, 0, 0.866, -70.7, 35.4); z-index: 5; }
	25%  { transform: matrix(1, 0, 0, 0.866, 0, 50); z-index: 6; }
	37.5%{ transform: matrix(0.707, -0.354, 0, 0.866, 70.7, 35.4); z-index: 5; }
	50%  { transform: matrix(0, -0.5, 0, 0.866, 100, 0); z-index: 3; }
	62.5%{ transform: matrix(-0.707, -0.354, 0, 0.866, 70.7, -35.4); z-index: 2; }
	75%  { transform: matrix(-1, 0, 0, 0.866, 0, -50); z-index: 1; }
	87.5%{ transform: matrix(-0.707, 0.354, 0, 0.866, -70.7, -35.4); z-index: 2; }
	100% { transform: matrix(0, 0.5, 0, 0.866, -100, 0); z-index: 3; }
}

@keyframes face-top {
	0%   { transform: matrix(1, 0, 0, 0.5, 0, -86.6); }
	12.5%{ transform: matrix(0.707, -0.354, 0.707, 0.354, 0, -86.6); }
	25%  { transform: matrix(0, -0.5, 1, 0, 0, -86.6); }
	37.5%{ transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, -86.6); }
	50%  { transform: matrix(-1, 0, 0, -0.5, 0, -86.6); }
	62.5%{ transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, -86.6); }
	75%  { transform: matrix(0, 0.5, -1, 0, 0, -86.6); }
	87.5%{ transform: matrix(0.707, 0.354, -0.707, 0.354, 0, -86.6); }
	100% { transform: matrix(1, 0, 0, 0.5, 0, -86.6); }
}

@keyframes face-bottom {
	0%   { transform: matrix(1, 0, 0, 0.5, 0, 86.6); }
	12.5%{ transform: matrix(0.707, -0.354, 0.707, 0.354, 0, 86.6); }
	25%  { transform: matrix(0, -0.5, 1, 0, 0, 86.6); }
	37.5%{ transform: matrix(-0.707, -0.354, 0.707, -0.354, 0, 86.6); }
	50%  { transform: matrix(-1, 0, 0, -0.5, 0, 86.6); }
	62.5%{ transform: matrix(-0.707, 0.354, -0.707, -0.354, 0, 86.6); }
	75%  { transform: matrix(0, 0.5, -1, 0, 0, 86.6); }
	87.5%{ transform: matrix(0.707, 0.354, -0.707, 0.354, 0, 86.6); }
	100% { transform: matrix(1, 0, 0, 0.5, 0, 86.6); }
}