MCPcopy
hub / github.com/Vishal-raj-1/Awesome-JavaScript-Projects / getCurAxisDir

Function getCurAxisDir

assets/js/rubiks_cube.js:1292–1300  ·  view source on GitHub ↗

* Get current axis direction. * @param {CSS3D.Vector3} axis * @return {string} current axis direction.

(axis)

Source from the content-addressed store, hash-verified

1290 * @return {string} current axis direction.
1291 */
1292 function getCurAxisDir(axis) {
1293 if (Math.abs(axis.x) > 0.00001) {
1294 return 'x';
1295 } else if (Math.abs(axis.y) > 0.00001) {
1296 return 'y';
1297 } else {
1298 return 'z';
1299 }
1300 }
1301
1302 var Face = CSS3D.Object3D.extend({
1303 className: 'face',

Callers 1

rubiks_cube.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected