« New BMW Z4 : Expression of Joy Campaign Quaternion Rotation Demo »
Social
Tweets
- Git和Mercurial代码托管服务,5人以下免费。https://t.co/nKsrdq40 2012-03-17
- Real-time bug tracking service for Android, iOS & WP7 http://t.co/ZnawP2mv 2012-03-17
- DocSets App for iOS - great tool for iOS developer. http://t.co/kU26IRGq 2012-02-01
- Road Inc: Every Car-Lover’s Dream http://t.co/fEpCvXWG http://t.co/lfJauhIh 2011-12-30
- 我只是想画些矢量的图形来做动画,一开始尝试用drawRect来逐帧绘制,刷新率太低。换用CAShapeLayer后性能终于好了一点。#iOS 2011-11-11
- Nissan Juke (Stage3D) http://t.co/bIMPBGB8 特别喜欢它的换色特效和行驶时的光线效果。 2011-10-26
- More updates...
MyZoo
Friend














what to change in the code if I want to rotate the middle pieces also.
Hi Kevin, its me again.. Im trying to make a rubiks cube game based on this. Is there any way to trace when people already solved the rubiks. I know we can keep record of the single movement they've made, however people will have all sort of movements and different types of solution for the rubiks. Is there any way to tell the system that, ok the rubiks is solved now, all the sides have the same color, then do this.
Your help is greatly appreciated man.
Thanks
One thing I came out is to check each cube's transform matrix when single rotation animation is done. But the code need to be seriously rewrited. Definitely, there must be better algorithm, but I can't find any useful information right now.
Good luck!
Let me try to explain:
we have the cube and today when press the key "l" rotate the left, "r" right, "d" down… and so son but I need to rotate the main axis (the cubes between left ("l") and right ("r").
If it`s no clear I can make an image and show u.
BR,
Dudu
It’s impossible to rotate the “middle cubes” in a real rubik’s cube, but if you just want it that way, you must develop it by yourself.
Hello,
Do you know how can I modify to rotate the cube in the middle?
Because today the axis in the middle it`s not rotating.
BR,
Dudu
what do you mean “cube in the middle”?
Hello,
I`m using this cube but I don`t know how to add event when I click in the cubes.
I have added InteractiveScene3DEvent, and MouseEvent to my cube object but I can`t get when the cube is clicked.
Can you help me?
BR,
Dudu
Did you set interactive material to the cube?
What do you mean by setting interactive material to the cube?
I using as I downloaded and put to listen the events to the cube. I tried InteractiveScene3DEvemt, MouseEvent and when I click in the cube, nothing happens.
Can you help me please?
BR,
Dudu
Yes, I set
frontMat.interactive = true;
But doens't work also.
You need to set event handler for each child “cube”:
for(var i : uint = 0;i < 26; i++) {
rubiksCube.getChildByName("cube" + (i + 1)).addEventListener(InteractiveScene3DEvent.OBJECT_CLICK, clickHandler);
}
Hello Kevin,
I tried this and didn't work. I remove the stage listener and not happened.
I'm using this version of papervision: Papervision3D 2.1 rev920 (August 11th, 2009)
Could I send my code for you or could you send me a code with the click event working in this cube?
Thanks you very much,
Dudu
check out this post:
http://kevincao.com/2009/09/rubikscubes-interactive-material-issue/
Thank you very much Kevin….
I was missing var cube : DisplayObject3D = event.target as DisplayObject3D;
BR,
Dudu
Hello,
How to add event when I click on a cube face in this sample?
I tried but no success. Anyone can help me please?
BR,
Dudu