-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Node: Add DotScreenNode and RGBShiftNode. (#1063)
* Node: Add DotScreenNode and RGBShiftNode. * Update three.js * Add examples * Fixes * Update patch * Delete examples
- Loading branch information
1 parent
c9a1c5b
commit 3e7291d
Showing
5 changed files
with
74 additions
and
1 deletion.
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
Submodule three.js
updated
14 files
+73 −4 | build/three.cjs | |
+73 −4 | build/three.module.js | |
+1 −1 | build/three.module.min.js | |
+1 −1 | docs/api/en/materials/Material.html | |
+1 −0 | examples/files.json | |
+2 −0 | examples/jsm/nodes/Nodes.js | |
+127 −0 | examples/jsm/nodes/display/DotScreenNode.js | |
+56 −0 | examples/jsm/nodes/display/RGBShiftNode.js | |
+ − | examples/screenshots/webgpu_postprocessing.jpg | |
+114 −0 | examples/webgpu_postprocessing.html | |
+1 −1 | package-lock.json | |
+1 −1 | package.json | |
+1 −1 | src/constants.js | |
+1 −0 | test/e2e/puppeteer.js |
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,32 @@ | ||
import { Vector2 } from "three"; | ||
import TextureNode from "../accessors/TextureNode.js"; | ||
import Node from "../core/Node.js"; | ||
import TempNode from "../core/TempNode.js"; | ||
import UniformNode from "../core/UniformNode.js"; | ||
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
|
||
export default class DotScreenNode extends TempNode { | ||
colorNode: Node; | ||
center: UniformNode<Vector2>; | ||
angle: UniformNode<number>; | ||
scale: UniformNode<number>; | ||
|
||
constructor(colorNode: Node, center?: Vector2, angle?: number, scale?: number); | ||
|
||
getTextureNode(): ShaderNodeObject<TextureNode>; | ||
|
||
setSize(width: number, height: number): void; | ||
} | ||
|
||
export const dotScreen: ( | ||
node: NodeRepresentation, | ||
center?: Vector2, | ||
angle?: number, | ||
scale?: number, | ||
) => ShaderNodeObject<DotScreenNode>; | ||
|
||
declare module "../shadernode/ShaderNode.js" { | ||
interface NodeElements { | ||
dotScreen: typeof dotScreen; | ||
} | ||
} |
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,24 @@ | ||
import TextureNode from "../accessors/TextureNode.js"; | ||
import TempNode from "../core/TempNode.js"; | ||
import UniformNode from "../core/UniformNode.js"; | ||
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
|
||
export default class RGBShiftNode extends TempNode { | ||
textureNode: TextureNode; | ||
amount: UniformNode<number>; | ||
angle: UniformNode<number>; | ||
|
||
constructor(textureNode: TextureNode, amount?: number, angle?: number); | ||
|
||
getTextureNode(): TextureNode; | ||
|
||
setSize(width: number, height: number): void; | ||
} | ||
|
||
export const rgbShift: (node: NodeRepresentation, amount?: number, angle?: number) => ShaderNodeObject<RGBShiftNode>; | ||
|
||
declare module "../shadernode/ShaderNode.js" { | ||
interface NodeElements { | ||
rgbShift: typeof rgbShift; | ||
} | ||
} |