flash on 2010-4-3
♥0 |
Line 44 |
Modified 2010-04-03 19:52:40 |
MIT License
archived:2017-03-30 04:39:40
ActionScript3 source code
/**
* Copyright uwi ( http://wonderfl.net/user/uwi )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9821
*/
package {
import org.papervision3d.view.BasicView;
import flash.text.TextField;
import flash.events.Event;
import net.hires.debug.Stats;
import org.papervision3d.materials.*;
import org.papervision3d.objects.primitives.*;
import org.papervision3d.objects.special.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.math.*;
[SWF(backgroundColor="0x000000", frameRate="60")]
public class PV3D extends BasicView {
private var _tf : TextField;
public function PV3D() {
super(0, 0, true, false);
_tf = new TextField();
addChild(_tf);
_tf.textColor = 0xffffff;
_tf.width = 100;
_tf.height = 465;
// addChild(new Stats());
var wm : WireframeMaterial = new WireframeMaterial(0xffffff);
wm.doubleSided = true;
var cone : Cone = new Cone(wm, 200, 500, 4, 1);
scene.addChild(cone);
var d : DisplayObject3D = new DisplayObject3D();
d.x = 10;
d.y = 0;
d.z = 0;
cone.lookAt(d, new Number3D(0, 1, 0));
cone.localRotationX = -90;
scene.addChild(new UCS());
startRendering();
}
override protected function onRenderTick(e : Event = null) : void
{
super.onRenderTick(e);
}
private function tr(...o : Array) : void
{
_tf.appendText(o + "\n");
_tf.scrollV = _tf.maxScrollV;
}
}
}