02-18-2024, 07:24 PM
(This post was last modified: 02-19-2024, 09:29 AM by stevantosic.)
Many thanks! Now I see the power of LDImage. Great, really great.
st
Code:
LDNetwork.SetSSL()
flickr = LDUtilities.FixFlickr()
imageURL = Flickr.GetRandomPicture("word")
tmpFile = File.GetTemporaryFilePath()
LDNetwork.DownloadFile(tmpFile,imageURL)
image = ImageList.LoadImage(tmpFile)
File.DeleteFile(tmpFile)
imageReverse = LDImage.Copy(image)
' Vertical
LDImage.EffectReflect(imageReverse, 0)
' Horizontal
'LDImage.EffectReflect(imageReverse, 1)
view3D = LD3DView.AddView(GraphicsWindow.Width,GraphicsWindow.Height,"True")
LD3DView.AutoControl("True","True",2,1)
LD3DView.AddAmbientLight(view3D,"White")
square = LD3DView.AddGeometry(view3D,"-0.5 -0.5 0.5:0.5 -0.5 0.5:0.5 0.5 0.5:0.5 0.5 0.5:-0.5 0.5 0.5:-0.5 -0.5 0.5","0 1 2 3 4 5","","Red","D")
LD3DView.AddImage(view3D,square, "0 1:1 1:1 0:1 0:0 0:0 1",image,"D")
LD3DView.AddBackImage(view3D,square, "",imageReverse,"D")
LD3DView.TranslateGeometry(view3D,square,0,0,8)
LD3DView.AnimateRotation(view3D,square,0,1,0,0,360,5,-1)
'LD3DView.AnimateRotation(view3D,square,1,0,0,0,360,5,-1)
st