반응형
블로그 이미지
개발자로서 현장에서 일하면서 새로 접하는 기술들이나 알게된 정보 등을 정리하기 위한 블로그입니다. 운 좋게 미국에서 큰 회사들의 프로젝트에서 컬설턴트로 일하고 있어서 새로운 기술들을 접할 기회가 많이 있습니다. 미국의 IT 프로젝트에서 사용되는 툴들에 대해 많은 분들과 정보를 공유하고 싶습니다.
솔웅

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

카테고리


반응형

두어달 가량 China Team 에 원격으로 진행된 Knowledge Transfer 가 끝났습니다. 

저도 한 네 다섯개의 Session 을 맡았던 것 같은데요.


두 나라의 시간 차이로 이곳 미국 동부 시간으로 밤 10시, 중국 시간으로는 아침 11시에 진행이 됐었습니다.


이 KT 가 끝나고 나서 China Team 에서 고맙다고 메일이 왔는데요.


이에 대해 우리 매니저가 보낸 답장을 가지고 오늘 영어 공부를 할 겁니다.


XXX


Thank you and the team very much for all your hard work these past few months! You have all done great work and are very quick at learning new technology as well as how our team works. We are very excited to continue the great work we have all started!

 

I hope you and the whole team in China have a great vacation and enjoy the New Year’s festivities!

 

Thank you!



당신과 당신 팀이 지난 몇달간 열심히 일해줘서 대단히 감사드립니다. 모두들 훌륭하게 일을 마쳤습니다. 그리고 아주 빠른 시간에 새로운 기술들과 우리팀 업무들을 잘 습득해 주셨습니다. 지금까지 그래왔듯이 훌륭하게 일을 진행할 여러분들과 같이 계속 근무하게 되서 무척 기대 됩니다.


중국에 있는 모든 팀들이 좋은 명절을 보내고 즐거운 설날 연휴를 보내시길 바랍니다.


감사합니다.



위 글은 프로젝트 매니저인 마이크가 보낸 메일이구요. 또 다른 프로젝트 매니저인 팻이 보낸 메일도 있어요.



Well said!

 

Thank you all for making the KT successful.  It really is a two way partnership and I appreciate all the hard work, early mornings, and late nights everyone has put in onshore and offshore.

 

R, L, K, and F – We wish you all a very happy, healthy, and enjoyable holiday.  I look forward to seeing you all soon.

 

Happy New Year,


얘기 잘 하셨어요!


KT 를 성공적으로 마칠 수 있게 되서 모두에게 감사드립니다. 말그대로 양쪽 방향으로 잘 진행된 파트너쉽이었습니다. 이른 아침 그리고 늦은 밤에 사무실 안에서 그리고 사무실 밖에서 열심히 일해 준 것에 감사의 마음을 표합니다.

R,L,K 그리고 F (사람 이름은 이니셜로 처리했습니다) -  모두들 행복하고 건강하고 즐거운 명절 보내길 바라며 조만간 만나기를 바랍니다.


새해 복 많이 받으세요.

아시다시피 그냥 영어로 들을 때는 존대말을 염두에 두지 않는데 이렇게 번역하면서 존대말로 하니까 말들이 너무 거리감 있게 느껴지네요.


어쨌든 팻이 보낸 메일 중에 onshore 와 offshore  해석할 때 조금 생각을 해야 됐는데요.

글자 그대로는 육상, 해상 이렇게 번역할 수 있겠지만 이 편지 내용에서는 무엇으로 해석할 까 고민이 됐으요.

또 다른 뜻인 국내, 국외로 해석하면 적당할 것 같기도 하구요.

KT Session 진행할 때 중국은 아침 11시니까 사무실에서 했는데 저희쪽에서는 밤 10시라서 집에서 진행했거든요.

그래서 저한테는 사무실 안과 밖이라는 느낌이 제일 먼저 와서 그냥 그걸로 번역해 버렸어요.

국내외가 맞을 수도 있겠네요.


어느 의미이든 이 메일을 이해하는데 크게 지장을 주지는 않는 것 같군요.

정확히 아시는 분 계시면 알려 주세요.


반응형

Pinch Zoom Rotate 구현하기 - 7/11 -

2013. 2. 12. 10:32 | Posted by 솔웅


반응형
Posted on . Written by



이전 글 까지만 해도 이 코드는 유용합니다. 하지만 좀 더 다듬어야 하죠. 작은 파란 사각형을 하나 이상의 손가락으로 움직일 수 있습니다. multitouch input device의 장점은 virtual 상황에서 real world 의 느낌을 주는데 있습니다. 이 코드에 rotation 과 scaling 효과를 주면 훨씬 더 실감나게 움직이곘죠.



Relative Motion


이 작업을 하기 전에 이전 코드(6번)를 실행 시킨 후 한 손가락을 이용했을 때 사각형이 어떻게 움직이는지 한번 보세요. touch point 로 사각형의 중심이 이동한 다음에 움직이죠. 이렇게 사각형의 중심이 이동하지 않고 그냥 touch point 와 그냥 relative 하게 움직이도록 할 겁니다. 이 작업을 하기 위해 moved와 ended phases 에 코드를 추가 할 겁니다.



sample7.lua

