Handbook
Glossary
main ( -- )
Vocabulary
rlgl
.
demo
Inputs
None
Outputs
None
Definition
USING:
accessors
classes.struct
math
raylib
;
IN:
rlgl.demo
::
main
( -- )
screenWidth
screenHeight
"raylib [models] example - rlgl module usage with push/pop mat..."
init-window
Camera3D
<struct>
16.0 16.0 16.0
<Vector3>
>>position
0.0 0.0 0.0
<Vector3>
>>target
0.0 1.0 0.0
<Vector3>
>>up
45.0
>>fovy
CAMERA_PERSPECTIVE
>>projection
:>
camera 0.0 0.0
:>
( earthRotation! earthOrbitRotation! )
0.0 0.0
:>
( moonRotation! moonOrbitRotation! ) 60
set-target-fps
[
camera
CAMERA_ORBITAL
update-camera
5.0
rotationSpeed
*
earthRotation
+
earthRotation! 365.0 360.0
/
5.0
rotationSpeed
*
*
rotationSpeed
*
earthOrbitRotation
+
earthOrbitRotation!
rotationSpeed
2.0
*
moonRotation
+
moonRotation!
rotationSpeed
8.0
*
moonOrbitRotation
+
moonOrbitRotation!
RAYWHITE
[
camera
[
moonRadius
moonRotation
moonOrbitRadius
moonOrbitRotation
earthRadius
earthRotation
earthOrbitRadius
earthOrbitRotation
sunRadius
draw-solar-system
0.0 0.0 0.0
<Vector3>
earthOrbitRadius
1 0 0
<Vector3>
90.0
RED
0.5
fade
draw-circle-3d
20 1.0
draw-grid
]
with-camera-3d
"EARTH ORBITING AROUND THE SUN!"
400 10 20
MAROON
draw-text
"Using Factor!"
400 40 20
GOLD
draw-text
10 10
draw-fps
]
with-drawing
]
while-window-open
close-window
;