@@ -3968,13 +3968,19 @@ export class SeveranceEnvironment extends BaseEnvironment {
3968
3968
if ( bulbMeshes . length === 0 ) {
3969
3969
// Try fallback: find mesh with high white/emissive material
3970
3970
lampMesh . traverse ( ( child ) => {
3971
- if ( child . isMesh && child . material && child . material . emissive && child . material . emissive . getHex ( ) === 0xffffff ) {
3972
- bulbMeshes . push ( child ) ;
3971
+ if ( child . isMesh && child . material ) {
3972
+ // Look for bulb meshes by name or emissive property
3973
+ const isLightBulb = child . name . toLowerCase ( ) . includes ( 'bulb' ) ||
3974
+ child . name . toLowerCase ( ) . includes ( 'light' ) ||
3975
+ ( child . material . emissive && child . material . emissive . getHex ( ) === 0xffffff ) ;
3976
+ if ( isLightBulb ) {
3977
+ bulbMeshes . push ( child ) ;
3978
+ }
3973
3979
}
3974
3980
} ) ;
3975
3981
}
3976
3982
if ( bulbMeshes . length === 0 ) {
3977
- console . warn ( '[Lamp Shader] No bulb mesh found in lamp.glb. No shader applied .' ) ;
3983
+ console . log ( '[Lamp Shader] No bulb mesh found in lamp.glb. Using standard material .' ) ;
3978
3984
} else {
3979
3985
const lampShaderMat = createLampLightShaderMaterial ( ) ;
3980
3986
bulbMeshes . forEach ( bulb => {
@@ -4679,7 +4685,9 @@ export class SeveranceEnvironment extends BaseEnvironment {
4679
4685
const textureLoader = new THREE . TextureLoader ( ) ;
4680
4686
4681
4687
// Create the appropriate path based on posterTitle
4682
- const basePath = getAssetPath ( `Images/performance/solo performances/${ posterTitle . toLowerCase ( ) } /` ) ;
4688
+ // Normalize title: convert to lowercase and replace spaces with hyphens
4689
+ const normalizedTitle = posterTitle . toLowerCase ( ) . replace ( / / g, '-' ) ;
4690
+ const basePath = getAssetPath ( `Images/performance/solo-performances/${ normalizedTitle } /` ) ;
4683
4691
console . log ( `Looking for images at path: ${ basePath } ` ) ;
4684
4692
4685
4693
for ( let i = 0 ; i < count ; i ++ ) {
@@ -4716,25 +4724,28 @@ export class SeveranceEnvironment extends BaseEnvironment {
4716
4724
// Get appropriate image filename based on gallery type
4717
4725
let imageName = null ;
4718
4726
4719
- if ( posterTitle === 'Circle of Confusion' ) {
4720
- // Files are named: photo_2025-05-01_17-25-22.jpg, photo_2025-05-01_17-25-22 (2).jpg, etc.
4721
- // Note: No (1) file, starts with no suffix then goes to (2)
4722
- if ( i === 0 ) {
4723
- imageName = 'photo_2025-05-01_17-25-22.jpg' ;
4724
- } else if ( i < 6 ) {
4725
- // Use (2) through (6) for indexes 1-5
4726
- imageName = `photo_2025-05-01_17-25-22 (${ i + 1 } ).jpg` ;
4727
- }
4728
- } else if ( posterTitle === 'Dissolve' ) {
4729
- // Files are named: سی پرفورمنس ،سی هنرمند، سی روز 3.jpg, سی پرفورمنس ،سی هنرمند، سی روز 3 (1).jpg, etc.
4730
- if ( i === 0 ) {
4731
- imageName = 'سی پرفورمنس ،سی هنرمند، سی روز 3.jpg' ;
4732
- } else if ( i < 18 ) { // We have up to (18)
4733
- imageName = `سی پرفورمنس ،سی هنرمند، سی روز 3 (${ i } ).jpg` ;
4734
- }
4735
- } else if ( posterTitle === 'Friends' ) {
4736
- // Files have various names, map them explicitly
4737
- const friendsImages = [
4727
+ // Define simple image arrays for each gallery
4728
+ const imageArrays = {
4729
+ 'Circle of Confusion' : [
4730
+ 'photo_2025-05-01_17-25-22.jpg' ,
4731
+ 'photo_2025-05-01_17-25-22_(2).jpg' ,
4732
+ 'photo_2025-05-01_17-25-22_(3).jpg' ,
4733
+ 'photo_2025-05-01_17-25-22_(4).jpg' ,
4734
+ 'photo_2025-05-01_17-25-22_(5).jpg' ,
4735
+ 'photo_2025-05-01_17-25-22_(6).jpg'
4736
+ ] ,
4737
+ 'Dissolve' : [
4738
+ 'dissolve-base.jpg' ,
4739
+ 'dissolve-1.jpg' ,
4740
+ 'dissolve-2.jpg' ,
4741
+ 'dissolve-3.jpg' ,
4742
+ 'dissolve-4.jpg' ,
4743
+ 'dissolve-5.jpg' ,
4744
+ 'dissolve-6.jpg' ,
4745
+ 'dissolve-7.jpg' ,
4746
+ 'dissolve-8.jpg'
4747
+ ] ,
4748
+ 'Friends' : [
4738
4749
'photo_2025-05-01_17-29-01.jpg' ,
4739
4750
'M2RjNjJmMjZk.jpg' ,
4740
4751
'NzIwYjJkZmQ1.jpg' ,
@@ -4743,15 +4754,13 @@ export class SeveranceEnvironment extends BaseEnvironment {
4743
4754
'MGE1ZjJiODcw.jpg' ,
4744
4755
'YmQ4YmZlY2U4.jpg' ,
4745
4756
'N2MyYTc3OWFj.jpg' ,
4746
- 'NDc1MWY3OGM2.jpg' ,
4747
- 'M2MwYmIyMzY4.jpg' ,
4748
- 'NDc2M2NhOTc3.jpg' ,
4749
- 'MzkyNmRjZDFm.jpg' ,
4750
- 'ZDY5ZmU5Njg2.jpg'
4751
- ] ;
4752
- if ( i < friendsImages . length ) {
4753
- imageName = friendsImages [ i ] ;
4754
- }
4757
+ 'NDc1MWY3OGM2.jpg'
4758
+ ]
4759
+ } ;
4760
+
4761
+ const availableImages = imageArrays [ posterTitle ] || [ ] ;
4762
+ if ( i < availableImages . length ) {
4763
+ imageName = availableImages [ i ] ;
4755
4764
}
4756
4765
4757
4766
let imageMaterial ;
@@ -6334,7 +6343,8 @@ function createKrugerTextTexture(text, { width = 1024, height = 256, bgColor = '
6334
6343
// Helper function to get image paths for a given poster title
6335
6344
const getArtPosterImagePaths = ( title ) => {
6336
6345
// Path that matches the known directory structure
6337
- const correctBasePath = getAssetPath ( `assets/Images/performance/solo performances/${ title . toLowerCase ( ) } /` ) ;
6346
+ const normalizedTitle = title . toLowerCase ( ) . replace ( / / g, '-' ) ;
6347
+ const correctBasePath = getAssetPath ( `assets/Images/performance/solo-performances/${ normalizedTitle } /` ) ;
6338
6348
const urls = [ ] ;
6339
6349
let count = 0 ;
6340
6350
@@ -6347,22 +6357,30 @@ const getArtPosterImagePaths = (title) => {
6347
6357
}
6348
6358
6349
6359
if ( title === 'Circle of Confusion' ) {
6350
- count = 6 ;
6351
- const baseFileName = 'photo_2025-05-01_17-25-22' ;
6352
- for ( let i = 0 ; i < count ; i ++ ) {
6353
- if ( i === 0 ) {
6354
- pushUrl ( `${ correctBasePath } ${ baseFileName } .jpg` ) ;
6355
- } else {
6356
- pushUrl ( `${ correctBasePath } ${ baseFileName } (${ i + 1 } ).jpg` ) ;
6357
- }
6358
- }
6360
+ // Use the actual file names that exist in the directory
6361
+ const circleImages = [
6362
+ 'photo_2025-05-01_17-25-22.jpg' ,
6363
+ 'photo_2025-05-01_17-25-22_(2).jpg' ,
6364
+ 'photo_2025-05-01_17-25-22_(3).jpg' ,
6365
+ 'photo_2025-05-01_17-25-22_(4).jpg' ,
6366
+ 'photo_2025-05-01_17-25-22_(5).jpg' ,
6367
+ 'photo_2025-05-01_17-25-22_(6).jpg'
6368
+ ] ;
6369
+ circleImages . forEach ( imgName => {
6370
+ pushUrl ( `${ correctBasePath } ${ imgName } ` ) ;
6371
+ } ) ;
6359
6372
} else if ( title === 'Dissolve' ) {
6360
- count = 14 ; // Reduce to 14 images based on error messages
6361
- const baseFileName = 'سی پرفورمنس ،سی هنرمند، سی روز 3' ; // Changed to use spaces instead of plus signs
6362
- pushUrl ( `${ correctBasePath } ${ baseFileName } .jpg` ) ;
6363
- for ( let i = 1 ; i < count ; i ++ ) {
6364
- pushUrl ( `${ correctBasePath } ${ baseFileName } (${ i } ).jpg` ) ;
6365
- }
6373
+ // Use the actual file names that exist in the directory
6374
+ const dissolveImages = [
6375
+ 'dissolve-base.jpg' , 'dissolve-1.jpg' , 'dissolve-2.jpg' , 'dissolve-3.jpg' ,
6376
+ 'dissolve-4.jpg' , 'dissolve-5.jpg' , 'dissolve-6.jpg' , 'dissolve-7.jpg' ,
6377
+ 'dissolve-8.jpg' , 'dissolve-9.jpg' , 'dissolve-10.jpg' , 'dissolve-11.jpg' ,
6378
+ 'dissolve-12.jpg' , 'dissolve-13.jpg' , 'dissolve-14.jpg' , 'dissolve-15.jpg' ,
6379
+ 'dissolve-16.jpg' , 'dissolve-17.jpg' , 'dissolve-18.jpg'
6380
+ ] ;
6381
+ dissolveImages . forEach ( imgName => {
6382
+ pushUrl ( `${ correctBasePath } ${ imgName } ` ) ;
6383
+ } ) ;
6366
6384
} else if ( title === 'Friends' ) {
6367
6385
const friendsImages = [
6368
6386
'photo_2025-05-01_17-29-01.jpg' , 'M2RjNjJmMjZk.jpg' , 'NzIwYjJkZmQ1.jpg' ,
0 commit comments