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
#3
Hi litdev

Depending on your previous answer, this a try to rotate image with readable text on both side of a square around Y-axis:

Code:
LDNetwork.SetSSL()
flickr = LDUtilities.FixFlickr()
imageURL = Flickr.GetRandomPicture("word")
tmpFile = File.GetTemporaryFilePath()
LDNetwork.DownloadFile(tmpFile,imageURL)
image = ImageList.LoadImage(tmpFile)
File.DeleteFile(tmpFile)
image = ImageList.LoadImage(tmpFile)

'image = ImageList.LoadImage(Program.Directory + "/text1.png")

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.TranslateGeometry(view3D,square,0,0,8)

squareBack = LD3DView.CloneObject(view3D, square)

LD3DView.RotateGeometry(view3D,squareBack,0,1,0,180)

LD3DView.AnimateRotation(view3D,square,0,1,0,0,360,5,-1)
LD3DView.AnimateRotation(view3D,squareBack,0,1,0,0,360,5,-1)

Is it possible to do it with AddBackImage and texture?
Default AddBackImage makes a "mirror" image and text is unreadable from left to right.

st
Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)