@@ -738,6 +738,39 @@ describe("IsometricRenderer depth cues", () => {
738738 expect ( frontFill ) . to . equal ( isoDepthModulate ( isoShadeFace ( base , "left" ) , 1 ) . toLowerCase ( ) ) ;
739739 } ) ;
740740
741+ it ( "should keep multi-face cube colours when depth-shaded at board rotation" , ( ) => {
742+ const draw = makeDraw ( ) ;
743+ const renderer = new IsometricRenderer ( ) ;
744+ const east = "#0000ff" ;
745+ const south = "#ffff00" ;
746+ const rep : APRenderRep = {
747+ renderer : "isometric" ,
748+ board : { style : "squares" , width : 3 , height : 3 } ,
749+ legend : {
750+ D : {
751+ piece : "cube" ,
752+ height : 30 ,
753+ faces : {
754+ top : "#ff0000" ,
755+ north : "#00ff00" ,
756+ east,
757+ south,
758+ west : "#ff00ff" ,
759+ } ,
760+ } ,
761+ } ,
762+ pieces : [ [ [ ] , [ ] , [ ] ] , [ [ ] , [ { glyph : "D" } ] , [ ] ] , [ [ ] , [ ] , [ ] ] ] ,
763+ } ;
764+ renderer . render ( rep , draw , { ...baseOptions , rotate : 90 } ) ;
765+
766+ const shadedSymbol = [ ...draw . find ( "[id^='D__y1__db']" ) ] . map ( ( el ) => el . id ( ) ) [ 0 ] ;
767+ expect ( shadedSymbol ) . to . not . equal ( undefined ) ;
768+ const leftFill = rectFill ( draw , `isoRectSide30_${ shadedSymbol } _L` ) ;
769+ expect ( leftFill . startsWith ( "#0000" ) ) . to . equal ( true ) ;
770+ expect ( leftFill ) . to . not . equal ( isoShadeFace ( south , "left" ) . toLowerCase ( ) ) ;
771+ expect ( leftFill ) . to . not . equal ( isoDepthModulate ( isoShadeFace ( south , "left" ) , 0.5 ) . toLowerCase ( ) ) ;
772+ } ) ;
773+
741774 it ( "should omit depth-shaded symbols when no-iso-depth-shade is set" , ( ) => {
742775 const draw = makeDraw ( ) ;
743776 const renderer = new IsometricRenderer ( ) ;
0 commit comments