Ooops
November 28, 2020, 02:31:21 PM

Author Topic: [bb] MIRRORIZE v1.1 by _33 [ 1+ years ago ]  (Read 539 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] MIRRORIZE v1.1 by _33 [ 1+ years ago ]
« on: June 29, 2017, 12:28:39 AM »
Title : MIRRORIZE v1.1
Author : _33
Posted : 1+ years ago

Description : It's my first attempt at making a 3D screensaver. It's not quite perfect visually, and some timing could be adjusted, but it was fun making this as I was learning Blitz3D.  So here is the code!

Some stuff you will find in there:
- Projectile management
- Procedural textures
- Physics + collision
- Screensaver options
- Fancy camera manipulations
- Lighting effects

NOTE:  Since it was designed as a screensaver, moving the mouse will stop the application!


Code :
Code: BlitzBasic
  1. AppTitle "MIRRORIZE v1.1"
  2.  
  3.         Select Left$(CommandLine$(),2)
  4.                 Case "/v"
  5.                         End
  6.                 Case "/c"
  7.             End
  8. ;               screensaver_config()
  9. ;       Default
  10. ;               screensaver()
  11.         End Select
  12.  
  13. Graphics3D 800,600,32
  14.  
  15. Const FPS = 60                            ; frames per second
  16.  
  17. Global wait_fps = CreateTimer(FPS)        ; the timer is used to wait until we reach our
  18.                                           ; desired frames per second.
  19.  
  20. ; general purpose physics constants
  21. Const GRAVITY# = .00981 * (100 / FPS)     ; adjusted with the frames per seconds
  22. Const AIR_FRICTION# = 0.01
  23. Const GROUND_FRICTION# = 0.0030
  24.  
  25. ; for collision
  26. Const projectile_type = 1
  27. Const world_type      = 2
  28. Const habitant_type   = 4
  29.  
  30. Global rox# = 0, rot# = 0, cubesize# = 0
  31. Global dist# = 40
  32.  
  33. Dim sin_tb#(1440),cos_tb#(1440)
  34. For i=0 To 1440: sin_tb#(i)=Sin(i): cos_tb#(i)=Cos(i): Next
  35.  
  36. Dim ptr_texture(0)
  37. InitTextures()
  38.  
  39. cam = CreateCamera()
  40. CameraProjMode cam,1
  41. EntityRadius cam,2
  42. EntityType cam,habitant_type
  43.  
  44. cam_out = CreateCamera()
  45. CameraProjMode cam_out,1
  46. EntityRadius cam_out,2
  47. EntityType cam_out,habitant_type
  48.  
  49. ptr_copyscreen = CreateTexture(GraphicsWidth(), GraphicsHeight(), 256)
  50.  
  51. light1 = CreateLight(3)
  52. LightColor light1, 255,0,0
  53.  
  54. light2 = CreateLight(3)
  55. LightColor light2, 0,255,0
  56.  
  57. light3 = CreateLight(3)
  58. LightColor light3, 0,0,255
  59.  
  60. light4 = CreateLight(3)
  61. LightColor light4, 255,255,255
  62. PositionEntity light4,0,0,0
  63.  
  64. obj = create_cube(32)
  65. PositionEntity obj,0,0,dist
  66. EntityShininess obj,0.75
  67. EntityColor obj, 128,128,128
  68. EntityAlpha obj,0.60
  69.  
  70. Global largeroom = create_cube(40)
  71. ScaleEntity largeroom, dist# * 3, dist#, dist# * 3
  72. FlipMesh largeroom
  73. PositionEntity largeroom, 0,0,0
  74. EntityColor largeroom,32,32,32
  75. EntityType largeroom, world_type
  76.  
  77. Global poutre1 = CreateCylinder(12)
  78. PositionEntity poutre1, dist#, 0, dist#
  79. ScaleEntity poutre1, dist# * 0.125, dist# * 0.8, dist# * 0.125
  80. EntityColor poutre1,32,32,32
  81. EntityTexture poutre1, ptr_texture(11)
  82. EntityType poutre1, world_type
  83.  
  84. Global poutre2 = CreateCylinder(12)
  85. PositionEntity poutre2, -dist#, 0, dist#
  86. ScaleEntity poutre2, dist# * 0.125, dist# * 0.8, dist# * 0.125
  87. EntityColor poutre2,32,32,32
  88. EntityTexture poutre2, ptr_texture(11)
  89. EntityType poutre2, world_type
  90.  
  91. Global poutre3 = CreateCylinder(12)
  92. PositionEntity poutre3, dist#, 0, -dist#
  93. ScaleEntity poutre3, dist# * 0.125, dist# * 0.8, dist# * 0.125
  94. EntityColor poutre3,32,32,32
  95. EntityTexture poutre3, ptr_texture(11)
  96. EntityType poutre3, world_type
  97.  
  98. Global poutre4 = CreateCylinder(12)
  99. PositionEntity poutre4, -dist#, 0, -dist#
  100. ScaleEntity poutre4, dist# * 0.125, dist# * 0.8, dist# * 0.125
  101. EntityColor poutre4,32,32,32
  102. EntityTexture poutre4, ptr_texture(11)
  103. EntityType poutre4, world_type
  104.  
  105.  
  106. Global spheer1 = CreateSphere(16)
  107. PositionEntity spheer1,dist#,dist#,dist#
  108. ScaleEntity spheer1,dist# * 0.25,dist# * 0.25,dist# * 0.25
  109. EntityColor spheer1,32,32,32
  110. EntityTexture spheer1, ptr_texture(1)
  111. EntityType spheer1, world_type
  112.  
  113. Global spheer2 = CreateSphere(16)
  114. PositionEntity spheer2,-dist#,dist#,dist#
  115. ScaleEntity spheer2,dist# * 0.25,dist# * 0.25,dist# * 0.25
  116. EntityColor spheer2,32,32,32
  117. EntityTexture spheer2, ptr_texture(1)
  118. EntityType spheer2, world_type
  119.  
  120. Global spheer3 = CreateSphere(16)
  121. PositionEntity spheer3,-dist#,-dist#,dist#
  122. ScaleEntity spheer3,dist# * 0.25,dist# * 0.25,dist# * 0.25
  123. EntityColor spheer3,32,32,32
  124. EntityTexture spheer3, ptr_texture(1)
  125. EntityType spheer3, world_type
  126.  
  127. Global spheer4 = CreateSphere(16)
  128. PositionEntity spheer4,-dist#,dist#,-dist#
  129. ScaleEntity spheer4,dist# * 0.25,dist# * 0.25,dist# * 0.25
  130. EntityColor spheer4,32,32,32
  131. EntityTexture spheer4, ptr_texture(1)
  132. EntityType spheer4, world_type
  133.  
  134. Global spheer5 = CreateSphere(16)
  135. PositionEntity spheer5,dist#,dist#,-dist#
  136. ScaleEntity spheer5,dist# * 0.25,dist# * 0.25,dist# * 0.25
  137. EntityColor spheer5,32,32,32
  138. EntityTexture spheer5, ptr_texture(1)
  139. EntityType spheer5, world_type
  140.  
  141. Global spheer6 = CreateSphere(16)
  142. PositionEntity spheer6,dist#,-dist#,dist#
  143. ScaleEntity spheer6,dist# * 0.25,dist# * 0.25,dist# * 0.25
  144. EntityColor spheer6,32,32,32
  145. EntityTexture spheer6, ptr_texture(1)
  146. EntityType spheer6, world_type
  147.  
  148. Global spheer7 = CreateSphere(16)
  149. PositionEntity spheer7,-dist#,-dist#,-dist#
  150. ScaleEntity spheer7,dist# * 0.25,dist# * 0.25,dist# * 0.25
  151. EntityColor spheer7,32,32,32
  152. EntityTexture spheer7, ptr_texture(1)
  153. EntityType spheer7, world_type
  154.  
  155. Global spheer8 = CreateSphere(16)
  156. PositionEntity spheer8,dist#,-dist#,-dist#
  157. ScaleEntity spheer8,dist# * 0.25,dist# * 0.25,dist# * 0.25
  158. EntityColor spheer8,32,32,32
  159. EntityTexture spheer8, ptr_texture(1)
  160. EntityType spheer8, world_type
  161.  
  162.  
  163. flat1 = create_flat()
  164. ScaleEntity flat1, 40,40,1
  165. PositionEntity flat1, 0,0,dist# * 2.5
  166. EntityTexture flat1, ptr_copyscreen
  167.  
  168. flat2 = create_flat()
  169. ScaleEntity flat2, 40,40,1
  170. PositionEntity flat2, -dist# * 2.5,0,0
  171. EntityTexture flat2, ptr_copyscreen
  172. RotateEntity flat2,0,90,0
  173.  
  174. flat3 = create_flat()
  175. ScaleEntity flat3, 40,40,1
  176. PositionEntity flat3, dist# * 2.5,0,0
  177. EntityTexture flat3, ptr_copyscreen
  178. RotateEntity flat3,0,-90,0
  179.  
  180. flat4 = create_flat()
  181. ScaleEntity flat4, 40,40,1
  182. PositionEntity flat4, 0,0,-dist# * 2.5
  183. EntityTexture flat4, ptr_copyscreen
  184. RotateEntity flat4,0,180,0
  185.  
  186.  
  187. Global shooting_piv1 = CreatePivot ()
  188. PositionEntity shooting_piv1,60,-38,40
  189. Global shooting_piv2 = CreatePivot ()
  190. PositionEntity shooting_piv2,60,-38,-40
  191. Global shooting_piv3 = CreatePivot ()
  192. PositionEntity shooting_piv3,-60,-38,40
  193. Global shooting_piv4 = CreatePivot ()
  194. PositionEntity shooting_piv4,-60,-38,-40
  195.  
  196.  
  197.    Collisions projectile_type, world_type,2,2
  198.    Collisions projectile_type, projectile_type, 1, 2
  199.    Collisions projectile_type, habitant_type, 1, 2
  200.  
  201.    Collisions habitant_type, world_type, 2, 2
  202.  
  203. switch_frame = 1
  204. rrange = 2
  205.  
  206. Global shot_timer = 0, shots = 0, wp = 0
  207.  
  208. Repeat
  209.  
  210.    If shots = 0 Then
  211.       If Rand (1,500) = 200 Then
  212.          shooting_point = 1
  213.          shots = Rand(10,50)
  214.          wp = Rand (1,5)
  215.       EndIf
  216.    Else
  217.       If shot_timer = 0 Then
  218.          Select shooting_point
  219.             Case 1  fire_projectile(shooting_piv1)
  220.             Case 2  fire_projectile(shooting_piv2)
  221.             Case 3  fire_projectile(shooting_piv3)
  222.             Case 4  fire_projectile(shooting_piv4)
  223.          End Select
  224.          shots = shots - 1
  225.          shooting_point = shooting_point + 1 : If shooting_point > 4 Then shooting_point = 1
  226.       EndIf
  227.       shot_timer = shot_timer - 1
  228.    EndIf
  229.  
  230.  
  231.    object_handle()
  232.  
  233.    If switch_frame = Rand(1,3) Then
  234.       show_barcode = Rand(0,1)
  235.       If show_barcode = 1 Then
  236.          SetBuffer TextureBuffer(ptr_copyscreen)
  237.          display_barcode()
  238.          SetBuffer BackBuffer()
  239.       Else
  240.          SetBuffer TextureBuffer(ptr_copyscreen)
  241.          ClsColor 0,0,0
  242.          Cls
  243.          SetBuffer BackBuffer()
  244.  
  245.       EndIf
  246.    EndIf
  247.    If show_barcode = 0 Then
  248.       CopyRect 0,0,GraphicsWidth(), GraphicsHeight(),-1,-1,BackBuffer(),TextureBuffer(ptr_copyscreen)
  249.    EndIf
  250.  
  251.    Flip
  252.    UpdateWorld
  253.    WaitTimer wait_fps
  254.    RenderWorld
  255.  
  256.    PositionEntity light1, sin_tb#(rot) * 20, 0, cos_tb#(rot) * 20 + dist# * 2
  257.    PointEntity light1, obj
  258.  
  259.    PositionEntity light2, cos_tb#(rot) * 20, sin_tb#(rot) * 20, dist# * 2
  260.    PointEntity light2, obj
  261.  
  262.    PositionEntity light3, sin_tb#(rot) * 20, cos_tb#(rot) * 20, sin_tb#(rot) * 20 + dist# * 2
  263.    PointEntity light3, obj
  264.  
  265.    TurnEntity light4,0,-1,0
  266.  
  267.    If Rand (1,200) = 100 Then
  268.       FreeEntity obj
  269.       Select Rand (1,3)
  270.          Case 1
  271.             obj = create_cube(32)
  272.             PositionEntity obj,0,sin_tb#(rot) * 20,0
  273.          Case 2
  274.             obj = CreateSphere(32)
  275.             PositionEntity obj,0,cos_tb#(rot) * 20,0
  276.          Case 3
  277.             obj = CreateCylinder(32)
  278.             PositionEntity obj,0,sin_tb#(rot) * 20,0
  279.       End Select
  280.       Select Rand(1,2)
  281.          Case 1
  282.             EntityColor obj, 128,128,128
  283.          Case 2
  284.             c1 = Rand (0,1) * 255
  285.             c2 = Rand (0,1) * 255
  286.             c3 = Rand (0,1) * 255
  287.             EntityColor obj, c1,c2,c3
  288.       End Select
  289.  
  290.       EntityShininess obj,0.75
  291.       EntityAlpha obj,Rnd(0.5,1)
  292.  
  293.    EndIf
  294.  
  295.    PointEntity shooting_piv1, obj
  296.    PointEntity shooting_piv2, obj
  297.    PointEntity shooting_piv3, obj
  298.    PointEntity shooting_piv4, obj
  299.  
  300.  
  301.    ScaleEntity obj, Abs (sin_tb#(rot)) * cubesize#, Abs (cos_tb#(rot)) * cubesize#, Abs (sin_tb#(rot * 2)) * cubesize#
  302.    TurnEntity obj,0,cos_tb#(rot),sin_tb#(rot * 3)
  303.  
  304.    rot# = (rot# + 1) : If rot# > 360.0 Then rot# = rot# - 360.0
  305.    rox# = (rox# + 0.1) : If rox# > 360.0 Then rox# = rox# - 360.0
  306.  
  307.  
  308.    cubesize# = Abs (sin_tb#(Int(rox# * 3))) * 15
  309.  
  310.    EntityColor obj, Abs(sin_tb#(rot * 3)) * 255,Abs(sin_tb#(rot * 3)) * 255,Abs(sin_tb#(rot * 3)) * 255
  311.  
  312.  
  313.    Select cam1_shot
  314.       Case 1
  315.          PositionEntity cam, (cos_tb#(rot)) * dist# * 2, (sin_tb#(rot)) * dist# * 0.5, (sin_tb#(rot)) * dist# * 1.5
  316.  
  317.       Case 2
  318.          PositionEntity cam, (sin_tb#(rot)) * dist# * 1.5, (cos_tb#(rot)) * dist#, (sin_tb#(rot * 2)) * dist# * 2
  319.          PointEntity cam, obj
  320.    End Select
  321.  
  322.    Select cam2_shot
  323.       Case 1
  324.          PositionEntity cam_out, (sin_tb#(rot)) * dist# * 0.5, (cos_tb#(rot)) * dist# * 0.5, (cos_tb#(rot)) * dist# * 2
  325.       Case 2
  326.          PositionEntity cam_out, (cos_tb#(rot * 2)) * dist# * 2, (sin_tb#(rot)) * dist#, (cos_tb#(rot)) * dist# * 1.5
  327.          PointEntity cam_out, cam
  328.    End Select
  329.  
  330.    ;************************************
  331.    If Rand (1,rrange) = 2 Then
  332.       switch_frame = Rand(1,3)
  333.       cam1_shot = Rand(1,2)
  334.       cam2_shot = Rand(1,2)
  335.       current_frame = switch_frame
  336.    Else
  337.       switch_frame = 0
  338.    EndIf
  339.  
  340.    Select switch_frame
  341.       Case 1
  342.          peep_selection = Rand(1,4)
  343.          Select peep_selection
  344.             Case 3  peepy = 0 :peepdir = -2
  345.             Case 2  peepx = GraphicsWidth() * 0.5 :peepdir = -2
  346.             Case 1  peepy = GraphicsHeight() * 0.5 :peepdir = 2
  347.             Case 4  peepx = 0 :peepdir = 2
  348.          End Select
  349.          rrange = Rand(50,500)
  350.       Case 2
  351.          Select Rand(1,2)
  352.             Case 1
  353.                CameraViewport cam_out,0,0,GraphicsWidth() * 0.5,GraphicsHeight()
  354.                CameraViewport cam,GraphicsWidth() * 0.5,0,GraphicsWidth() * 0.5,GraphicsHeight()
  355.             Case 2
  356.                CameraViewport cam,0,0,GraphicsWidth() * 0.5,GraphicsHeight()
  357.                CameraViewport cam_out,GraphicsWidth() * 0.5,0,GraphicsWidth() * 0.5,GraphicsHeight()
  358.          End Select
  359.          rrange = Rand(50,150)
  360.       Case 3
  361.          Select Rand(1,2)
  362.             Case 1
  363.                CameraViewport cam_out,0,0,GraphicsWidth(),GraphicsHeight() * 0.5
  364.                CameraViewport cam,0,GraphicsHeight() * 0.5,GraphicsWidth(),GraphicsHeight() * 0.5
  365.             Case 2
  366.                CameraViewport cam,0,0,GraphicsWidth(),GraphicsHeight() * 0.5
  367.                CameraViewport cam_out,0,GraphicsHeight() * 0.5,GraphicsWidth(),GraphicsHeight() * 0.5
  368.          End Select
  369.          rrange = Rand(50,150)
  370.    End Select
  371.  
  372.    If current_frame = 1 Then
  373.       CameraViewport cam,0,0,GraphicsWidth(),GraphicsHeight()
  374.  
  375.       If peep_selection = 1 Or peep_selection = 3 Then
  376.          If peep_selection = 3 Then If peepx < 0 Then peepx = 0 :  peepdir = 2 : peep_selection = 4
  377.          If peep_selection = 1 Then If peepx > (GraphicsWidth() * 0.5) Then peepx = GraphicsWidth() * 0.5 : peepdir = -2 : peep_selection = 2
  378.          CameraViewport cam_out, peepx, peepy, GraphicsWidth() * 0.5, GraphicsHeight() * 0.5
  379.          peepx = peepx + peepdir
  380.       EndIf
  381.  
  382.       If peep_selection = 2 Or peep_selection = 4 Then
  383.          If peep_selection = 2 Then If peepy < 0 Then peepy = 0 : peepdir = -2 : peep_selection = 3
  384.          If peep_selection = 4 Then If peepy > (GraphicsWidth() * 0.5) Then peepy = GraphicsHeight() * 0.5 : peepdir = 2 : peep_selection = 1
  385.          CameraViewport cam_out, peepx, peepy, GraphicsWidth() * 0.5, GraphicsHeight() * 0.5
  386.          peepy = peepy + peepdir
  387.       EndIf
  388.  
  389.    EndIf
  390.  
  391.    ;************************************
  392.  
  393.  
  394. Until GetKey() Or MouseXSpeed() Or MouseYSpeed()
  395.  
  396. End
  397.  
  398.  
  399. Function display_barcode()
  400.    x# = GraphicsWidth() - 1
  401.    y# = GraphicsHeight() - 1
  402.    
  403.    p1# = 0.66
  404.    p2# = 0.09
  405.    p3# = 0.25
  406.    bw# = Int (x# / 7.0 + 0.5)
  407.    
  408.    Color 192,192,192 : Rect 0                       , 0                , bw#                           , y# * p1#
  409.    Color 255,255,0   : Rect bw#                     , 0                , bw#                           , y# * p1#
  410.    Color 0,255,255   : Rect bw# * 2                 , 0                , bw#                           , y# * p1#
  411.    Color 0,255,0     : Rect bw# * 3                 , 0                , bw#                           , y# * p1#
  412.    Color 255,0,255   : Rect bw# * 4                 , 0                , bw#                           , y# * p1#
  413.    Color 255,0,0     : Rect bw# * 5                 , 0                , bw#                           , y# * p1#
  414.    Color 0,0,255     : Rect bw# * 6                 , 0                , bw#                           , y# * p1#
  415.  
  416.    Color 0,0,255     : Rect 0                       , y# * p1#         , bw#                           , y# * p2#
  417.    Color 0,0,0       : Rect bw#                     , y# * p1#         , bw#                           , y# * p2#
  418.    Color 255,0,255   : Rect bw# * 2                 , y# * p1#         , bw#                           , y# * p2#
  419.    Color 0,0,0       : Rect bw# * 3                 , y# * p1#         , bw#                           , y# * p2#
  420.    Color 0,255,255   : Rect bw# * 4                 , y# * p1#         , bw#                           , y# * p2#
  421.    Color 0,0,0       : Rect bw# * 5                 , y# * p1#         , bw#                           , y# * p2#
  422.    Color 192,192,192 : Rect bw# * 6                 , y# * p1#         , bw#                           , y# * p2#
  423.  
  424.    Color 32,64,96    : Rect 0                       , y# * (p1# + p2#) , x# * 0.18 + 1                 , y# * p3# + 1
  425.    Color 255,255,255 : Rect x# * 0.18               , y# * (p1# + p2#) , x# * 0.18 + 1                 , y# * p3# + 1
  426.    Color 64,0,128    : Rect x# * 0.18 * 2           , y# * (p1# + p2#) , x# * 0.18 + 1                 , y# * p3# + 1
  427.    Color 0,0,0       : Rect x# * 0.18 * 3           , y# * (p1# + p2#) , bw# * 2                       , y# * p3# + 1
  428.    Color 32,32,32    : Rect x# * 0.18 * 3 + 2 * bw# , y# * (p1# + p2#) , bw# * 0.25                    , y# * p3# + 1
  429.    Color 0,0,0       : Rect bw# * 6                 , y# * (p1# + p2#) , bw#                           , y# * p3# + 1
  430.  
  431.  
  432. End Function
  433.  
  434.  
  435. ;----------------------------------------------------------------------------------------
  436. ; Object management routines
  437. ;----------------------------------------------------------------------------------------
  438. ; regroups "maze_info" and "projectile"
  439. Type object_info
  440.    Field object_type        ; 1 = 3D model, 2 = texture
  441.    Field number             ; object position in list of objects (1 to 9 are projectiles)
  442.    Field ptr                ; this is where we point to the 3D entity
  443.    Field brush              ; points to the brush data
  444.  
  445.    Field xpos#, ypos#, zpos#
  446.    Field oldx#, oldy#, oldz#; this is used for the rotation of the object (if applicable)
  447.    Field mx, my             ; maze level coordinates
  448.  
  449.    Field cycle_timer        ; this is used for example to have a rotating object
  450.    Field cycle_increment    ; this is the cycle incrementation value (- or + values work)
  451.    Field cycle_reset        ; this is the cycle reset point
  452.    Field cycle_start        ; this is the cycle start point
  453.  
  454.    Field life               ; this is the life counter of the bullet in # of frames
  455.                             ;       (ex. 2000 = 40 seconds If life_increment is -1)
  456.    Field life_increment     ; this is used in conjunction with "life"
  457.                             ;       (use this value as 0 to have infinite life)
  458.    Field life_fade          ; 0 = no fade, 1 = fade in, 2 = fade out, 3 = fade in / out
  459.  
  460.  
  461.    Field rotate             ; indicates roughly how the object rotates
  462.                             ;       0 = no rotation
  463.                             ;       1 = full rotate on movement
  464.                             ;       2 = horizontal on movement
  465.                             ;       3 = vertical on movement
  466.                             ;       4 = horizontal on cycle
  467.                             ;       5 = vertical on cycle
  468.                             ;       6 = orbiting cycle ( orbits around xpos# and zpos#)
  469.  
  470.                             ; ************************ Physics engine / if applicable
  471.    Field use_physics_engine ; 1 = YES, 0 = NO
  472.    Field radius#            ; radius of the object (for collision detection)
  473.    Field Mass#              ; mass of the object
  474.    Field size#              ; size of the object
  475.    Field vx#,vy#,vz#        ; force vectors of the object
  476.    Field Velocity#          ; sum of all velocities
  477.  
  478. End Type
  479.  
  480.  
  481.  
  482. ;----------------------------------------------------------------------------------------
  483. Function fire_projectile(ptr_shooter)
  484. Local xx#, xy#, xz#
  485.  
  486.    Projectile_in_action = wp
  487.  
  488.    ; weapon has not yet recharged, so return
  489.   ; If shot_timer > 0 Then Return
  490.  
  491.    ; everything is fine, emit the projectile
  492.    b.object_info = summon_object.object_info (Projectile_in_action)
  493.  
  494.    If Projectile_in_action = 1 Then            ; this is the Handball
  495.       shot_timer = 15
  496.  
  497.    ElseIf Projectile_in_action = 2 Then        ; this is the Poolball
  498.       shot_timer = 35
  499.  
  500.    ElseIf Projectile_in_action = 3 Then        ; this is the Rubberdisc
  501.       shot_timer = 20
  502.  
  503.    ElseIf Projectile_in_action = 4 Then        ; this is the Beachball
  504.       shot_timer = 50
  505.  
  506.    ElseIf Projectile_in_action = 5 Then        ; this is the Amigaball
  507.       shot_timer = 20
  508.  
  509.    EndIf
  510.  
  511.    p_piv = CreatePivot()
  512.    PositionEntity p_piv, EntityX(ptr_shooter), EntityY(ptr_shooter), EntityZ(ptr_shooter)
  513.    RotateEntity p_piv, EntityPitch(ptr_shooter), EntityYaw(ptr_shooter), EntityRoll(ptr_shooter)
  514.    MoveEntity p_piv,0,1,5
  515.  
  516.    PositionEntity bptr, EntityX(ptr_shooter), EntityY(ptr_shooter), EntityZ(ptr_shooter)
  517.    EntityType bptr,projectile_type
  518.  
  519.    vectx# = EntityX(p_piv) - EntityX(ptr_shooter)
  520.    vecty# = EntityY(p_piv) - EntityY(ptr_shooter)
  521.    vectz# = EntityZ(p_piv) - EntityZ(ptr_shooter)
  522.    TFormVector vectx#, vecty#, vectz#, p_piv, ptr_camera
  523.  
  524.    bVx# = TFormedX()
  525.    bVz# = TFormedZ()
  526.    bVy# = TFormedY()
  527.  
  528.    If  Projectile_in_action = 5 Then
  529.       AlignToVector bptr, bVx#, bVy#, bVz#, 1, 1
  530.    Else
  531.       AlignToVector bptr, bVx#, bVy#, bVz#, 2, 1
  532.    EndIf
  533.  
  534.    bVelocity# = Sqr(bVx#^2 + bVy#^2 + bVz#^2)
  535.  
  536.    FreeEntity p_piv
  537.  
  538. End Function
  539.  
  540.  
  541.  
  542.  
  543. Function summon_object.object_info (ob_number, use_physics = True, use_life = True)
  544.    x.object_info = New object_info
  545.    x
  546. umber = ob_number
  547.  
  548.    Select ob_number
  549.    Case 1            ; this is the Handball
  550.       x
  551. adius# = 0.25
  552.       xsize# = x
  553. adius# * 2
  554.       xptr = CreateSphere(5)
  555.       xuse_physics_engine = use_physics
  556.       xMass# = 0.5
  557.       x
  558. otate = 1
  559.       xlife = 2000
  560.       xlife_increment = -use_life
  561.       ScaleMesh  xptr, xsize#, xsize#, xsize#
  562.       EntityRadius xptr, x
  563. adius# * 2
  564.       xrush=CreateBrush()
  565.       BrushTexture xrush,ptr_texture(23)
  566.       BrushColor xrush,255,255,255
  567.       PaintEntity xptr, xrush
  568.  
  569.    Case 2        ; this is the Poolball
  570.       x
  571. adius# = 1
  572.       xsize# = x
  573. adius# * 2
  574.       xptr = CreateSphere(7)
  575.       xuse_physics_engine = True
  576.       xMass# = 1.1
  577.       x
  578. otate = 1
  579.       xlife = 2000
  580.       xlife_increment = -use_life
  581.       ScaleMesh  xptr, xsize#, xsize#, xsize#
  582.       EntityRadius xptr, x
  583. adius# * 2
  584.       xrush=CreateBrush()
  585.       BrushTexture xrush,ptr_texture(22)
  586.       BrushColor xrush,255,255,255
  587.       PaintEntity xptr, xrush
  588.  
  589.    Case 3        ; this is the Rubberdisc
  590.       x
  591. adius# = 0.5
  592.       xsize# = x
  593. adius# * 2
  594.       xptr = CreateCylinder(10)
  595.       xuse_physics_engine = True
  596.       xMass# = 2
  597.       x
  598. otate = 2
  599.       xlife = 1000
  600.       xlife_increment = -use_life
  601.       ScaleMesh  xptr, xsize#, xsize#/5, xsize#
  602.       EntityRadius xptr, x
  603. adius# / 2.5, xsize#
  604.       xrush=CreateBrush()
  605.       BrushTexture xrush, ptr_texture(25)
  606.       BrushColor xrush,255,255,255
  607.       PaintEntity xptr, xrush
  608.  
  609.    Case 4        ; this is the Beachball
  610.       x
  611. adius# = 2.25
  612.       xsize# = x
  613. adius# * 2
  614.       xptr = CreateSphere(10)
  615.       xuse_physics_engine = True
  616.       xMass# = 2.5
  617.       x
  618. otate = 1
  619.       xlife = 2000
  620.       xlife_increment = -use_life
  621.       ScaleMesh  xptr, xsize#, xsize#, xsize#
  622.       EntityRadius xptr, x
  623. adius# * 2
  624.       xrush=CreateBrush()
  625.       BrushTexture xrush,ptr_texture(24)
  626.       BrushColor xrush,255,255,255
  627.       PaintEntity xptr, xrush
  628.  
  629.    Case 5        ; this is the Amigaball
  630.       x
  631. adius# = 0.5
  632.       xsize# = x
  633. adius# * 2
  634.       xptr = CreateSphere(6)
  635.       xuse_physics_engine = True
  636.       xMass# = 2.5
  637.       x
  638. otate = 1
  639.       xlife = 2000
  640.       xlife_increment = -use_life
  641.       ScaleMesh  xptr, xsize#, xsize#, xsize#
  642.       EntityRadius xptr, x
  643. adius# * 2
  644.       xrush=CreateBrush()
  645.       BrushTexture xrush,ptr_texture(21)
  646.       BrushColor xrush,255,255,255
  647.       PaintEntity xptr, xrush
  648.  
  649.    End Select
  650.  
  651.    Return x.object_info
  652.  
  653. End Function
  654.  
  655.  
  656.  
  657. Function object_handle()
  658. Local Hit_Habitants, Hit_World, Hit_Projectiles
  659.  
  660.    projectilecount = 0
  661.  
  662.    For b.object_info = Each object_info
  663.       If bptr = 0 Then object_deleted = True Else object_deleted = False
  664.       If b.object_info = Null Then object_deleted = True
  665.  
  666.       If Not object_deleted Then
  667.          Hit_World       = EntityCollided(bptr, world_type)
  668.          Hit_Projectiles = EntityCollided(bptr, projectile_type)
  669.          Hit_Habitants   = EntityCollided(bptr, habitant_type)
  670.          If b
  671. umber < 10 And b
  672. umber > 0 Then projectilecount = projectilecount + 1
  673.  
  674.          bOldX# = bxpos#
  675.          bOldY# = bypos#
  676.          bOldZ# = bzpos#
  677.          If buse_physics_engine <> False Then
  678.             If Hit_Projectiles Then
  679.                b.object_info = collided_with.object_info (b.object_info, Hit_Projectiles)
  680.                b.object_info = apply_physics.object_info (b.object_info, Hit_Habitants, Hit_World, Hit_Projectiles)
  681.             Else
  682.                b.object_info = apply_physics.object_info (b.object_info, Hit_Habitants, Hit_World, Hit_Projectiles)
  683.             EndIf
  684.          EndIf
  685.  
  686.       EndIf
  687.  
  688.       If Not object_deleted Then
  689.          bxpos# = EntityX#(bptr, True)
  690.          bypos# = EntityY#(bptr, True)
  691.          bzpos# = EntityZ#(bptr, True)
  692.          XAngleAdjust# = ((bxpos# - bOldX#) / b
  693. adius#) * (90.0 / Pi)
  694.          YAngleAdjust# = ((bypos# - bOldY#) / b
  695. adius#) * (90.0 / Pi)
  696.          ZAngleAdjust# = ((bzpos# - bOldZ#) / b
  697. adius#) * (90.0 / Pi)
  698.  
  699.          If b
  700. otate = 1 Then
  701.             TurnEntity bptr, ZAngleAdjust#, 0, -XAngleAdjust#, True
  702.          ElseIf b
  703. otate = 2 Then
  704.             TurnEntity bptr, 0, ZAngleAdjust# - XAngleAdjust#, 0, True
  705.          EndIf
  706.  
  707.          If blife_increment <> 0 Then
  708.             blife = blife + blife_increment
  709.             If blife = 0
  710.                FreeEntity bptr
  711.                FreeBrush brush
  712.                Delete b.object_info
  713.             ElseIf blife < 50 Then
  714.                EntityAlpha bptr,blife * 0.02
  715.             EndIf
  716.          EndIf
  717.  
  718.       EndIf
  719.  
  720.    Next
  721.  
  722. End Function
  723.  
  724.  
  725. Function collided_with.object_info(x.object_info, Entity_Hit )
  726.   ; If x.object_info = Null Then Return Null
  727.  
  728.    For b.object_info = Each object_info
  729.       If buse_physics_engine = False Then buse_physics_engine = True
  730.       If blife_increment = False Then  blife_increment = -1
  731.  
  732.       If bptr = Entity_Hit Then
  733.          xx# = xVx#
  734.          xy# = xVy#
  735.          xz# = xVz#
  736.          Velocity# = xVelocity#
  737.  
  738.          xVelocity# = GROUND_FRICTION# * bVelocity# / xMass#
  739.          xVx# = (xx# - bVelocity#)
  740.          xVy# = (xy# - bVelocity#)
  741.          xVz# = (xz# - bVelocity#)
  742.  
  743.          bVelocity# = GROUND_FRICTION# * Velocity# / bMass#
  744.          bVx# = (bVx# - xVelocity#)
  745.          bVy# = (bVy# - xVelocity#)
  746.          bVz# = (bVz# - xVelocity#)
  747.  
  748.          Return x.object_info
  749.       EndIf
  750.    Next
  751.  
  752.    Return x.object_info
  753. End Function
  754.  
  755.  
  756. Function apply_physics.object_info(x.object_info, Hit_Habitants, Hit_World, Hit_Projectiles)
  757.       Local Nx#, Ny#, Nz#, NFx#, NFy#, NFz#, VdotN#, Entity_Hit
  758.  
  759.     ;  If x.object_info = Null Then Return Null
  760.  
  761.       If Hit_World Or Hit_Habitants Or Hit_Projectiles Then
  762.          Entity_Hit = 1
  763.       Else
  764.          Entity_Hit = 0
  765.       EndIf
  766.  
  767.       If xVelocity# > 0 ; Calculate the direction vector. The direction vector has a length of 1.
  768.  
  769.          Direction_X# = xVx# / xVelocity#
  770.          Direction_Y# = xVy# / xVelocity#
  771.          Direction_Z# = xVz# / xVelocity#
  772.  
  773.          ; Compute air friction. ; Air friction is dependent on the speed of the entity, and will prevent it from accelerting forever.
  774.          xVelocity# = xVelocity# - (AIR_FRICTION# * xVelocity# * xsize# / xMass#)
  775.  
  776.          If (xVelocity# < 0) Then xVelocity# = 0
  777.  
  778.          ; Convert the entity's velocity and direction back into a motion vector.
  779.          xVx# = Direction_X# * xVelocity#
  780.          xVy# = Direction_Y# * xVelocity#
  781.          xVz# = Direction_Z# * xVelocity#
  782.  
  783.          ; If the entity collided with the level, apply ground friction.
  784.          If Entity_Hit > 0 ; Compute ground friction. Ground friction is not dependent on the speed of the entity.
  785.             xVelocity# = xVelocity# - (GROUND_FRICTION# * xVelocity# * xsize# / xMass#)
  786.          EndIf
  787.  
  788.          ; If the entity collided with the level, make it bounce.
  789.          If Entity_Hit > 0 Then
  790.             ; Calculate bounce:
  791.             ; Get the normal of the surface which the entity collided with.
  792.             Nx# = CollisionNX(xptr, 1)
  793.             Ny# = CollisionNY(xptr, 1)
  794.             Nz# = CollisionNZ(xptr, 1)
  795.             ; Compute the dot product of the entity's motion vector and the normal of the surface collided with.
  796.             VdotN# = (xVx# * Nx# + xVy# * Ny# + xVz# * Nz#)
  797.  
  798.             ; Calculate the normal force.
  799.             NFx# = -2.0 * Nx# * VdotN#
  800.             NFy# = -2.0 * Ny# * VdotN#
  801.             NFz# = -2.0 * Nz# * VdotN#
  802.  
  803.             xVx# = xVx# + NFx#
  804.             xVy# = xVy# + NFy#
  805.             xVz# = xVz# + NFz#
  806.  
  807.          EndIf
  808.  
  809.       EndIf
  810.  
  811.       ; Apply gravity:
  812.       If xuse_physics_engine = 1 Then xVy# = xVy# - GRAVITY# * xMass#
  813.  
  814.       TranslateEntity xptr, xVx#, xVy#, xVz#, True
  815.  
  816.       Return x.object_info
  817. End Function
  818.  
  819.  
  820.  
  821. ;----------------------------------------------------------------------------------------
  822. ; Setup the textures
  823. ;----------------------------------------------------------------------------------------
  824.  
  825. Function InitTextures()
  826.    Local i,j,x,y,x2,y2,xf#,yf#,r,g,b,r2,g2,b2,texture_number,number_of_textures,number_of_funcs,func$
  827.  
  828.    Restore texture_data
  829.    Read number_of_textures
  830.  
  831.    Dim ptr_texture(number_of_textures)
  832.  
  833.    For i = 1 To number_of_textures
  834.       Read texture_number
  835.       Read number_of_funcs
  836.  
  837.       For j = 1 To number_of_funcs
  838.  
  839.          Read func$
  840.  
  841.          Select Lower$(func$)
  842.  
  843.          Case "tex"
  844.             Read x,y
  845.             ptr_texture(texture_number) = CreateTexture (x, y, 1 + 2 + 256)
  846.             SetBuffer TextureBuffer (ptr_texture(texture_number))
  847.  
  848.          Case "fnt"
  849.             Read fn$, x, y, start_char, end_char
  850.             ptr_fnt = LoadFont(fn$, 85, True, False, False)
  851.             SetFont ptr_fnt
  852.             ClsColor 255,0,0
  853.             l = (end_char - start_char) + i
  854.             ch_offset = i - start_char
  855.             For k = i To l
  856.                ptr_texture(i) = CreateTexture (x, y, 256)
  857.                SetBuffer TextureBuffer (ptr_texture(i))
  858.                Cls
  859.                Color 0, 255, 0
  860.                Text 31,29,Chr$(ch_offset + k),True,True
  861.                i = i + 1
  862.             Next
  863.             FreeFont ptr_fnt
  864.  
  865.          Case "color"
  866.             Read r,g,b
  867.             Color r,g,b
  868.  
  869.          Case "fcolor"
  870.             Read r,g,b
  871.             ClsColor r,g,b
  872.  
  873.          Case "fill"
  874.             Read x1,y1,x2,y2
  875.             Rect x1,y1,x2,y2,1
  876.  
  877.          Case "rect"
  878.             Read x1,y1,x2,y2
  879.             Rect x1,y1,x2,y2,0
  880.  
  881.          Case "oval"
  882.             Read x1,y1,x2,y2
  883.             Oval x1,y1,x2,y2
  884.  
  885.          Case "scale"
  886.             Read xf#,yf#
  887.             ScaleTexture ptr_texture(texture_number),xf#,yf#
  888.  
  889.          Case "gradient"
  890.             Read r,g,b,x,y,r2,g2,b2,x2,y2
  891.             make_gradient(r,g,b,x,y,r2,g2,b2,x2,y2)
  892.  
  893.          End Select
  894.  
  895.       Next
  896.  
  897.    Next
  898.  
  899.    ptr_texture(22) = create_pox_tex    (000,255,255,000,000,255,.25,.25)
  900.    ptr_texture(23) = create_stripe_tex (2,.25,.25)
  901.    ptr_texture(24) = create_stripe_tex (1,.5,.5)
  902.  
  903. End Function
  904.  
  905.  
  906. Function clear_all_textures()
  907.    For i = 1 To number_of_textures
  908.       FreeEntity ptr_texture(texture_number)
  909.    Next
  910.  
  911. End Function
  912.  
  913.  
  914. Function make_gradient(r1, g1, b1, x1, y1, r2, g2, b2, x2, y2)
  915.    Return
  916. End Function
  917.  
  918.  
  919. Function create_pox_tex(red1, green1, blue1, red2, green2, blue2, scale_u#, scale_v#)
  920.    texture_handle = CreateTexture(32,32,256)
  921.    SetBuffer TextureBuffer(texture_handle)
  922.    Color red1,green1,blue1
  923.    Rect 0,0,32,32
  924.    Color red2,green2,blue2
  925.    Oval 0,0,16,16,1
  926.    Oval 16,16,16,16,1
  927.    ScaleTexture texture_handle, scale_u#, scale_v#
  928.    Return texture_handle
  929.  
  930. End Function
  931.  
  932.  
  933. Function create_stripe_tex(direction,scale_u#,scale_v#)
  934.    If direction = 1 Then h = 1: v = 0
  935.    If direction = 2 Then h = 0: v = 1
  936.  
  937.    texture_handle = CreateTexture(32,32,256)
  938.    SetBuffer TextureBuffer(texture_handle)
  939.    Color 255,255,0
  940.    Rect 0,0,32,32
  941.    Color 0,255,0
  942.    Rect 8 * h, 8 * v, 32 * v + 8 * h, 8 * v + 32 * h
  943.    Color 255,0,0
  944.    Rect 16 * h, 16 * v, 32 * v + 8 * h, 8 * v + 32 * h
  945.    Color 0,0,255
  946.    Rect 24 * h, 24 * v, 32 * v + 8 * h, 8 * v + 32 * h
  947.    ScaleTexture texture_handle,scale_u#,scale_v#
  948.    Return texture_handle
  949.  
  950. End Function
  951.  
  952.  
  953. ;----------------------------------------------------------------------------------------
  954. .texture_data
  955. ;----------------------------------------------------------------------------------------
  956. Data 30
  957. Data 1, 6,"tex",64,64,"color",64,128,255,"fill",0,0,64,64,"color",255,128,64,"fill",0,0,32,32,"fill",32,32,32,32
  958. Data 2, 6,"tex",64,64,"color",255,0,0,"fill",0,0,64,64,"color",0,255,0,"fill",0,0,32,32,"fill",32,32,32,32
  959. Data 3, 6,"tex",64,64,"color",0,0,255,"fill",0,0,64,64,"color",255,255,0,"fill",0,0,32,32,"fill",32,32,32,32
  960. Data 4, 6,"tex",64,64,"color",255,0,255,"fill",0,0,64,64,"color",0,255,255,"fill",0,0,32,32,"fill",32,32,32,32
  961. Data 5, 5,"tex",64,64,"color",128,64,255,"fill",0,0,64,64,"color",255,128,64,"oval",0,0,64,64
  962. Data 6, 5,"tex",64,64,"color",128,255,64,"fill",0,0,64,64,"color",128,64,255,"oval",0,0,64,64
  963. Data 7, 5,"tex",64,64,"color",0,255,0,"fill",0,0,64,64,"color",255,0,0,"oval",0,0,64,64
  964. Data 8, 5,"tex",64,64,"color",0,0,255,"fill",0,0,64,64,"color",0,255,0,"oval",0,0,64,64
  965. Data 9, 8,"tex",64,64,"color",255,255,255,"fill",0,0,64,64,"color",128,128,128,"fill",0,0,32,32,"color",64,64,64,"fill",32,32,32,32,"scale",2,2
  966. Data 10,1,"tex",64,64
  967. Data 11,7,"tex",64,64,"color",128,160,192,"fill",0,0,64,64,"color",96,128,160,"fill",0,0,32,32,"fill",32,32,32,32,"scale",1,0.1
  968. Data 12,8,"tex",64,64,"color",255,192,160,"fill",0,0,64,64,"color",0,128,255,"rect",0,0,64,64,"rect",1,1,63,63,"rect",2,1,62,63,"scale",1,0.1
  969. Data 13,0
  970. Data 14,0
  971. Data 15,0
  972. Data 16,0
  973. Data 17,2,"tex",64,64,"gradient",0,0,0,0,0,255,255,255,64,64
  974. Data 18,0
  975. Data 19,0
  976. Data 20,0
  977. Data 21,7,"tex",32,32,"color",255,255,255,"fill",0,0,32,32,"color",224,0,0,"fill",0,0,16,16,"fill",16,16,16,16,"scale",.166667,.333334
  978. Data 22,0
  979. Data 23,0
  980. Data 24,0
  981. Data 25,6,"tex",32,32,"color",0,255,0,"fill",0,0,32,32,"color",255,0,255,"fill",0,0,16,16,"fill",16,16,16,16
  982. Data 26,0
  983. Data 27,0
  984. Data 28,0
  985. Data 29,0
  986. Data 30,0
  987. Data 31,0
  988. Data 32,1,"fnt","Courrier New",64,64,32,96
  989.  
  990. ;----------------------------------------------------------------------------------------
  991. ; Following are a collection of segment handling routines
  992. ;----------------------------------------------------------------------------------------
  993. Function create_cube(segs=1,parent=0)
  994.    mesh=CreateMesh( parent )
  995.    For scnt=0 To 3
  996.       surf=CreateSurface( mesh )
  997.       stx#=-.5
  998.       sty#=stx
  999.       stp#=Float(1)/Float(segs)
  1000.       y#=sty
  1001.       For a=0 To segs
  1002.          x#=stx
  1003.          v#=a/Float(segs)
  1004.          For b=0 To segs
  1005.             u#=b/Float(segs)
  1006.             AddVertex(surf,x,y,0.5,u,v)
  1007.             x=x+stp
  1008.          Next
  1009.          y=y+stp
  1010.       Next
  1011.       For a=0 To segs-1
  1012.          For b=0 To segs-1
  1013.             v0 = a * (segs + 1) + b
  1014.             v1 = v0 + 1
  1015.             v2 = (a + 1) * (segs + 1) +  b + 1
  1016.             v3 = v2 - 1
  1017.             AddTriangle( surf, v0, v1, v2 )
  1018.             AddTriangle( surf, v0, v2, v3 )
  1019.          Next
  1020.       Next
  1021.       RotateMesh mesh,0,90,0
  1022.    Next
  1023.    ;top and bottom
  1024.    RotateMesh mesh,90,0,0
  1025.    For scnt=0 To 1
  1026.       surf=CreateSurface( mesh )
  1027.       stx#=-.5
  1028.       sty#=stx
  1029.       stp#=Float(1)/Float(segs)
  1030.       y#=sty
  1031.       For a=0 To segs
  1032.          x#=stx
  1033.          v#=a/Float(segs)
  1034.          For b=0 To segs
  1035.             u#=b/Float(segs)
  1036.             AddVertex(surf,x,y,0.5,u,v)
  1037.             x=x+stp
  1038.          Next
  1039.          y=y+stp
  1040.       Next
  1041.       For a=0 To segs-1
  1042.          For b=0 To segs-1
  1043.             v0=a*(segs+1)+b:v1=v0+1
  1044.             v2=(a+1)*(segs+1)+b+1:v3=v2-1
  1045.             AddTriangle( surf,v0,v1,v2 )
  1046.             AddTriangle( surf,v0,v2,v3 )
  1047.          Next
  1048.       Next
  1049.       RotateMesh mesh,180,0,0
  1050.    Next
  1051.  
  1052.    RotateMesh mesh,90,0,0
  1053.    ScaleMesh mesh,2,2,2
  1054.    UpdateNormals mesh
  1055.    Return mesh
  1056. End Function
  1057.  
  1058.  
  1059. Function create_flat(segs=1,parent=0)
  1060.    mesh=CreateMesh( parent )
  1061.  
  1062.    surf=CreateSurface( mesh )
  1063.    stx#=-.5
  1064.    sty#=stx
  1065.    stp#=Float(1)/Float(segs)
  1066.    y#=sty
  1067.    For a=0 To segs
  1068.       x#=stx
  1069.       v#=a/Float(segs)
  1070.       For b=0 To segs
  1071.          u#=b/Float(segs)
  1072.          AddVertex(surf,x,y,0.5,u,v)
  1073.          x=x+stp
  1074.       Next
  1075.       y=y+stp
  1076.    Next
  1077.    For a=0 To segs-1
  1078.       For b=0 To segs-1
  1079.          v0=a*(segs+1)+b:v1=v0+1
  1080.          v2=(a+1)*(segs+1)+b+1:v3=v2-1
  1081.          AddTriangle( surf,v0,v1,v2 )
  1082.          AddTriangle( surf,v0,v2,v3 )
  1083.       Next
  1084.    Next
  1085.  
  1086.    RotateMesh mesh,180,0,0
  1087.    ScaleMesh mesh,2,2,2
  1088.    UpdateNormals mesh
  1089.    Return mesh
  1090.  
  1091. End Function


Comments :


BlitzSupport(Posted 1+ years ago)

 Nice!


chwaga(Posted 1+ years ago)

 nice


RemiD(Posted 8 months ago)

 cool demo !thanks


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal