Update WebGL Exporter to support current SceneJS version
Reported by lindsay.kay (at xeolabs) | May 12th, 2010 @ 06:40 AM
WebGL Exporter exports Geometry nodes for SceneJS V0.1.0 alpha, so it no longer works with current version since some of the Geometry config properties have changed.
Solution
Fix this file:
http://code.google.com/p/blender-webgl-exporter/source/browse/trunk...
1. Flatten the output arrays
Eg. change statements like this:
if(exp_normals == 1):
s += "normals : ["
for v in mesh.verts:
s += "[%.6f, %.6f, %.6f]," % (v.no.x, v.no.y, v.no.z)
to this:
if(exp_normals == 1):
s += "normals : ["
for v in mesh.verts:
s += "%.6f, %.6f, %.6f," % (v.no.x, v.no.y, v.no.z)
2. Change "vertices" to "positions"
3. Change "texCoords" to "uv"
Comments and changes to this ticket
-
lindsay.kay (at xeolabs) October 23rd, 2010 @ 02:26 AM
- State changed from new to resolved
- Milestone order changed from 0 to 0
Done by Rehno, ta muchly
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.