@@ -20,6 +20,16 @@ export class SimpleIntegration {
2020 private frameCount : number = 0 ;
2121 private lastFrameNumber : number = 0 ;
2222 private debugVisualization : DebugVisualization ;
23+ private addedCredits : Set < string > = new Set ( ) ;
24+
25+ private addCreditToHTML ( credit : any ) : void {
26+ const creditText = credit . text || credit . html || credit . toString ( ) ;
27+ if ( creditText && ! this . addedCredits . has ( creditText ) ) {
28+ this . addedCredits . add ( creditText ) ;
29+ const comment = document . createComment ( ` Credit: ${ creditText } ` ) ;
30+ document . head . appendChild ( comment ) ;
31+ }
32+ }
2333
2434 constructor ( babylonScene : any , camera : Camera , engine : Engine ) {
2535 this . camera = camera ;
@@ -201,10 +211,10 @@ export class SimpleIntegration {
201211 pass : ( Cesium as any ) . Pass ? ( Cesium as any ) . Pass . RENDER : 0 ,
202212 // Let Cesium use its default maximumScreenSpaceError for Google tiles
203213 tilesetPassState : this . renderTilesetPassState , // Required by CesiumTilesetDerived
204- // CREDIT DISPLAY: Disabled to prevent image downloads
214+ // CREDIT DISPLAY: Add credits as HTML comments once
205215 creditDisplay : {
206- addCreditToNextFrame : ( _credit : any ) => {
207- // Don't process credits to avoid downloading credit images
216+ addCreditToNextFrame : ( credit : any ) => {
217+ this . addCreditToHTML ( credit ) ;
208218 } ,
209219 } ,
210220 // Additional properties from working commit 72dfb2e:
0 commit comments