/Resources/Scripts/main_Function_setBaseFront.lua

http://github.com/thebigbang/Face_Editor · Lua · 31 lines · 17 code · 3 blank · 11 comment · 4 complexity · d19a00c4ff8fd0f2ed0045ec7ec8084a MD5 · raw file

  1. --------------------------------------------------------------------------------
  2. -- Function......... : setBaseFront
  3. -- Author........... :
  4. -- Description...... :
  5. --------------------------------------------------------------------------------
  6. --------------------------------------------------------------------------------
  7. function main.setBaseFront ( )
  8. --------------------------------------------------------------------------------
  9. local s = application.getCurrentUserScene ( )
  10. if ( s == nil )
  11. then
  12. return
  13. end
  14. local bfront = scene.createRuntimeObject( s, "front" )
  15. if ( bfront ~= nil )
  16. then
  17. this.front ( bfront )
  18. object.setUniformScale (this.front(),3)
  19. object.setRotation (this.front ( ),0,-45,0,object.kParentSpace )
  20. object.setTranslation (this.front(),0,40,0,object.kParentSpace )
  21. --on ajoute le tag au front:
  22. --bug? scene.setObjectTag (s,this.front,"front")
  23. else
  24. log.error ( "base non chargée!" )
  25. end
  26. --------------------------------------------------------------------------------
  27. end
  28. --------------------------------------------------------------------------------