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

Face4 incompatibility with threejs r60+ #13

Open
deathcap opened this issue Apr 6, 2014 · 0 comments · May be fixed by #14
Open

Face4 incompatibility with threejs r60+ #13

deathcap opened this issue Apr 6, 2014 · 0 comments · May be fixed by #14

Comments

@deathcap
Copy link
Collaborator

deathcap commented Apr 6, 2014

three.js r60 removed quads (Face4), for compatibility it can be replaced with two triangles (Face3):

https://github.com/mrdoob/three.js/wiki/Migration

r59 → r60
Face4 removed. Use 2 Face3 to emulate it.

if (q.length === 5) {
  var f = new this.THREE.Face4(q[0], q[1], q[2], q[3])
  f.color = new this.THREE.Color(q[4])
  geometry.faces.push(f)

something like:

if (q.length === 5) {
  var f = new this.THREE.Face3(q[0], q[1], q[2])
  f.color = new this.THREE.Color(q[4])
  geometry.faces.push(f)

  var g = new this.THREE.Face3(q[3], q[2], q[1])
  g.color = new this.THREE.Color(q[4])
  geometry.faces.push(g)

but the faceVertexUvs (from this.faceVertexUv()) would also need updating accordingly

ref max-mapper/voxel-engine#74

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 a pull request may close this issue.

1 participant