Outils pour utilisateurs

Outils du site


playground:musicspacial

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Dernière révisionLes deux révisions suivantes
playground:musicspacial [2017/05/12 20:07] falsamplayground:musicspacial [2018/01/11 02:03] falsam
Ligne 4: Ligne 4:
  
 <file purebasic  14-MusicSpacial.sb> <file purebasic  14-MusicSpacial.sb>
 +;Babylon.sbi - Music Spatial
  
 EnableExplicit EnableExplicit
Ligne 10: Ligne 11:
 UseModule BJS UseModule BJS
  
-Global Scene, Camera, Light, Sound1, Sound2, Ground, GroundMat, Pole1, Pole2+Global Scene, Camera, Light, Sound1, Sound2, Ground, GroundTex, GroundMat, Pole1, Pole2
    
 Declare LoadGame() Declare LoadGame()
Ligne 27: Ligne 28:
          
     ;Camera     ;Camera
-    Camera = CreateCamera("camera", 0, 40, 20, #Free)+    Camera = CreateCamera("camera", 0, 40, 20, #BJS_Free)
     CameraBodySize(Camera, 2, 20, 2)     CameraBodySize(Camera, 2, 20, 2)
     CameraLookAt(Camera, 0, 10, 1000)     CameraLookAt(Camera, 0, 10, 1000)
     ClearScene(RGB(0, 0, 0))     ClearScene(RGB(0, 0, 0))
-    Light = CreateLight("Light", 0, 100, 0, 1, #Point)+    Light = CreateLight("Light", 0, 100, 0, 1, #BJS_Point)
          
     ;Ground     ;Ground
     Ground = CreateGround("Ground", 5000, 5000, 4)     Ground = CreateGround("Ground", 5000, 5000, 4)
-    GroundMat CreateMaterial("Ground", "data/textures/Beton1.png")+    GroundTex LoadTexture("Ground", "data/textures/Beton1.png"
 +    GroundMat = CreateMaterial("Ground"
 +    SetMaterialTexture(GroundMat, #BJS_Diffuse, GroundTex)
     ScaleMaterial(GroundMat, 40, 40)     ScaleMaterial(GroundMat, 40, 40)
-    SetMaterial(Ground, GroundMat)    +    SetMeshMaterial(Ground, GroundMat)    
          
     ;Music Pole     ;Music Pole
     Pole1 = CreateSphere("Sound1", 10)     Pole1 = CreateSphere("Sound1", 10)
     MoveMesh(Pole1, -100, 30, 200)     MoveMesh(Pole1, -100, 30, 200)
-    MusicAttachToMesh(Sound1, Pole1)+    MusicAttachToMesh(Pole1, Sound1)
            
     Pole2 = CreateSphere("Sound2", 10)     Pole2 = CreateSphere("Sound2", 10)
     MoveMesh(Pole2, 100, 30, 200)     MoveMesh(Pole2, 100, 30, 200)
-    MusicAttachToMesh(Sound2, Pole2)+    MusicAttachToMesh(Pole2, Sound2)
                
     RenderLoop(@RenderGame())     RenderLoop(@RenderGame())
playground/musicspacial.txt · Dernière modification : 2023/03/15 15:49 de 127.0.0.1