function rect:touch(e)
local target = e.target -- get the object which received the touch event
-- handle began phase of the touch event life cycle...
if (e.phase == "began") then
print( e.phase, e.x, e.y )
local dot = newTrackDot(e) -- create a tracking dot
rect.dots[ #rect.dots+1 ] = dot -- add the new dot to the list
-- pre-store the centre position of all touch points
rect.prevCentre = calcAvgCentre( rect.dots )
return true -- we handled the began phase
elseif (e.parent == rect) then
if (e.phase == "moved") then
print( e.phase, e.x, e.y )
-- calculate the centre position of all touch points
local centre = calcAvgCentre( rect.dots )
rect.x = rect.x + (centre.x - rect.prevCentre.x) -- update the X position of rect
rect.y = rect.y + (centre.y - rect.prevCentre.y) -- update the Y position of rect
rect.prevCentre = centre -- store the centre of all touch points
else -- ‘ended’ and ‘cancelled’ phases
print( e.phase, e.x, e.y )
if (isDevice or e.numTaps == 2) then -- remove the tracking dot from the list
local index = table.indexOf( rect.dots, e.target ) -- get index of dot to be removed
table.remove( rect.dots, index ) -- remove dot from list
e.target:removeSelf() -- remove tracking dot from the screen
-- store the new centre of all touch points
rect.prevCentre = calcAvgCentre( rect.dots )
end
end
return true
end
return false -- if the target is not responsible for this touch event return false
end

main.lua

sample7.lua


여기서 수정한 부분은 아래와 같습니다.

    모든 touch 들의 center 를 계산하고 began phase 안에서 참고하기 위해 그 값을 저장한다.
    moved phase 에서 사각형의 x,y 값에 이전 touch 와 현재의 touch center 사이의 차이점을 추가적용한다.
    ended phase 에 터치들의 저장된 터치들의 중심값을 업데이트한다. 그래서 손가락을 떼더라도 다음 moved phase 에서 사각형이 필요없이 이동하지 않도록 한다.

이제 사용자는 사각형 위에 여러 손가락을 얹어도 이상하게 움직이지 않을 겁니다. 그 손가락들을 바꾸고 움직이고 해도 어색하지 않게 움직입니다. 이제 사각형이 손가락 움직임에 따라 회전하면 더 자연스럽겠네요.




반응형

Pinch Zoom Rotate 구현하기 - 6/11 -

2013. 2. 12. 09:50 | Posted by 솔웅


반응형
Posted on . Written by


multitouch display object 들을 위한 시뮬레이터 디버거를 사용하실 수 있습니다. tracking dot 중의 하나에서 touch 를 release 했을 때 이 dot 이 사라지지 않는걸 보셨을 겁니다. 이게 디버깅하기 아주 좋은 조건이거든요. 왜냐하면 touch 를 뗐어도 여러 touch point 가 있는 것처럼 데이터가 저장돼 있을 거거든요. 디버깅에는 좋지만 실제 앱을 이렇게 만드는 건 별로 유용하지는 않을 거에요. 계속 하얀 원이 쌓일 테니까요.


이 문제를 해결하시려면 rect:touch() function 의 ended phase 에서 해당 tracking dot들을 없애주면 됩니다. 일단 device 에서 running 하는지 여부를 코드의 시작 부분에서 변수에 저장해 두는 것에서부터 시작해야 되겠네요.


-- which environment are we running on?
local isDevice = (system.getInfo("environment") == "device")


The isDevice variable will be true if the code is running on a real, physical device and it can be used to automatically remove the tracking dot when the user lifts their finger.
isDevice 변수는 이 앱이 실제 디바이스에서 구동될 경우 true 가 될 겁니다. 그러면 이 값이 true 일 경우에만 손가락이 떼어질 때 해당 tracking dot 을 없애버리면 되겠죠.





sample6.lua


if (e.phase == "moved") then
print( e.phase, e.x, e.y )
 
else -- ‘ended’ and ‘cancelled’ phases
 
print( e.phase, e.x, e.y )
if ( isDevice or e.numTaps == 2 ) then -- remove the tracking dot from the list
local index = table.indexOf( rect.dots, e.target ) -- get index of dot to be removed
table.remove( rect.dots, index ) -- remove dot from list
e.target:removeSelf() -- remove tracking dot from the screen
end
end
return true
 

isDevice or e.numTaps == 2 가 있죠? 이렇게 함으로서 이미 rect:touch() function를 call 한 tap lisener 를 가지는 tracking dot을 가능하게 합니다. 그러면 시뮬레이터에서는 double tap 으로 tracking dot 을 remove 할 수 있도록 구현할 수 있습니다.

그 tap listener 는 이 코드가 시뮬레이터에서 돌아갈 때에만 동작하도록 해야합니다. 그래서 이 때 isDevice 변수를 다시 사용할 겁니다. 이 tap listener 는 tracking dot들을 생성하는 newTrackDot() 함수 안에 추가 됐습니다.


-- listen for a tap when running in the Simulator
function circle:tap(e)
if (e.numTaps == 2) then
e.parent = rect -- set the parent
rect:touch(e) -- call touch to remove the tracking dot
end
return true
end
-- only attach tap listener in the simulator
if (not isDevice) then
circle:addEventListener("tap")
end

main.lua

sample6.lua


Note that we also:
    우리는 두개의 tap 을 체크해서 double tap 일 경우에만 tracking dot을 remove 할 겁니다.
    그리고 touch 함수안에 했던 대로 .parent property를 세팅합니다.
    이 코드가 시뮬레이터에서 동작할 경우에만 해당 tap listener를 attach 합니다.



반응형