@@ -1660,8 +1660,10 @@ var AcfunFormat = (function () {
16601660
16611661 AcfunFormat . JSONParser = function ( params ) {
16621662 this . _logBadComments = true ;
1663+ this . _logNotImplemented = false ;
16631664 if ( typeof params === 'object' ) {
16641665 this . _logBadComments = params . logBadComments === false ? false : true ;
1666+ this . _logNotImplemented = params . logNotImplemented === true ? true : false ;
16651667 }
16661668 } ;
16671669
@@ -1719,7 +1721,9 @@ var AcfunFormat = (function () {
17191721 case 6 : data . align = 2 ; break ;
17201722 case 8 : data . align = 3 ; break ;
17211723 default :
1722- console . log ( 'Cannot handle aligning to center! AlignMode=' + x . c ) ;
1724+ if ( this . _logNotImplemented ) {
1725+ console . log ( 'Cannot handle aligning to center! AlignMode=' + x . c ) ;
1726+ }
17231727 }
17241728 }
17251729 // Use default axis
@@ -1745,15 +1749,21 @@ var AcfunFormat = (function () {
17451749 var motion = { } ;
17461750 if ( x . z [ m ] . hasOwnProperty ( 'rx' ) && typeof x . z [ m ] . rx === 'number' ) {
17471751 // TODO: Support this
1748- console . log ( 'Encountered animated x-axis rotation. Ignoring.' ) ;
1752+ if ( this . _logNotImplemented ) {
1753+ console . log ( 'Encountered animated x-axis rotation. Ignoring.' ) ;
1754+ }
17491755 }
17501756 if ( x . z [ m ] . hasOwnProperty ( 'e' ) && typeof x . z [ m ] . e === 'number' ) {
17511757 // TODO: Support this
1752- console . log ( 'Encountered animated y-axis rotation. Ignoring.' ) ;
1758+ if ( this . _logNotImplemented ) {
1759+ console . log ( 'Encountered animated y-axis rotation. Ignoring.' ) ;
1760+ }
17531761 }
17541762 if ( x . z [ m ] . hasOwnProperty ( 'd' ) && typeof x . z [ m ] . d === 'number' ) {
17551763 // TODO: Support this
1756- console . log ( 'Encountered animated z-axis rotation. Ignoring.' ) ;
1764+ if ( this . _logNotImplemented ) {
1765+ console . log ( 'Encountered animated z-axis rotation. Ignoring.' ) ;
1766+ }
17571767 }
17581768 if ( x . z [ m ] . hasOwnProperty ( 'x' ) && typeof x . z [ m ] . x === 'number' ) {
17591769 motion . x = {
@@ -1806,8 +1816,10 @@ var AcfunFormat = (function () {
18061816 if ( x . w . hasOwnProperty ( 'l' ) && Array . isArray ( x . w . l ) ) {
18071817 if ( x . w . l . length > 0 ) {
18081818 // Filters
1809- console . log ( '[Dbg] Filters not supported! ' +
1810- JSON . stringify ( x . w . l ) ) ;
1819+ if ( this . _logNotImplemented ) {
1820+ console . log ( '[Dbg] Filters not supported! ' +
1821+ JSON . stringify ( x . w . l ) ) ;
1822+ }
18111823 }
18121824 }
18131825 }
0 commit comments