Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #441, #440, #439, #438 (Mirror/GeomUtil) #503

Closed
wants to merge 5 commits into from
Closed

Fix for #441, #440, #439, #438 (Mirror/GeomUtil) #503

wants to merge 5 commits into from

Conversation

80prozent
Copy link
Contributor

I made some changes to the "tools/command/mirror.as" and the "tools/utils/GeomUtil.as" to eliminate the bugs reported in issues #440, #439, #438.

This is my first Commit to another Repo than my own, so i hope i am doing this the right way.

@80prozent
Copy link
Contributor Author

I addet a optional parameter "addionalOffset" to the apply() function of Mirror.as.
I dont think it adds much to the calculation-time, but is quite usefull.

mirror_addionalOffset

@80prozent
Copy link
Contributor Author

Fabrice had the idea for the functions in my last commit.
To test this functions, try this code:

var wheel_FrontLeft:Mesh;
var wheel_FrontRight:Mesh;
var wheel_BackLeft:Mesh;
var wheel_BackRight:Mesh;

wheel_FrontLeft = new Mesh(new CylinderGeometry(30, 30, 20,16,1,true,true,true,false))
wheel_FrontRight = mirror.getMirroredClone(wheel_FrontLeft, Mirror.Z_AXIS, Mirror.CENTER, 0);
wheel_FrontLeft.z = -120;
wheel_FrontRight.z = 120;
wheel_FrontLeft.x = -160;
wheel_FrontRight.x = -160;
wheel_BackLeft = mirror.getMirroredClone(wheel_FrontLeft, Mirror.X_AXIS, Mirror.CENTER,0);
wheel_BackRight = mirror.getMirroredClone(wheel_FrontRight, Mirror.X_AXIS, Mirror.CENTER, 0);
wheel_BackLeft.x = 160;
wheel_BackRight.x = 160;

wheel_BackLeft.material= new ColorMaterial(0x00AA33);
wheel_BackRight.material= new ColorMaterial(0x00AA33);

wheel_BackRight.rotationZ = 10;
wheel_BackLeft.rotationZ = 25;
wheel_FrontRight.rotationZ = 35;
wheel_FrontLeft.rotationZ = 75;

scene.addChild(wheel_FrontLeft);
scene.addChild(wheel_FrontRight);
scene.addChild(wheel_BackLeft);
scene.addChild(wheel_BackRight);

@Fabrice3D
Copy link
Member

done

@Fabrice3D Fabrice3D closed this Apr 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants