2013-03-09 2 views
1

iOS 용 응용 프로그램을 만들고 싶습니다. cocos2d에 대한 전문 지식이 있습니다. 많이 찾았지만 웹킷을 사용하여이 애니메이션의 CSS 구현을 찾았습니다. 다른 언어는 모르겠습니다. C, 목표 C, VHDL.회전 링에 스프라이트 애니메이션 적용하기

1- 어떻게이 애니메이션을 cocos2d 또는 다른 모든 FrameWork에서 만들 수 있습니까?

2 - 어떻게하면 대화식으로 만들 수 있습니까 (터치).

나는 그것을 대화 형으로 만들 수 있지만이 애니메이션을 만드는 방법에 대한 지침이 필요합니다. 내가 마음에 가지고있는 것은 수동으로 크기를 조정하고 각 스프라이트를 이동하고 불투명도를 변경하여이 효과를 생성하지만 시간이 많이 걸릴 것입니다. . 여기

애니메이션과 링크입니다

https://www.webkit.org/blog-files/3d-transforms/morphing-cubes.html

+0

나는 충분한 포인트를 가지고 있지 않아 그림을 업로드 할 수 없다. –

+0

나는 그 문제에 대해 cocos2d 또는 다른 2D 프레임 워크를 사용하여 그렇게 할 수 있을지 의심 스럽다. – YvesLeBorg

+0

그 때 당신은 무엇을 추천합니까? –

답변

1

내가했다, cocos3d를 사용하여 내 출발점으로 demomashup를 사용하고 난의 "skinnyrunner"방법으로보고 여기에 큐브 다이 방법을 수정하는 내가 cocos3d에 새로운 오전,하지만 생각하면 내가 hesit 해달라고 도움이 될 수 있습니다 비록 내 코드

// Create the camera, place it back a bit, and add it to the scene 
CC3Camera* cam = [CC3Camera nodeWithName: @"Camera"]; 
cam.location = cc3v(0.0, 0.0, 200.0); 
[self addChild: cam]; 

// Create a light, place it back and to the left at a specific 
// position (not just directional lighting), and add it to the scene 
CC3Light* lamp = [CC3Light nodeWithName: @"Lamp"]; 
lamp.location = cc3v(-110.0, 110.0, 50.0); 
lamp.isDirectionalOnly = NO; 
[cam addChild: lamp]; 


// Fetch the die cube model from the POD file. 
CC3PODResourceNode* podRezNode = [CC3PODResourceNode nodeFromFile: kDieCubePODFile]; 
CC3Node* podDieCube = [podRezNode getNodeNamed: kDieCubePODName]; 

// We want this node to be a SpinningNode class instead of the CC3PODNode class that 
// is loaded from the POD file. We can swap it out by creating a copy of the loaded 
// POD node, using a different node class as the base. 
dieCube = [[podDieCube copyWithName: kDieCubeName 
          asClass: [SpinningNode class]] autorelease]; 

// Now set some properties, including the friction, and add the die cube to the scene 


CCSprite  * markerSprite = [CCSprite spriteWithFile: @"IMG1.PNG"]; 
marker = [CC3Billboard nodeWithName: @"TouchSpot" withBillboard: markerSprite]; 


CCSprite  * markerSprite1 = [CCSprite spriteWithFile: @"IMG2.PNG"]; 
marker1 = [CC3Billboard nodeWithName: @"TouchSpot1" withBillboard: markerSprite1]; 


CCSprite  * markerSprite2 = [CCSprite spriteWithFile: @"IMG3.PNG"]; 
marker2 = [CC3Billboard nodeWithName: @"TouchSpot2" withBillboard: markerSprite2]; 


CCSprite  * markerSprite3 = [CCSprite spriteWithFile: @"IMG4.PNG"]; 
marker3 = [CC3Billboard nodeWithName: @"TouchSpot3" withBillboard: markerSprite3]; 

CCSprite  * markerSprite4 = [CCSprite spriteWithFile: @"IMG5.png"]; 
marker4 = [CC3Billboard nodeWithName: @"TouchSpot4" withBillboard: markerSprite4]; 


CCSprite  * markerSprite5 = [CCSprite spriteWithFile: @"IMG2.PNG"]; 
marker5 = [CC3Billboard nodeWithName: @"TouchSpot5" withBillboard: markerSprite5]; 


CCSprite  * markerSprite6 = [CCSprite spriteWithFile: @"IMG3.PNG"]; 
marker6 = [CC3Billboard nodeWithName: @"TouchSpot6" withBillboard: markerSprite6]; 


CCSprite  * markerSprite7 = [CCSprite spriteWithFile: @"IMG4.PNG"]; 
marker7 = [CC3Billboard nodeWithName: @"TouchSpot7" withBillboard: markerSprite7]; 







float scale=0.15; 

// marker.scale = cc3v(0.0001f, 0.0001f, 0.0001f); 
marker.location = cc3v(0.0f, 0.0f, 50.0); 
marker.uniformScale=scale; 
marker.isTouchEnabled = YES; 

marker1.location = cc3v(35.0, 0.0f, 35.0); 
marker1.uniformScale=scale; 
marker1.isTouchEnabled = YES; 


marker2.location = cc3v(50, 0.0f, 0.0f); 
marker2.uniformScale=scale; 
marker2.isTouchEnabled = YES; 

marker3.location = cc3v(35, 0.0f, -35.0f); 
marker3.uniformScale=scale; 
marker3.isTouchEnabled = YES; 

marker4.location = cc3v(0.0f, 0.0f, -50.0f); 
marker4.uniformScale=scale; 
marker4.isTouchEnabled = YES; 

marker5.location = cc3v(-35.0f, 0.0f, -35.0f); 
marker5.uniformScale=scale; 
marker5.isTouchEnabled = YES; 


marker6.location = cc3v(-50.0f, 0.0f, 0.0f); 
marker6.uniformScale=scale; 
marker6.isTouchEnabled = YES; 

marker7.location = cc3v(-35.0f, 0.0f, 35.0f); 
marker7.uniformScale=scale; 
marker7.isTouchEnabled = YES; 

marker.rotation = cc3v(0.0f, 0.0f, 0.0f); 
marker1.rotation = cc3v(0.0f,45.0f, 0.0f); 

marker2.rotation = cc3v(0.0f,90.0f, 0.0f); 
marker3.rotation = cc3v(0.0f, 130.0f, 0.0f); 
marker4.rotation = cc3v(0.0f, 180.0f, 0.0f); 
marker5.rotation = cc3v(0.0f, 225.0f, 0.0f); 
marker6.rotation = cc3v(0.0f, 270.0f, 0.0f); 

marker7.rotation = cc3v(0.0f, 315.0f,0.0f); 





CC3Node* runningTrack = [CC3Node nodeWithName: kRunningTrackName]; 
runningTrack.location = cc3v(0.0, 10.0, 0.0);; 
[self addChild: runningTrack]; 

CCActionInterval* runLap = [CC3RotateBy actionWithDuration: 10.0 rotateBy: cc3v(0.0, 360.0, 0.0)]; 
[runningTrack runAction: [CCRepeatForever actionWithAction: runLap]]; 

[runningTrack addChild:marker]; 
[runningTrack addChild:marker1]; 
[runningTrack addChild:marker2]; 
[runningTrack addChild:marker3]; 
[runningTrack addChild:marker4]; 
[runningTrack addChild:marker5]; 
[runningTrack addChild:marker6]; 
[runningTrack addChild:marker7]; 

//[self addChild: dieCube]; 

}

입니다 물어 봤다. Karim