Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var Menu = function () {
this.message = "Positional light";
this["dir.x"] = 5.0;
this["dir.y"] = -5.0;
this["dir.z"] = -5.0;
this["color.r"] = 1.0;
this["color.g"] = 1.0;
this["color.b"] = 1.0;
this.specular = true;
this.diffuse = true;
var self = this;
// This is actually quite inefficient because it continually updates
// the scene graph, forcing frames to continually re-render.
// Your GPU's not going to like it, but it's just for a quick and dirty demo.
var update = function () {
myLights.setLights({
"0":{
dir:{
var Menu = function () {
this.message = "Directional light";
this["dir.x"] = 5.0;
this["dir.y"] = -5.0;
this["dir.z"] = -5.0;
this["color.r"] = 1.0;
this["color.g"] = 1.0;
this["color.b"] = 1.0;
this.specular = true;
this.diffuse = true;
var self = this;
// This is actually quite inefficient because it continually updates
// the scene graph, forcing frames to continually re-render.
// Your GPU's not going to like it, but it's just for a quick and dirty demo.
var update = function () {
myLights.setLights({
"0":{
dir:{
var Menu = function () {
this.start = myFog.getStart();
this.end = myFog.getEnd();
this.density = myFog.getDensity();
this.mode = myFog.getMode();
var color = myFog.getColor();
this["color.r"] = color.r;
this["color.g"] = color.g;
this["color.b"] = color.b;
var self = this;
// This is actually quite inefficient because it continually updates
// the scene graph, forcing frames to continually re-render.
// Your GPU's not going to like it, but it's just for a quick and dirty demo.
var update = function () {
myFog.setStart(self.start);
myFog.setEnd(self.end);
myFog.setDensity(self.density);
myFog.setMode(self.mode);
myFog.setColor({
r:self["color.r"],
var Menu = function () {
this.start = myFog.getStart();
this.end = myFog.getEnd();
this.density = myFog.getDensity();
this.mode = myFog.getMode();
var color = myFog.getColor();
this["color.r"] = color.r;
this["color.g"] = color.g;
this["color.b"] = color.b;
var self = this;
// This is actually quite inefficient because it continually updates
// the scene graph, forcing frames to continually re-render.
// Your GPU's not going to like it, but it's just for a quick and dirty demo.
var update = function () {
myFog.setStart(self.start);
myFog.setEnd(self.end);
myFog.setDensity(self.density);
myFog.setMode(self.mode);
myFog.setColor({
r:self["color.r"],
var Menu = function () {
this["dir.x"] = 5.0;
this["dir.y"] = -5.0;
this["dir.z"] = -5.0;
this["color.r"] = 1.0;
this["color.g"] = 1.0;
this["color.b"] = 1.0;
this.specular = true;
this.diffuse = true;
var self = this;
var update = function () {
lights.setLights({
"0":{
dir:{
x:self["dir.x"],
y:self["dir.y"],
z:self["dir.z"]
},
color:{
var update = function () {
myFog.setStart(self.start);
myFog.setEnd(self.end);
myFog.setDensity(self.density);
myFog.setMode(self.mode);
myFog.setColor({
r:self["color.r"],
g:self["color.g"],
b:self["color.b"]
});
requestAnimationFrame(update);
};
var update = function () {
myLights.setLights({
"0":{
dir:{
x:self["dir.x"],
y:self["dir.y"],
z:self["dir.z"]
},
color:{
r:self["color.r"],
g:self["color.g"],
b:self["color.b"]
},
specular:self.specular,
diffuse:self.diffuse
}
});
requestAnimationFrame(update);
};
var update = function () {
lights.setLights({
"0":{
dir:{
x:self["dir.x"],
y:self["dir.y"],
z:self["dir.z"]
},
color:{
r:self["color.r"],
g:self["color.g"],
b:self["color.b"]
},
specular:self.specular,
diffuse:self.diffuse
}
});
requestAnimationFrame(update);
};
var update = function () {
myFog.setStart(self.start);
myFog.setEnd(self.end);
myFog.setDensity(self.density);
myFog.setMode(self.mode);
myFog.setColor({
r: self["color.r"],
g: self["color.g"],
b: self["color.b"]
});
requestAnimationFrame(update);
};
var update = function () {
myFog.setStart(self.start);
myFog.setEnd(self.end);
myFog.setDensity(self.density);
myFog.setMode(self.mode);
myFog.setColor({
r:self["color.r"],
g:self["color.g"],
b:self["color.b"]
});
requestAnimationFrame(update);
};