Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Help]/[Request] Modify the Lighting Canvas?

Is there any way to draw on or target the lighting canvass via the API? I'm attempting to implement a modification that allows me to create "ambient" light by reducing the opacity of the lighting layer, or the shapes drawn on it, but the sandbox model currently prevents me from targeting the canvass object with Javascript because it's part of the DOM. If it doesn't exist, is there any chance you can expose a hook for this element somehow, or possibly expose a variable for this that allows it to be set in the API and pushed to the user's browser? I've seen quite a few forum entries on this subject that could all be solved by such a simple addition, and it would make the dynamic lighting usable for my purposes, currently it doesn't work at all because the players can't see any parts of the map they aren't in. Alternately a non API solution might be to bootstrap off the settings in the GM view, and either create a second "player" slider? There are obviously hacky solutions like creating a browser plugin or greasemonkey theme or similar, but I'd prefer to try and tackle this through the API or the tabletop system if at all possible...
1404016691
The Aaron
Roll20 Production Team
API Scripter
You can't access DOM elements from the API, and it doesn't seem practical to allow it. I would like to see a fog of war in the old Warcraft 2/Starcraft style where portions if the map layer revealed through lighting would remain visible but dim. There was a discussion about this yesterday with some suggested alternatives: <a href="https://app.roll20.net/forum/post/960781/dynamic-l" rel="nofollow">https://app.roll20.net/forum/post/960781/dynamic-l</a>..