forked from xml3d/xml3d.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplified light implementation a bit
- Loading branch information
Showing
6 changed files
with
116 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
var uniqueObjectId = require("../../webgl/base/utils.js").getUniqueCounter(); | ||
/** | ||
* Connects a light model with a data node containing light paramters | ||
* and a render light to evaluate the world position of the light. | ||
* The LightConfiguration is immutable | ||
* | ||
* @param model The light model | ||
* @param {Xflow.DataNode} dataNode The light parameters of this node | ||
* @param {RenderLight} light The light in the transformation hierarchy | ||
* @param {{}} opt | ||
* @constructor | ||
*/ | ||
var LightConfiguration = function(model, dataNode, opt) { | ||
opt = opt || {}; | ||
|
||
this.id = uniqueObjectId(); | ||
|
||
/** | ||
* @type {{type: string}} | ||
*/ | ||
this.model = model; | ||
|
||
/** | ||
* Data Node of the renderObject | ||
* @type {Xflow.DataNode} | ||
*/ | ||
this.dataNode = dataNode; | ||
|
||
/** | ||
* A name for debug purposes | ||
* @type {string|null} | ||
*/ | ||
this.name = opt.name || null; | ||
}; | ||
|
||
module.exports = LightConfiguration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters