#68 ✓resolved
lindsay.kay (at xeolabs)

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

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.

New-ticket Create new ticket

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.

Shared Ticket Bins

People watching this ticket

Pages