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:57] – 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 |
</ | </ | ||
- | =====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: | ||
</ | </ | ||
- | * https:// | + | * [[https:// |
- | * https:// | + | * [[https:// |
- | * https:// | + | * [[https:// |
- | * https:// | + | * **[[https:// |
=====Hello world===== | =====Hello world===== | ||
- | <file python | + | <file python |
- | <?python echo "hello world!"; | + | <# |
- | </ | + | |
- | + | ||
- | < | + | |
- | # | + | |
# -*- 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(" | ||
+ | # 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 = 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: | ||
- | {{tag> | + | {{tag> |
panda3d_installation_sur_debian.1533643069.txt.gz · Dernière modification : 2018/08/07 11:57 de serge