-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Nature of issue?
- Found a bug
- Existing feature enhancement
- New feature request
Most appropriate sub-area of p5.js?
- Color
- Core
- Data
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Other (specify if possible)
Which platform were you using when you encountered this?
- Mobile/Tablet (touch devices)
- Desktop/Laptop
- Others (specify if possible)
Details about the bug:
The pointLight function doesn't work with the p5.min.js file (got it by exporting a project from the web editor). Used an older p5.js file (from the older IDE package) and it works perfectly (p5.js v0.4.23 March 04, 2016).
This should be fixed for a correct use of the web editor.
- p5.js version: p5.min.js v0.5.11 June 01, 2017
- Web browser and version: Google Chrome | 60.0.3112.113 (Official Build) (64-bit)
- Operating System: OSX El Capitan, Version 10.11.6
- Steps to reproduce this:
You can check the differences in the following sites: older-p5-working version / p5.min-not-working version (can be reproduced on the web editor). The sketch is this one:
function setup(){
createCanvas(400, 400, WEBGL);
}
function draw(){
background(0);
//move your mouse to change light direction
var dirX = (mouseX / width - 0.5) *2;
var dirY = (mouseY / height - 0.5) *(-2);
pointLight(0, 0, 250, dirX, dirY, -0.6);
ambientMaterial(250);
sphere(100);
translate(0, 200);
sphere(100);
}