We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Point (0,0) in LD3DView image mapping
#5
Many thanks! Now I see the power of LDImage. Great, really great.

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
[-] The following 2 users Like stevantosic's post:
  • AbsoluteBeginner, litdev
Reply


Messages In This Thread
RE: Point (0,0) in LD3DView image mapping - by stevantosic - 02-18-2024, 07:24 PM

Forum Jump:


Users browsing this thread: 5 Guest(s)