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:44] – serge | panda3d_installation_sur_debian [2020/10/30 10:21] (Version actuelle) – ↷ Liens modifiés en raison d'un déplacement. serge | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
======Panda3d Installation sur Debian====== | ======Panda3d Installation sur Debian====== | ||
+ | |||
+ | <WRAP center round info 60%> | ||
+ | **Installation de Panda3d**\\ | ||
+ | **Première approche de Panda**\\ | ||
+ | </ | ||
+ | |||
+ | =====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. | ||
Testé sur Debian 9 Stretch en juillet 2018. | Testé sur Debian 9 Stretch en juillet 2018. | ||
- | + | < | |
- | sudo pip3 install --pre --extra-index-url https:// | + | |
- | + | ||
sudo pip3 install --pre --extra-index-url https:// | sudo pip3 install --pre --extra-index-url https:// | ||
[sudo] Mot de passe de pierre : | [sudo] Mot de passe de pierre : | ||
Ligne 14: | Ligne 18: | ||
Installing collected packages: panda3d | Installing collected packages: panda3d | ||
Successfully installed panda3d-1.10.0.dev1710 | Successfully installed panda3d-1.10.0.dev1710 | ||
+ | </ | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * **[[https:// | ||
+ | |||
+ | =====Hello world===== | ||
+ | |||
+ | <file python panda_hello_world.py> | ||
+ | <# | ||
+ | # -*- coding: utf-8 -*- | ||
- | https:// | + | from direct.showbase.ShowBase import ShowBase |
+ | from direct.gui.OnscreenText import OnscreenText | ||
- | https://www.panda3d.org/ | + | class MyApp(ShowBase): |
- | https://www.panda3d.org/ | + | |
- | https://www.panda3d.org/ | + | 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()> | ||
+ | </file> | ||
+ | Excécution de ce script avec: | ||
+ | python3 hello_world.py | ||
+ | | ||
+ | {{ media_10: | ||
- | {{tag> | + | {{tag> |
panda3d_installation_sur_debian.1533642242.txt.gz · Dernière modification : 2018/08/07 11:44 de serge