본문 바로가기

fuse12

button, switch, slider 앱 개발에서 가장 많이 쓰이는 세 가지 요소라서 한데 묶었다. Button버튼 기본. 기본 모양 등은 테마에서 제공된다. 클릭하면 버튼의 텍스트가 바뀐다.Fuse에서는 클릭이 가능한 오브젝트를 만드는 것이 매우 쉬우므로, 다른 여러 요소들을 이용해 자신만의 버튼을 만들 수 있다. Fuse DashBoard에서 지원하는 Fuse Monitor에서 로그를 확인할 수 있다. 위 예제는 로그를 찍는 예제이다.Event triggers버튼 이벤트 트리거 예제 module.exports = { buttonClick: function (args) { console.log("Button was clicked"); } } 똑같이 로그를 찍는 예제지만 자바스크립트를 이용했다. 위와같이 module.exports를 통해 이.. 2016. 1. 6.
brushes BrushesFuse는 도형에 색을 입히는 것에 대해 stroke와 fill 두가지 방법을 제공한다.SolidColor단순히 색을 입히기 위한 방법 도형 안에 적용 아래 방법으로 동일한 효과를 제공한다. ImageFill도형에 이미지를 채우기 위해서는 ImageFill을 사용해야 한다. 같은 방법으로 스케치모드를 설정할 수 있다.LinearGradient브러쉬를 사용해 그라데이션 효과를 준다. The StartPoint and EndPoint are both X and Y offsets within the Shape the brush is used in, so you can specify a diagonal brush by using StartPoint="0,0" EndPoint="1,1".Instead.. 2016. 1. 6.
Shape ShapesFuse는 사각형과 원형을 지원. 이것들은 여러 Fills 과Strokes프로퍼티들을 가지고 있다. Rectangle 여러 제어 프로퍼티를 포함한 사각형Circle 스트로크를 적용한 원형StartAngle / EndAngleStartAngle and EndAngle 원에만 적용 가능하다.(사각형 안됨) 6개의 프로퍼티를 이용해 제어한다.StartAngle - The angle in radians where the slice beginsEndAngle - The angle in radians where the slice endsStartAngleDegrees - The angle in degrees where the slice beginsEndAngleDegrees - The angle in d.. 2016. 1. 6.
Video VideoTo display a video: File and Url 을 이용해 파일을 재생하거나 스트리밍 가능. 비디오는 이미지와 비슷하며, StretchMode, StretchDirection and ContentAlignment 와 같은 방법을 적용할 수 있다.Video propertiesVideo comes with a set of properties that can be used to configure it or control it, in addition to the properties shared withImage:Volume: range from 0.0 to 1.0, default is 1.0Duration: the duration of the video in secondsPosition: t.. 2016. 1. 6.
image resource & color Image contents from resources자바스크립트로 데이터바인딩을 통해 이미지 로딩하는 것과 이미지 소스로부터 불러오는 방법 module.exports = { imageResource: "pic2", url: "http://somewhereontheinternet/Cute-Cat.jpg" } Image Color 이미지에 컬러값을 부여한다. 위 코드는 하얀 이미지를 완전한 빨간색으로 만든다. 이미지 표현을 위한 프로퍼티는 아래와 같다. 이 부분은 원문 그대로 복사.StretchModeWhen added to a container, an Image will by default try to show as much of itself as possible. If the image isn't the.. 2016. 1. 6.
number NumberNumber numeric value 형식으로 숫자를 표현할 수 있다. 포맷은 Format property로, 링크(Standard Numeric Format String)에 부합하는 포맷을 지정해서 사용한다.현재(2016.01.06)는 F포맷만 지원한다.아래 코드는 3.142값으로 표현된다. 결과 스크린샷 2016. 1. 6.
fonts FontsFuse의 폰트는 ttf파일인 트루타입폰트파일을 import하는 방법으로 여러 종류의 폰트나 효과(bold 등)를 줄 수 있다. 이것은 각종 플랫폼에서 동일하게 효과를 줄 수 있다는 장점이 있으며, 초기 한 번 로딩하는 것으로 프로젝트 전체에서 사용가능하다. ux:Global로 등록하는 것으로 프로젝트 전체 사용이 가능하다. Roboto Light Roboto Medium Roboto Light again 2016. 1. 6.
Text TextHere is a tiny app that renders text: Hello, world! This is great but when you have longer passages of text, such as a Lorem Ipsum, you most likely want to enable word wrapping. In Fuse, this is done with the TextWrapping property on the Text control:Lorem Ipsum(...) 텍스트를 표현하는 태그는 이다. 그런데 텍스트 옵션 중 TextWrapping이 있고, 이 옵션은 Wrap, NoWrap 두 개의 값을 가지고 있다. 기본은 NoWrap으로 잡혀있다. 둘의 차이는 긴 텍스트를 표현할 때의 차이.. 2016. 1. 6.
커스텀 그래픽스테마 만들기 Creating your own GraphicsTheme GraphicsTheme 를 상속한다. 버튼과 슬라이더 등을 재정의 한다. 아래와 같이 사용한다. 글로벌 영역으로 타입 얼리어스도 가능하다. 그런 경우 App에서 지정 가능하다. 아래와 같다. ... 2016. 1. 6.