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

Colors from js Model #107

Open
MiguelAngelLV opened this issue Oct 31, 2013 · 5 comments
Open

Colors from js Model #107

MiguelAngelLV opened this issue Oct 31, 2013 · 5 comments
Labels

Comments

@MiguelAngelLV
Copy link

ThreeJS format use RRGGBB format for color and Three Dart I think use BBGGRR , so you get incorrect colors and need manual change the js model materials.

@nelsonsilva
Copy link
Member

Do you have any example i can use to test this ? Colors are parsed from hex so it should work.

@nelsonsilva
Copy link
Member

@MiguelAngelLV Any way i can test this ?

@MiguelAngelLV
Copy link
Author

@nelsonsilva
Copy link
Member

@MiguelAngelLV Can you plz provide a full example to check how you're loading the materials ?

@MiguelAngelLV
Copy link
Author

void _loadModel() {

    JSONLoader loader = new JSONLoader(showStatus: true);
    loader.load(config['url'], (Geometry geometry) {


      Mesh mesh = new Mesh( geometry, new MeshFaceMaterial(geometry.materials));

      mesh.rotation.x = degToRad(90);
      mesh.scale.setValues(30.0, 30.0, 30.0);

      model = new Scene();
      model.add(mesh);
      scene.add(model);


      camera.lookAt(model.position);


    } );

  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants