ElijahCrafter

Hologram 3D API Test

Dec 3rd, 2025 (edited)
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | Source Code | 0 0
  1. local hologram = peripheral.find("hologram")
  2. local g3d = hologram.graphics3d
  3.  
  4. hologram.clear()
  5. hologram.on()
  6.  
  7. local boxIndex = g3d.addBox(0, 0, 0, 0.5, 0.5, 0.5, 0x00FFFF, true)
  8.  
  9. -- Animate the box moving up and down
  10. local y = 0
  11. local direction = 1
  12. while true do
  13.     y = y + 0.05 * direction
  14.     if y > 1 then direction = -1 end
  15.     if y < 0 then direction = 1 end
  16.    
  17.     g3d.update(boxIndex, {y = y})
  18.     sleep(0.05)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment