« Soya/Python base 2 » : différence entre les versions

Contenu supprimé Contenu ajouté
Seb.bernery (discussion | contributions)
mAucun résumé des modifications
Seb.bernery (discussion | contributions)
Aucun résumé des modifications
Ligne 66 :
def advance_time(self, proportion):
 
# CallsAppel the super implementation ofde advance_time. ThisCeci ISest NEEDEDindispensable, ascomme sometous les objets de Soya object
# alreadyque havenous anavons advance_timedeja methoddans la méthode advance_time.
soya.Body.advance_time(self, proportion)
# RotatesTourner theun objectobjet aroundsur l'axe Y axis. The L'angle is proportional toest proportionproportionnel becausecar
# le plus gros du temps a été épuisé, nous voulons tourner dans l'ordre du lissage de l'animation.
# Presque toutes les rotations ou les mouvements se produisent dans advance_time qui a besoin
# d'être proportionnel.
<!-- # Rotates the object around Y axis. The angle is proportional to proportion because
# the more time has been spent, the more we want to rotate, in order to achieve a
# smooth animation.
# Almost every rotations or moves that occurs in advance_time should be proportional
# to proportion. -->
self.rotate_y(proportion * 5.0)
 
 
# On fait la rotation du Body dans la scène, utilisation du modèle de l'épée.
# Creates a rotating body in the scene, using the sword model.
 
sword = RotatingBody(scene, sword_model)
 
# CreatesCréation ade lightla lampe.
 
light = soya.Light(scene)
light.set_xyz(0.5, 0.0, 2.0)
 
# Création de la caméra.
# Creates a camera.
 
camera = soya.Camera(scene)