I started in awayd3D and have not found a solution on a version 4.0beta, I can appeal to you.
I have done many research on the internet hoping to find an explanation of the use of lights but the few explanations related to each version 3.
I realize this scene (http://goupix.com/test/). You can use the WASD keys or arrow keys to move.
To achieve this scene, I have several files: Exploration.as: Creates the scene, the camera and light. light:
PointLight light = new ();
light.x = -2000;
light.y = 1000;
light.z = -1000;
light.color 0xffeeaa = / / Here, select the new color of the light source
view.scene.addChild (light);
ClassGeneratemap.as: uses a table generated for my decor ClassGenerateobjet.as: Called by ClassGeneratemap and place the elements in the scene
public function onAssetComplete(event:AssetEvent):void {
if ( event.asset.assetType == AssetType.MESH && event.asset.assetNamespace == token ) {
AssetLibrary.removeEventListener(AssetEvent.ASSET_COMPLETE, onAssetComplete);
trace("position : " + posX + " : " + posY );
mesh = event.asset as Mesh;
mesh.geometry.scale(1);
mesh.x = -posX * instData.scale;
mesh.z = posY * instData.scale;
mesh.castsShadows = true ;
//trace("position : " + mesh.x + " : " + mesh.z );
instExploration.scene.addChild( mesh );
}//End If
}//End onAssetComplete
I really do not see how to use the light that I placed. I do not know if indeed this is the right kind of light.
I hope you can help me. Thank you
Pulling examples from Away3d's GitHub would help.
https://github.com/away3d/away3d-examples-fp11