scene.lua 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. -- Generated by: /home/godlike/src/anki/vkbuilddbg/bin/gltf_importer droid.gltf /home/godlike/src/anki/samples/skeletal_animation/assets/ -rpath assets -texrpath assets
  2. local scene = getSceneGraph()
  3. local events = getEventManager()
  4. node = scene:newModelNode("droid.001", "assets/Mesh_Robot.001.ankimdl")
  5. trf = Transform.new()
  6. trf:setOrigin(Vec4.new(0.000000, 0.000000, 0.000000, 0))
  7. rot = Mat3x4.new()
  8. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  9. trf:setRotation(rot)
  10. trf:setScale(1.000000)
  11. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  12. node = scene:newGlobalIlluminationProbeNode("Cube")
  13. comp = node:getSceneNodeBase():getGlobalIlluminationProbeComponent()
  14. comp:setBoundingBox(Vec4.new(-9.643279, -9.643279, -9.643279, 0), Vec4.new(9.643279, 9.643279, 9.643279, 0))
  15. trf = Transform.new()
  16. trf:setOrigin(Vec4.new(0.000000, 11.057286, 0.000000, 0))
  17. rot = Mat3x4.new()
  18. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  19. trf:setRotation(rot)
  20. trf:setScale(1.000000)
  21. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  22. node = scene:newReflectionProbeNode("Cube.001", Vec4.new(-9.271889, -9.271889, -9.271889, 0), Vec4.new(9.271889, 9.271888, 9.271889, 0))
  23. trf = Transform.new()
  24. trf:setOrigin(Vec4.new(0.000000, 11.057286, 0.000000, 0))
  25. rot = Mat3x4.new()
  26. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  27. trf:setRotation(rot)
  28. trf:setScale(1.000000)
  29. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  30. node = scene:newModelNode("room", "assets/room_room.ankimdl")
  31. trf = Transform.new()
  32. trf:setOrigin(Vec4.new(0.000000, 11.142166, 0.000000, 0))
  33. rot = Mat3x4.new()
  34. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  35. trf:setRotation(rot)
  36. trf:setScale(9.000000)
  37. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  38. node = scene:newPointLightNode("Lamp_Orientation")
  39. lcomp = node:getSceneNodeBase():getLightComponent()
  40. lcomp:setDiffuseColor(Vec4.new(100.000000, 100.000000, 100.000000, 1))
  41. lcomp:setShadowEnabled(1)
  42. lcomp:setRadius(100.000000)
  43. trf = Transform.new()
  44. trf:setOrigin(Vec4.new(4.076245, 5.903862, -1.005454, 0))
  45. rot = Mat3x4.new()
  46. rot:setAll(-0.290865, -0.771101, 0.566393, 0.000000, -0.055189, 0.604525, 0.794672, 0.000000, -0.955171, 0.199883, -0.218391, 0.000000)
  47. trf:setRotation(rot)
  48. trf:setScale(1.000000)
  49. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  50. node = scene:newPerspectiveCameraNode("Camera_Orientation")
  51. scene:setActiveCameraNode(node:getSceneNodeBase())
  52. frustumc = node:getSceneNodeBase():getFrustumComponent()
  53. frustumc:setPerspective(0.100000, 100.000000, getMainRenderer():getAspectRatio() * 0.750416, 0.750416)
  54. trf = Transform.new()
  55. trf:setOrigin(Vec4.new(5.526846, 8.527484, -6.015655, 0))
  56. rot = Mat3x4.new()
  57. rot:setAll(-0.712312, -0.312519, 0.628445, 0.000000, 0.000000, 0.895396, 0.445271, 0.000000, -0.701863, 0.317172, -0.637801, 0.000000)
  58. trf:setRotation(rot)
  59. trf:setScale(1.000000)
  60. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  61. node = scene:newModelNode("room.001", "assets/room.001_room.red.ankimdl")
  62. trf = Transform.new()
  63. trf:setOrigin(Vec4.new(0.000000, 11.142166, 0.000000, 0))
  64. rot = Mat3x4.new()
  65. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  66. trf:setRotation(rot)
  67. trf:setScale(9.000000)
  68. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  69. node = scene:newModelNode("room.002", "assets/room.002_room.green.ankimdl")
  70. trf = Transform.new()
  71. trf:setOrigin(Vec4.new(0.000000, 11.142166, 0.000000, 0))
  72. rot = Mat3x4.new()
  73. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  74. trf:setRotation(rot)
  75. trf:setScale(9.000000)
  76. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)
  77. node = scene:newModelNode("room.003", "assets/room.003_room.blue.ankimdl")
  78. trf = Transform.new()
  79. trf:setOrigin(Vec4.new(0.000000, 11.142166, 0.000000, 0))
  80. rot = Mat3x4.new()
  81. rot:setAll(1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000)
  82. trf:setRotation(rot)
  83. trf:setScale(9.000000)
  84. node:getSceneNodeBase():getMoveComponent():setLocalTransform(trf)