ScriptBasicsFm.dfm 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. object Form1: TForm1
  2. Left = 18
  3. Top = 53
  4. BorderIcons = [biSystemMenu, biMinimize]
  5. BorderStyle = bsSingle
  6. Caption = 'GLScene DWS2 Scripting Basics'
  7. ClientHeight = 333
  8. ClientWidth = 703
  9. Color = clBtnFace
  10. Constraints.MinHeight = 360
  11. Constraints.MinWidth = 320
  12. Font.Charset = DEFAULT_CHARSET
  13. Font.Color = clWindowText
  14. Font.Height = -11
  15. Font.Name = 'MS Sans Serif'
  16. Font.Style = []
  17. OldCreateOrder = False
  18. Position = poScreenCenter
  19. OnCreate = FormCreate
  20. PixelsPerInch = 96
  21. TextHeight = 13
  22. object Panel1: TPanel
  23. Left = 0
  24. Top = 0
  25. Width = 330
  26. Height = 333
  27. Align = alLeft
  28. Constraints.MinWidth = 330
  29. TabOrder = 0
  30. object Label1: TLabel
  31. Left = 8
  32. Top = 40
  33. Width = 145
  34. Height = 13
  35. Caption = 'GLSphere1.Behaviour[0] script'
  36. end
  37. object Label2: TLabel
  38. Left = 8
  39. Top = 184
  40. Width = 136
  41. Height = 13
  42. Caption = 'GLCube1.Behaviour[0] script'
  43. end
  44. object Button3: TButton
  45. Left = 8
  46. Top = 8
  47. Width = 113
  48. Height = 25
  49. Caption = 'Recompile Scripts'
  50. TabOrder = 0
  51. OnClick = Button3Click
  52. end
  53. object GLSphere1Script: TMemo
  54. Left = 8
  55. Top = 56
  56. Width = 313
  57. Height = 121
  58. Lines.Strings = (
  59. 'var ScriptObject : TGLBaseSceneObject;'
  60. ''
  61. 'procedure OnBeginProgram(Sender: TObject);'
  62. 'begin'
  63. ' ScriptObject:=nil;'
  64. ' if Sender is TGLBaseSceneObject then'
  65. ' ScriptObject:=TGLBaseSceneObject(Sender);'
  66. 'end;'
  67. ''
  68. 'procedure OnProgress(newTime, deltaTime : Float);'
  69. 'begin'
  70. ' if Assigned(ScriptObject) then begin'
  71. ' ScriptObject.Pitch(10*deltaTime);'
  72. ' ScriptObject.Turn(-20*deltaTime);'
  73. ' ScriptObject.Roll(15*deltaTime);'
  74. ' end;'
  75. 'end;')
  76. ScrollBars = ssBoth
  77. TabOrder = 1
  78. WordWrap = False
  79. end
  80. object CheckBox1: TCheckBox
  81. Left = 132
  82. Top = 8
  83. Width = 73
  84. Height = 17
  85. Caption = 'Cadencer'
  86. Checked = True
  87. State = cbChecked
  88. TabOrder = 2
  89. OnClick = CheckBox1Click
  90. end
  91. object GLCube1Script: TMemo
  92. Left = 8
  93. Top = 200
  94. Width = 313
  95. Height = 121
  96. Lines.Strings = (
  97. 'var ScriptObject : TGLBaseSceneObject;'
  98. ''
  99. 'procedure OnBeginProgram(Sender: TObject);'
  100. 'begin'
  101. ' ScriptObject:=nil;'
  102. ' if Sender is TGLBaseSceneObject then'
  103. ' ScriptObject:=TGLBaseSceneObject(Sender);'
  104. 'end;'
  105. ''
  106. 'procedure OnProgress(newTime, deltaTime : Float);'
  107. 'begin'
  108. ' if Assigned(ScriptObject) then begin'
  109. ' ScriptObject.Scale.X:=1.5+Cos(newTime);'
  110. ' end;'
  111. 'end;')
  112. ReadOnly = True
  113. ScrollBars = ssBoth
  114. TabOrder = 3
  115. WordWrap = False
  116. end
  117. end
  118. object GLSceneViewer1: TGLSceneViewer
  119. Left = 330
  120. Top = 0
  121. Width = 373
  122. Height = 333
  123. Camera = GLCamera1
  124. Align = alClient
  125. end
  126. object GLScene1: TGLScene
  127. Left = 336
  128. Top = 8
  129. object GLSphere1: TGLSphere
  130. Radius = 0.5
  131. BehavioursData = {
  132. 0201061654474C445753324163746976654265686176696F7572020002000906
  133. 14474C44656C7068695765625363726970744949310600}
  134. object GLCube1: TGLCube
  135. Position.Coordinates = {0000003F0000803F000000000000803F}
  136. BehavioursData = {
  137. 0201061654474C445753324163746976654265686176696F7572020002000906
  138. 14474C44656C7068695765625363726970744949310600}
  139. end
  140. end
  141. object GLCamera1: TGLCamera
  142. DepthOfView = 100
  143. FocalLength = 50
  144. Position.Coordinates = {00000000000000000000A0400000803F}
  145. object GLLightSource1: TGLLightSource
  146. ConstAttenuation = 1
  147. SpotCutOff = 180
  148. end
  149. end
  150. end
  151. object GLCadencer1: TGLCadencer
  152. Scene = GLScene1
  153. Left = 368
  154. Top = 8
  155. end
  156. object GLDelphiWebScriptII1: TGLDelphiWebScriptII
  157. Config.CompilerOptions = []
  158. Config.MaxDataSize = 0
  159. Config.Timeout = 0
  160. Left = 16
  161. Top = 72
  162. end
  163. object dws2VectorGeometryUnit1: Tdws2VectorGeometryUnit
  164. Script = GLDelphiWebScriptII1
  165. Left = 80
  166. Top = 72
  167. end
  168. object dws2ClassesUnit1: Tdws2ClassesUnit
  169. Script = GLDelphiWebScriptII1
  170. Left = 48
  171. Top = 72
  172. end
  173. object dws2GLSceneUnit1: Tdws2GLSceneUnit
  174. Script = GLDelphiWebScriptII1
  175. Left = 112
  176. Top = 72
  177. end
  178. object AsyncTimer1: TGLAsyncTimer
  179. Enabled = True
  180. OnTimer = AsyncTimer1Timer
  181. Left = 400
  182. Top = 8
  183. end
  184. end