-
-
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.
TSL: PositionNode/ReflectVectorNode - Move to TSL approach (#1000)
* TSL: PositionNode/ReflectVectorNode - Move to TSL approach * Remove references to PositionNode * Add examples * Get things to pass * Delete examples
- Loading branch information
1 parent
e4e1af7
commit 3fe7027
Showing
6 changed files
with
18 additions
and
54 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
3 changes: 1 addition & 2 deletions
3
types/three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts
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 |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import Node from "../core/Node.js"; | ||
import { NodeRepresentation, ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
import PositionNode from "./PositionNode.js"; | ||
|
||
export default class ModelViewProjectionNode extends Node { | ||
constructor(positionNode?: PositionNode); | ||
constructor(positionNode?: Node); | ||
} | ||
|
||
export const modelViewProjection: (position?: NodeRepresentation) => ShaderNodeObject<ModelViewProjectionNode>; |
32 changes: 6 additions & 26 deletions
32
types/three/examples/jsm/nodes/accessors/PositionNode.d.ts
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 |
---|---|---|
@@ -1,29 +1,9 @@ | ||
import Node from "../core/Node.js"; | ||
import { ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
|
||
export type PositionNodeScope = | ||
| typeof PositionNode.GEOMETRY | ||
| typeof PositionNode.LOCAL | ||
| typeof PositionNode.WORLD | ||
| typeof PositionNode.WORLD_DIRECTION | ||
| typeof PositionNode.VIEW | ||
| typeof PositionNode.VIEW_DIRECTION; | ||
|
||
export default class PositionNode extends Node { | ||
static GEOMETRY: "geometry"; | ||
static LOCAL: "local"; | ||
static WORLD: "world"; | ||
static WORLD_DIRECTION: "worldDirection"; | ||
static VIEW: "view"; | ||
static VIEW_DIRECTION: "viewDirection"; | ||
scope: PositionNodeScope; | ||
|
||
constructor(scope?: PositionNodeScope); | ||
} | ||
|
||
export const positionGeometry: ShaderNodeObject<PositionNode>; | ||
export const positionLocal: ShaderNodeObject<PositionNode>; | ||
export const positionWorld: ShaderNodeObject<PositionNode>; | ||
export const positionWorldDirection: ShaderNodeObject<PositionNode>; | ||
export const positionView: ShaderNodeObject<PositionNode>; | ||
export const positionViewDirection: ShaderNodeObject<PositionNode>; | ||
export const positionGeometry: ShaderNodeObject<Node>; | ||
export const positionLocal: ShaderNodeObject<Node>; | ||
export const positionWorld: ShaderNodeObject<Node>; | ||
export const positionWorldDirection: ShaderNodeObject<Node>; | ||
export const positionView: ShaderNodeObject<Node>; | ||
export const positionViewDirection: ShaderNodeObject<Node>; |
11 changes: 3 additions & 8 deletions
11
types/three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts
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 |
---|---|---|
@@ -1,11 +1,6 @@ | ||
import Node from "../core/Node.js"; | ||
import VarNode from "../core/VarNode.js"; | ||
import { ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
|
||
export default class ReflectVectorNode extends Node { | ||
constructor(); | ||
|
||
getHash(): "reflectVector"; | ||
setup(): Node; | ||
} | ||
|
||
export const reflectVector: ShaderNodeObject<ReflectVectorNode>; | ||
export const reflectView: ShaderNodeObject<Node>; | ||
export const reflectVector: ShaderNodeObject<VarNode>; |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { PositionNode, TempNode } from "../Nodes.js"; | ||
import { Node, TempNode } from "../Nodes.js"; | ||
import { ShaderNodeObject } from "../shadernode/ShaderNode.js"; | ||
|
||
export default class EquirectUVNode extends TempNode { | ||
constructor(dirNode?: ShaderNodeObject<PositionNode>); | ||
constructor(dirNode?: ShaderNodeObject<Node>); | ||
} | ||
|
||
export const equirectUV: ShaderNodeObject<EquirectUVNode>; |
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