노력과 삽질 퇴적물

플래시: 스탈링(Starling) 엔진 본문

프로그래밍note/엔진 관련

플래시: 스탈링(Starling) 엔진

MTG 2013. 11. 15. 11:46






0. 필요한 파일


파일명

예시 경로

 Starling 1.4

 ...(프로젝트 폴더)...\swc\starling.swc

 플래시 디벨롭

 (FlashDevelop 4.5)

 C:\FlashDevelop
 (AS3.0: 개발환경 참조가능)






1. 라이브러리 연결


(프로젝트 폴더)\swc에 있으면 자동으로 연결이 됩니다.






팁.


* 스탈링은 벡텨 이미지를 취급하지 않는다고 합니다.

*1.4 이전버전 호환시 주의점.

ClippedSprite.as

(1.4 이전 버전)


public override function render(support:RenderSupport, alpha:Number):void

{

if (mClipRect == null) super.render(support, alpha);

else

{

... ... ...

                

support.finishQuadBatch();

support.scissorRectangle = mClipRect;

                

... ... ...

                

support.finishQuadBatch();

support.scissorRectangle = null;

}

}


public function get clipRect():Rectangle

{

... ... ...

}

public function set clipRect(value:Rectangle):void

{

... ... ...

}

(1.4 버전 적용시)


public override function render(support:RenderSupport, alpha:Number):void

{

if (mClipRect == null) super.render(support, alpha);

else

{

... ... ...

                

support.finishQuadBatch();

context.setScissorRectangle(mClipRect);

                

... ... ...

                

support.finishQuadBatch();

context.setScissorRectangle(null);

}

}


public override function get clipRect():Rectangle

{

... ... ...

}

public override function set clipRect(value:Rectangle):void

{

... ... ...

}






기타. 주요 문서


Starling Framework Reference


Starling Wiki - Starling Wiki

Tutorials & Code Snippets - Starling Wiki


PrimaryFeather/Starling-Framework · GitHub


문서 번역 자료 - Co-Translation, Starling