Texture Map Questions

Software: Away3D 4.x

superCube, Newbie
Posted: 11 November 2015 11:31 AM   Total Posts: 6

Looking at many of the tutorials here, I see that texture maps are embedded into the code using EMBEDD.

This is quite confusing, given that the AssetLibrary can import them as texture assets, which can then be referenced using AssetLibrary.getAsset(“filename”)..

Also I’ve noticed the asset library assigns a file path to the textures name. Is there anyway around this ?

For example - a map called Diffuse.jpg gets an asset.name of ....”..src/assets/folder/folder2/Diffuse.jpg”, rather than just “Diffuse.jpg”


Can anyone help me out with this ?

Thank you !!

 

   

rdoi, Member
Posted: 11 November 2015 09:26 PM   Total Posts: 86   [ # 1 ]

If you are loading an image with AssetLibray, I think its fair naming the asset that way, because you may have to identify different files with same names coming from different uris.
You still can easily test any part of it using a regexp.

Now, I didn’t get what you mean with the “embed” thing.
Are you trying to loadData an embedded image data to the AssetLibray to then use it in your application?
You could just create a BitmapTexture with the embedded data (setting any name you want) and then add to the AssetLibray.

 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X