-
-
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 Lut3DNode. * Update three.js * Add examples * Update * Updates * Updates * Update patch and delete examples
- Loading branch information
1 parent
7b963c6
commit 33e7d0e
Showing
6 changed files
with
171 additions
and
2 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
Submodule three.js
updated
15 files
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,18 @@ | ||
import { Data3DTexture, Loader, Texture } from "three"; | ||
|
||
export interface LUTImageResult { | ||
size: number; | ||
texture3D: Data3DTexture; | ||
} | ||
|
||
export class LUTImageLoader extends Loader<LUTImageResult> { | ||
flip: boolean; | ||
|
||
constructor(flipVertical?: boolean); | ||
|
||
getImageData(texture: Texture): ImageData; | ||
|
||
horz2Vert(texture: Texture): ImageData; | ||
|
||
parse(dataArray: Uint8ClampedArray, size: number): LUTImageResult; | ||
} |
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,30 @@ | ||
import { Data3DTexture } from "../../textures/Data3DTexture.js"; | ||
import Texture3DNode from "../accessors/Texture3DNode.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"; | ||
|
||
declare class Lut3DNode extends TempNode { | ||
inputNode: Node; | ||
lutNode: Texture3DNode; | ||
size: ShaderNodeObject<UniformNode<number>>; | ||
intensityNode: UniformNode<number>; | ||
|
||
constructor(inputNode: Node, lutNode: UniformNode<Data3DTexture>, size: number, intensityNode: UniformNode<number>); | ||
} | ||
|
||
export const lut3D: ( | ||
node: NodeRepresentation, | ||
lut: NodeRepresentation, | ||
size: number, | ||
intensity: NodeRepresentation, | ||
) => ShaderNodeObject<Lut3DNode>; | ||
|
||
declare module "../shadernode/ShaderNode.js" { | ||
interface NodeElements { | ||
lut3D: typeof lut3D; | ||
} | ||
} | ||
|
||
export default Lut3DNode; |