As in Away3d (4.1) use Occluder and Collider?
Example not find
ParticleGeometry use only animation? If no, then I want get example him use
I do so:
package {
import away3d.cameras.Camera3D;
import away3d.containers.Scene3D;
import away3d.containers.View3D;
import away3d.core.base.Geometry;
import away3d.core.base.ParticleGeometry;
import away3d.debug.AwayStats;
import away3d.entities.Mesh;
import away3d.materials.TextureMaterial;
import away3d.primitives.CubeGeometry;
import away3d.textures.BitmapTexture;
import away3d.tools.helpers.ParticleGeometryHelper;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite {
[Embed (source = 'texture.png')] private const Texture:Class;
private var texture:Bitmap = new Texture();
private var scene:Scene3D;
private var camera:Camera3D;
private var view:View3D;
private var mesh:Mesh;
private var geometry:Geometry;
private var geometries:Vector.<Geometry> = new Vector.<Geometry>();
private var pGeometry:ParticleGeometry;
private var textureForMesh:BitmapTexture;
private var material:TextureMaterial;
public function Main():void {
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void {
removeEventListener(Event.ADDED_TO_STAGE, init);
scene = new Scene3D();
camera = new Camera3D();
camera.lens.near = 1;
camera.lens.far = 1000000;
view = new View3D(scene, camera);
view.backgroundColor = 0x0088ff;
view.antiAlias = 128;
addChild(view);
addChild(new AwayStats(view));
textureForMesh = new BitmapTexture(texture.bitmapData);
material = new TextureMaterial(textureForMesh, true, true);
geometry = new CubeGeometry();
for (var i:int = 0; i < 1000; i++ ) {
geometries.push(geometry);
}
pGeometry = ParticleGeometryHelper.generateGeometry(geometries);
mesh = new Mesh(pGeometry, material);
scene.addChild(mesh);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function onEnterFrame(e:Event):void {
view.render();
}
}
}
But what do next?
As changing coordinates cubes?
Please, help me
Example I’m not find…
P.S. I not very good speak English,
Please, write understander, but I can’t understand your