-
Notifications
You must be signed in to change notification settings - Fork 84
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
An almost working sphere primitive #37
Comments
Please help (: |
I could make a cone and a cylinder relatively easy as well by the way. The only complex issue is how to practically put the UVs on them. |
Way cool..that's something I've been meaning to do for ages. As for the texture problem, it seems to be working for me are you using a power of two texture? PS its bad practice to but "{" on next line in javascript since it makes the code ambiguous. |
Nope I wasn't. And yup that was it. It's not in the api documentation on your site. If it were a wiki I'd put it there myself. Wait a week before you integrate the sphere and I'll give you one that has a better uv coordinate system. I can also create a cylinder and a cone mesh relatively easily. The only issue with the cone and the cylinder is how to map the uv coordinates to the bottom of the cone or the top and bottom of the cylinder. When I decided on the uv system for the sphere (that I haven't posted yet I think, I am a few versions further) I assumed that the sphere would be used with panorama textures for stuff like sky domes etc. I included an option for inverting the normals so you can make the inside visible, instead of the outside. And if you have any comments on how you'd like them, please post it. Cheers ^ ^ d |
You're right a wiki is defiantly needed, would probably prompt me to do a little more documenting when I get a chance too. I'll see about sorting that out. |
I see you have already something in the wiki right here in github. I think there is something to be said for not creating a new place to go look for stuff. And as with issue stuff here gets decent over time :) |
The sphere loads, but it won't show the texture properly. All I get is a black shape.
First I give the sphere code, then I give the code that will load the sphere but won't load the texture...
THE SPHERE
function createSphere( heightDivisions, pieSlices, invertNormals )
{
var normalDirection = 1 ;
THE INVOKING CODE
The text was updated successfully, but these errors were encountered: