lightSpecular() not working in Javascript mode

edited October 2013 in JavaScript Mode

Hey guys, lightSpecular(), for some reason, works perfectly in java mode but not Javascript mode. There is no error, but just no effect at all.

Example:

void setup(){
size(400, 400, P3D);
noStroke();
}
void draw(){
background(0);
lightSpecular(255,255,255);
directionalLight(249, 250, 91, 0,0,-1);
emissive(0, 26, 51);
fill(255);
translate(mouseX,mouseY,0);
sphere(40);
}

Thanks for any help.

Answers

  • FYI:

    • You need a blank line before the code for highlighting it.
    • There is a category about JS mode. Moved the topic there.
  • any answers?

  • edited October 2013

    Java mode seems to assume the same values for specular() as in lightSpecular() if you don't specify specular(). In JavaScript mode, you have to specify specular() explicitly, otherwise it uses a gray value.

Sign In or Register to comment.