Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local zGL = require(game.ReplicatedStorage.zGL)
- zGL.init()
- local scene = zGL.newScene()
- local camera = zGL.newCamera(CFrame.new())
- local A = Vector3.new(-2, -2, -8)
- local B = Vector3.new(-2, -2, -12)
- local C = Vector3.new(2, -2, -12)
- local D = Vector3.new(2, -2, -8)
- local E = Vector3.new(-2, 2, -8)
- local F = Vector3.new(-2, 2, -12)
- local G = Vector3.new(2, 2, -12)
- local H = Vector3.new(2, 2, -8)
- scene:insert(zGL.newQuad(A,B,C,D, Color3.new(math.random(), math.random(), math.random())))
- scene:insert(zGL.newQuad(E,F,G,H, Color3.new(math.random(), math.random(), math.random())))
- scene:insert(zGL.newQuad(A,E,H,D, Color3.new(math.random(), math.random(), math.random())))
- scene:insert(zGL.newQuad(B,F,G,C, Color3.new(math.random(), math.random(), math.random())))
- scene:insert(zGL.newQuad(A,B,F,E, Color3.new(math.random(), math.random(), math.random())))
- scene:insert(zGL.newQuad(D,C,G,H, Color3.new(math.random(), math.random(), math.random())))
- local ang = 0
- local delta = 0
- local lastTick = tick()
- wait()
- while true do
- delta = tick() - lastTick
- lastTick = tick()
- ang = ang + 100*delta
- camera.CFrame = CFrame.new(Vector3.new(math.cos(math.rad(ang))*10, 0, math.sin(math.rad(ang))*10-10), Vector3.new(0, 0, -10))
- zGL.render(scene, camera) -- If you don't pass the camera to render function, it will use roblox camera instead.
- game:GetService("RunService").RenderStepped:wait()
- end
Add Comment
Please, Sign In to add comment