Away3d4.0 getting started-Basic Skills

Source: Internet
Author: User

1. How to Set skin of different parts for a mesh?
The submeshes of the mesh is called, but the premise is that your mesh contains submesh...
Mesh. submeshes [Index]. Material = new texturematerial (New bitmaptexture (bitmapdata ));

2. How do I know if submesh exists in the mesh?
Trace (mesh. submeshes. Length );
If the result is not 0, submesh exists.

3.what should I do if the 3DS file cannot be loaded successfully?
1. Use software such as 3dsmax to open your 3DS file, delete camera, and save the file,
2. Clear the project editor cache (such as the cache of Flash builder), load and test again

4.why is the mouse event on a 3D object invalid?
You must first allow the mouse event and then listen for the mouseevent3d
Mesh. mouseenabled = true;
Mesh. addeventlistener (mouseevent3d. Click, mesh_clickhandler );

3. What should I do if I follow the blood bar and name of a person?
You can use the sprite3d class. Of course, you can also use it to implement a class.

4. How can we make a model look like glass or crystal?
Set material to translucent, and then call addmethod to add envmapmethod

5. Is there a simple way to draw path animation routes?
You can use the old prefab version (prefab3d with the latest support for away3d4 does not currently support this feature ).

6. How can I make a part of the texture transparent?
Use a PNG image, and then...
Texturematerial. alphablending = true;
Texturematerial. blendmode = blendmode. layer;

7. Is there a way to display movieclip?
At present, the official website does not provide a ready-made method, ....
You can inherit bitmaptexture and implement
Add a sprite to the inherited class and do not need to be added to stage.
Then listen to its event. enter_frame event
When each event is triggered, draw generates a new bitmapdata

8. How to add different textures to each face of a cube?
1. Use six planegeometry + six mesh to implement a new cube class to achieve different textures on each face.
2. Implement with skybox
(The first method is recommended for higher flexibility)

9. How can we make the model smoother?
Weld. Apply (mesh );

10. How to calculate the distance between two points?
VaR V1: vector3d = new vector3d (0,100, 0)
VaR V2: vector3d = new vector3d (100,0, 0 );
Trace (v1.subtract (V2). Length );

Away3d4.0 getting started-Basic Skills

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.