initial commit
This commit is contained in:
25
node_modules/three/examples/js/nodes/utils/ResolutionNode.js
generated
vendored
Normal file
25
node_modules/three/examples/js/nodes/utils/ResolutionNode.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* @author sunag / http://www.sunag.com.br/
|
||||
*/
|
||||
|
||||
THREE.ResolutionNode = function( renderer ) {
|
||||
|
||||
THREE.Vector2Node.call( this );
|
||||
|
||||
this.requestUpdate = true;
|
||||
|
||||
this.renderer = renderer;
|
||||
|
||||
};
|
||||
|
||||
THREE.ResolutionNode.prototype = Object.create( THREE.Vector2Node.prototype );
|
||||
THREE.ResolutionNode.prototype.constructor = THREE.ResolutionNode;
|
||||
|
||||
THREE.ResolutionNode.prototype.updateFrame = function( delta ) {
|
||||
|
||||
var size = this.renderer.getSize();
|
||||
|
||||
this.x = size.width;
|
||||
this.y = size.height;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user