panda3d_installation_sur_debian
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| panda3d_installation_sur_debian [2018/08/07 11:53] – serge | panda3d_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 |
| </ | </ | ||
| + | =====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 19: | Ligne 20: | ||
| </ | </ | ||
| - | * https:// | + | * [[https:// |
| - | * https:// | + | * [[https:// |
| - | * https:// | + | * [[https:// |
| - | * https:// | + | * **[[https:// |
| + | =====Hello world===== | ||
| - | {{tag> | + | <file python panda_hello_world.py> |
| + | <# | ||
| + | # -*- coding: utf-8 -*- | ||
| + | |||
| + | from direct.showbase.ShowBase import ShowBase | ||
| + | from direct.gui.OnscreenText import OnscreenText | ||
| + | |||
| + | class MyApp(ShowBase): | ||
| + | |||
| + | def __init__(self): | ||
| + | ShowBase.__init__(self) | ||
| + | |||
| + | # Load the environment model. | ||
| + | self.scene = self.loader.loadModel(" | ||
| + | # Reparent the model to render. | ||
| + | self.scene.reparentTo(self.render) | ||
| + | # Apply scale and position transforms on the model. | ||
| + | self.scene.setScale(0.25, | ||
| + | self.scene.setPos(-8, | ||
| + | textObject = OnscreenText( | ||
| + | pos = (-0.1, -0.8), | ||
| + | scale = 0.3) | ||
| + | |||
| + | app = MyApp() | ||
| + | app.run()> | ||
| + | </ | ||
| + | |||
| + | Excécution de ce script avec: | ||
| + | python3 hello_world.py | ||
| + | |||
| + | {{ media_10: | ||
| + | |||
| + | {{tag> | ||
panda3d_installation_sur_debian.1533642803.txt.gz · Dernière modification : de serge
