-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: SceneNode,
backgroundBlurriness
- Loading branch information
Showing
7 changed files
with
56 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import Node from '../core/Node.js'; | ||
import { addNodeClass } from '../core/Node.js'; | ||
import { nodeImmutable } from '../shadernode/ShaderNode.js'; | ||
import { reference } from './ReferenceNode.js'; | ||
|
||
class SceneNode extends Node { | ||
|
||
constructor( scope = SceneNode.BACKGROUND_BLURRINESS, scene = null ) { | ||
|
||
super(); | ||
|
||
this.scope = scope; | ||
this.scene = scene; | ||
|
||
} | ||
|
||
construct( builder ) { | ||
|
||
const scope = this.scope; | ||
const scene = this.scene !== null ? this.scene : builder.scene; | ||
|
||
let output; | ||
|
||
if ( scope === SceneNode.BACKGROUND_BLURRINESS ) { | ||
|
||
output = reference( 'backgroundBlurriness', 'float', scene ); | ||
|
||
} else { | ||
|
||
console.error( 'THREE.SceneNode: Unknown scope:', scope ); | ||
|
||
} | ||
|
||
return output; | ||
|
||
} | ||
|
||
} | ||
|
||
SceneNode.BACKGROUND_BLURRINESS = 'backgroundBlurriness'; | ||
|
||
export default SceneNode; | ||
|
||
export const backgroundBlurriness = nodeImmutable( SceneNode, SceneNode.BACKGROUND_BLURRINESS ); | ||
|
||
addNodeClass( SceneNode ); |
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
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