IGNF / itowns-legacy

iTowns is a JS/WebGL framework for 3D geospatial data visualization
Other
53 stars 20 forks source link

mat4/vec4 -> mat3/vec3, PPS and size support #20

Closed mbredif closed 8 years ago

mbredif commented 8 years ago
  1. Move in projective-texturing from Mat4/Vec4 to Mat3/Vec3 whenever possible, to simplify and optimize code
    • less varyings : v_texcoord : vec4 -> vec3
    • removal of many (0,0,0,1)-like matrix columns and lines
    • mat4/vec4 -> mat3/vec3 multiplications in JS and glsl code
  2. Correct routing of PPS and Size from json to glsl (merged from @gmaillet's PR #16)
  3. That required extending the Matrix3 prototype in three.js with Matrix4-like functions
    • m3 and m3v uniforms, fromArray, multiplyMatrices, flattenToArray, flattenToArrayOffset, makeRotationFromQuaternion)
    • m3 and m3v uniforms support necessitated to modify three.js, the rest being coded in threeExt.js

todo: update three to more recent revision #19

This tentatively closes #8, but not #15 and #17.