local Q=require("\114\097\121\108\105\098")local z=800 local p=450 Q.SetConfigFlags(Q.FLAG_VSYNC_HINT)Q.InitWindow(z,p,"\114\097\121\108\117\097 \091\109\111\100\101\108\115\093 \101\120\097\109\112\108\101 - \103\101\111\109\101\116\114\105\099 \115\104\097\112\101\115")local U=Q.Camera3D(Q.Vector3(0,10,10),Q.Vector3(0,0,0),Q.Vector3(0,1,0),45,Q.CAMERA_PERSPECTIVE)while not Q.WindowShouldClose()do Q.BeginDrawing()Q.ClearBackground(Q.RAYWHITE)Q.BeginMode3D(U)Q.DrawCube(Q.Vector3(-4,0,2),2,5,2,Q.RED)Q.DrawCubeWires(Q.Vector3(-4,0,2),2,5,2,Q.GOLD)Q.DrawCubeWires(Q.Vector3(-4,0,-2),3,6,2,Q.MAROON)Q.DrawSphere(Q.Vector3(1,0,-2),1,Q.GREEN)Q.DrawSphereWires(Q.Vector3(1,0,2),2,16,16,Q.LIME)Q.DrawCylinder(Q.Vector3(4,0,-2),1,2,3,4,Q.SKYBLUE)Q.DrawCylinderWires(Q.Vector3(4,0,-2),1,2,3,4,Q.DARKBLUE)Q.DrawCylinderWires(Q.Vector3(4.5,-1,2),1,1,2,6,Q.BROWN)Q.DrawCylinder(Q.Vector3(1,0,-4),0,1.5,3,8,Q.GOLD)Q.DrawCylinderWires(Q.Vector3(1,0,-4),0,1.5,3,8,Q.PINK)Q.DrawGrid(10,1)Q.EndMode3D()Q.DrawFPS(10,10)Q.EndDrawing()end Q.CloseWindow()
local rl = require("raylib")

local screenWidth = 800
local screenHeight = 450

rl.SetConfigFlags(rl.FLAG_VSYNC_HINT)
rl.InitWindow(screenWidth, screenHeight, "raylua [models] example - geometric shapes")

local camera = rl.Camera3D(rl.Vector3(0, 10, 10), rl.Vector3(0, 0, 0), rl.Vector3(0, 1, 0), 45, rl.CAMERA_PERSPECTIVE)

while not rl.WindowShouldClose() do
  rl.BeginDrawing()
  rl.ClearBackground(rl.RAYWHITE)

  rl.BeginMode3D(camera)

  -- Ideally, you should cache Vector3 structures to avoid reallocating them
  -- over and over. For readability here, they are inlined to the code.

  rl.DrawCube(rl.Vector3(-4, 0, 2), 2, 5, 2, rl.RED)
  rl.DrawCubeWires(rl.Vector3(-4, 0, 2), 2, 5, 2, rl.GOLD)
  rl.DrawCubeWires(rl.Vector3(-4, 0, -2), 3, 6, 2, rl.MAROON)

  rl.DrawSphere(rl.Vector3(1, 0, -2), 1, rl.GREEN)
  rl.DrawSphereWires(rl.Vector3(1, 0, 2), 2, 16, 16, rl.LIME)

  rl.DrawCylinder(rl.Vector3(4, 0, -2), 1, 2, 3, 4, rl.SKYBLUE)
  rl.DrawCylinderWires(rl.Vector3(4, 0, -2), 1, 2, 3, 4, rl.DARKBLUE)
  rl.DrawCylinderWires(rl.Vector3(4.5, -1, 2), 1, 1, 2, 6, rl.BROWN)

  rl.DrawCylinder(rl.Vector3(1, 0, -4), 0, 1.5, 3, 8, rl.GOLD)
  rl.DrawCylinderWires(rl.Vector3(1, 0, -4), 0, 1.5, 3, 8, rl.PINK)

  rl.DrawGrid(10, 1)

  rl.EndMode3D()

  rl.DrawFPS(10, 10)
  rl.EndDrawing()
end

rl.CloseWindow()
