Outils pour utilisateurs

Outils du site


panda3d_installation_sur_debian

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
Prochaine révision
Révision précédente
panda3d_installation_sur_debian [2018/08/07 11:57] sergepanda3d_installation_sur_debian [2020/10/30 10:21] (Version actuelle) – ↷ Liens modifiés en raison d'un déplacement. serge
Ligne 2: Ligne 2:
  
 <WRAP center round info 60%> <WRAP center round info 60%>
-**Installation de panda3d**\\  +**Installation de Panda3d**\\  
-**Première approche**\\ +**Première approche de Panda**\\ 
 </WRAP> </WRAP>
  
-=====Insllation=====+=====Installation=====
 Il y a un paquet .deb pour Ubuntu, mais rien sur Debian. Il y a un paquet .deb pour Ubuntu, mais rien sur Debian.
  
Ligne 20: Ligne 20:
 </code> </code>
  
-  * https://github.com/panda3d/panda3d/blob/master/README.md +  * [[https://github.com/panda3d/panda3d/blob/master/README.md|Panda3d sur GitHub]] 
-  * https://www.panda3d.org/manual/index.php/Installing_Panda3D_in_Linux +  * [[https://www.panda3d.org/manual/index.php/Installing_Panda3D_in_Linux|Installation sur Linux]] 
-  * https://www.panda3d.org/manual/index.php/Building_Panda3D_from_Source +  * [[https://www.panda3d.org/manual/index.php/Building_Panda3D_from_Source|Compilation]] 
-  * https://www.panda3d.org/manual/index.php/Main_Page+  * **[[https://www.panda3d.org/manual/index.php/Main_Page|Documentation]]**
  
 =====Hello world===== =====Hello world=====
  
-<file python hello_world.py> +<file python panda_hello_world.py> 
-<?python echo "hello world!"; ?> +<#!/usr/bin/env python3
-</file> +
- +
-<code> +
-#!/usr/bin/env python3+
 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
  
 from direct.showbase.ShowBase import ShowBase from direct.showbase.ShowBase import ShowBase
- +from direct.gui.OnscreenText import OnscreenText 
 class MyApp(ShowBase): class MyApp(ShowBase):
    
     def __init__(self):     def __init__(self):
         ShowBase.__init__(self)         ShowBase.__init__(self)
 + 
 +        # Load the environment model.
 +        self.scene = self.loader.loadModel("models/environment")
 +        # Reparent the model to render.
 +        self.scene.reparentTo(self.render)
 +        # Apply scale and position transforms on the model.
 +        self.scene.setScale(0.25, 0.25, 0.25)
 +        self.scene.setPos(-8, 42, 0)
 +        textObject = OnscreenText(  text = 'Hello World !',
 +                                    pos = (-0.1, -0.8),
 +                                    scale = 0.3)
    
 app = MyApp() app = MyApp()
-app.run() +app.run()> 
-</code>+</file>
  
 Excécution de ce script avec: Excécution de ce script avec:
   python3 hello_world.py   python3 hello_world.py
 +  
 +{{ media_10:panda_hello_world.png?300 }}
  
-{{tag>moteur_de_jeux panda3D sb}}+{{tag>moteur_de_jeux sb}}
panda3d_installation_sur_debian.1533643069.txt.gz · Dernière modification : 2018/08/07 11:57 de serge