flash on 2010-5-9
♥0 |
Line 43 |
Modified 2010-05-09 02:39:06 |
MIT License
archived:2017-03-20 06:44:32
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/jNty
*/
package {
import org.papervision3d.view.BasicView;
import flash.text.TextField;
import flash.events.Event;
import net.hires.debug.Stats;
import org.papervision3d.typography.*;
import org.papervision3d.typography.fonts.*;
import org.papervision3d.materials.special.*;
import org.papervision3d.objects.*;
import org.papervision3d.core.proto.*;
[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 m : MaterialObject3D = new Letter3DMaterial(0xffffff);
m.doubleSided = true;
var t : Text3D = new Text3D("nya-", new HelveticaLight(), m);
scene.addChild(t);
camera.x = 100;
camera.y = 200;
camera.z = 300;
camera.lookAt(t);
t.lookAt(camera);
t.localRotationY = 180;
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;
}
}
}