In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2010-9-9

テクスチャを貼る前にPV3Dで表示テスト。
なるほどバキバキじゃねーの。
Get Adobe Flash player
by buccchi 09 Sep 2010
/**
 * Copyright buccchi ( http://wonderfl.net/user/buccchi )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/vKZz
 */

/**
* テクスチャを貼る前にPV3Dで表示テスト。
* なるほどバキバキじゃねーの。
*/

package {
    import org.papervision3d.view.BasicView;
    import org.papervision3d.objects.parsers.DAE;
    import org.papervision3d.render.*;
    import flash.events.Event;
    import net.hires.debug.Stats;
    
    public class FlashTest extends BasicView {
        private var _camR:Number = 0;
        private var _h:Number = 200;
        
        public function FlashTest() {
            addChild( new Stats() );
            
            var fami:DAE = new DAE();
            fami.load("http://7980.oui-imja.com/wonderfl/201009/fami_ver01.dae");
            scene.addChild(fami);
            fami.scale = 40;
            camera.y = 400;
            
            //renderer = new QuadrantRenderEngine(QuadrantRenderEngine.ALL_FILTERS);
            startRendering();
        }
        
        override protected function onRenderTick(event:Event = null):void {
            var tarH:Number = 200+(stage.mouseY/465)*800;
            _h += (tarH-_h)*.2;
            _camR += .3;
            camera.x = Math.sin(_camR * Math.PI / 180) * _h;
            camera.z = Math.cos(_camR * Math.PI / 180) * _h;
            super.onRenderTick(event);
        }
    }
}