думаю пригодиться кому-то
Code
Graphics3D 640,480
SetBuffer BackBuffer()
light=CreateLight()
pivot=CreatePivot()
z_cam=CreateCamera()
cube=CreateCube(pivot)
Sphere =CreateSphere (32,pivot)
ScaleEntity Sphere ,.01,.01,.01
PositionEntity cube,0,0,10
PositionEntity pivot,0,0,2
While Not KeyHit(1)
z#=MouseZ ()
PositionEntity pivot,0,0,z#+2
If MouseDown(1)=True
x_s1=MouseX()
y_s1=MouseY()
If x_e1<x_s1 Then w1#=w1#+1
If x_e1>x_s1 Then w1#=w1#-1
If y_e1<y_s1 Then h1#=h1#-1
If y_e1>y_s1 Then h1#=h1#+1
MoveMouse x_e1,y_e1
Else
x_e1=MouseX()
y_e1=MouseY()
End If
RotateEntity cube,h1#,w1#,0
RenderWorld
Text 0,0,"x_s = "+x_s+" x_e = "+x_e+"xs = "+xs+" ys = "+ys+"x = "+x+" y = "+y
Flip
Wend
End