ADMIN NEEDED

by christian
Wonderfl's owner is hard to understand : pay to renew the wonderfl domain, but can't find someone to update librairies (-_-)

if you are part of the AS3 coders majority focused on mobile stuff who wants to share or test a snippet using Starling or Feathers, this tool is useless
♥0 | Line 45 | Modified 2016-12-09 21:30:39 | MIT License
play

ActionScript3 source code

/**
 * Copyright christian ( http://wonderfl.net/user/christian )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/wTHw
 */

package
{
    import flash.events.Event;
    import flash.display.Sprite;
    import starling.core.Starling;

    public class MESHES extends flash.display.Sprite
    {
        public function MESHES () { addEventListener (Event.ADDED_TO_STAGE, init); }

        private function init (e : Event) : void
        {
            removeEventListener (Event.ADDED_TO_STAGE, init);

            //

            with (stage)
            {
                align = 'TL';
                frameRate = 60;
                color = 0x404040;
                scaleMode = 'noScale';
            }
            
            with (new Starling (Main, stage))
            {
                showStats = true;
                antiAliasing = 4;
                start();
            }
        }
    }
}

import starling.display.Mesh;
import starling.display.Sprite;
import starling.rendering.IndexData;
import starling.rendering.VertexData;

class Main extends starling.display.Sprite
{
    public function Main ()
    {
        var vertexData : VertexData = new VertexData ();
        vertexData.setPoint (0, 'position', 100, 100);
        vertexData.setPoint (1, 'position', 300, 100);
        vertexData.setPoint (2, 'position', 100, 400);

        var indexData : IndexData = new IndexData ();
        indexData.addTriangle (0, 1, 2);

        var mesh : Mesh = new Mesh (vertexData, indexData);

        addChild (mesh);    
    }
}