Die Welt ist nicht rund (3D) von ???
Ein kleines Testprogramm für ein Bildschirmschoner. Ist aber noch nicht fertig...

Aber hier kann man erkennen für was Pivots gut sind...

[code:1:9ced9d3b3f]
Graphics3D 800,600,32,2
SetBuffer BackBuffer()

SeedRnd(MilliSecs())

;---

piv = CreatePivot()

cam = CreateCamera(piv)

light = CreateLight(1,cam)
LightColor light,255,255,255

MoveEntity cam,0,0,-50

;---

Type obj

Field test

Field xr#
Field yr#

Field d#

Field r
Field g
Field b

End Type

Global o.obj

;---

piece = 500

createOBJ(piece)

;---

timer = CreateTimer(30)

;---

While Not (KeyHit(1) Or KeyHit(57))

If KeyDown(200) Then TurnEntity piv, 1, 0, 0
If KeyDown(208) Then TurnEntity piv, -1, 0, 0
If KeyDown(203) Then TurnEntity piv, 0,-1, 0
If KeyDown(205) Then TurnEntity piv, 0, 1, 0
If KeyDown(201) Then MoveEntity cam, 0, 0, 1
If KeyDown(209) Then MoveEntity cam, 0, 0,-1


WaitTimer(timer)

UpdateWorld()
RenderWorld()
Flip()

Wend

End

;---

Function createOBJ(piece)

min = 30
max = 30


For i=1 To piece

o = New obj

; für eine bessere Verteilung
oxr = Rnd(0,90) * 4
oyr = Rnd(0,90) * 4

od = Rand(min,max)

o
= Rnd(100,255)
og = Rnd(100,255)
o = Rnd(100,255)

o est = CreateCube()
EntityColor o est, o
, og, o
RotateEntity o est, oxr, oyr, 0
MoveEntity o est, 0,0, od

Next

End Function
[/code:1:9ced9d3b3f]



Suche:
(unterstützt mySQL Wildcards ala %)
Titel:
Text:
Autor: