forked from mrdoob/three.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
358 additions
and
76 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class UniformGroup { | ||
|
||
constructor( name ) { | ||
|
||
this.name = name; | ||
|
||
this.isUniformGroup = true; | ||
|
||
} | ||
|
||
} | ||
|
||
export default UniformGroup; |
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 @@ | ||
import Node from './Node.js'; | ||
import { addNodeClass } from './Node.js'; | ||
|
||
class UniformGroupNode extends Node { | ||
|
||
constructor( name, shared = false ) { | ||
|
||
super( 'string' ); | ||
|
||
this.name = name; | ||
this.version = 0; | ||
|
||
this.shared = shared; | ||
|
||
this.isUniformGroup = true; | ||
|
||
} | ||
|
||
set needsUpdate( value ) { | ||
|
||
if ( value === true ) this.version ++; | ||
|
||
} | ||
|
||
} | ||
|
||
export const uniformGroup = ( name ) => new UniformGroupNode( name ); | ||
export const sharedUniformGroup = ( name ) => new UniformGroupNode( name, true ); | ||
|
||
export const frameGroup = sharedUniformGroup( 'frame' ); | ||
export const renderGroup = sharedUniformGroup( 'render' ); | ||
export const objectGroup = uniformGroup( 'object' ); | ||
|
||
export default UniformGroupNode; | ||
|
||
addNodeClass( 'UniformGroupNode', UniformGroupNode ); |
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
Oops, something went wrong.