Skip to content

Commit

Permalink
Fix nodes imports (#721)
Browse files Browse the repository at this point in the history
* Use relative imports

* Fix imports
  • Loading branch information
Methuselah96 committed Dec 21, 2023
1 parent a07be40 commit b09cce7
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion types/three/examples/jsm/nodes/accessors/PositionNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Node from '../core/Node.js';
import { Swizzable } from '../shadernode/ShaderNode';
import { Swizzable } from '../shadernode/ShaderNode.js';

export type PositionNodeScope =
| typeof PositionNode.GEOMETRY
Expand Down
2 changes: 1 addition & 1 deletion types/three/examples/jsm/nodes/code/CodeNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Node from '../core/Node.js';
import NodeBuilder from '../core/NodeBuilder.js';
import { NodeTypeOption } from '../core/constants';
import { NodeTypeOption } from '../core/constants.js';
import { Swizzable } from '../shadernode/ShaderNode.js';

export interface CodeNodeInclude {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

declare const BRDF_GGX: ShaderNode<{ lightDirection: Node; f0: Node; f90: Node; roughness: Node }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

declare const BRDF_Lambert: ShaderNode<{ diffuseColor: Node }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

// Analytical approximation of the DFG LUT, one half of the
Expand Down
2 changes: 1 addition & 1 deletion types/three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

// Microfacet Models for Refraction through Rough Surfaces - equation (33)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

declare const F_Schlick: ShaderNode<{ f0: Node; f90: Node; dotVH: Node }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

declare const V_GGX_SmithCorrelated: ShaderNode<{ alpha: Node; dotNL: Node; dotNV: Node }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../shadernode/ShaderNodeElements.js';
import { ShaderNode } from '../shadernode/ShaderNode.js';
import Node from '../core/Node.js';

declare const PhysicalLightingModel: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeBaseElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';

declare const getGeometryRoughness: ShaderNode;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ShaderNode } from '../../shadernode/ShaderNodeElements.js';
import { ShaderNode } from '../../shadernode/ShaderNode.js';
import Node from '../../core/Node.js';

declare const getRoughness: ShaderNode<{ roughness: Node }>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { mx_hsvtorgb, mx_rgbtohsv } from './lib/mx_hsv.js';
import { Swizzable } from '../shadernode/ShaderNodeElements.js';
import { Swizzable } from '../shadernode/ShaderNode.js';
import { UVNode, MathNode } from '../Nodes.js';
import { NodeRepresentation } from '../shadernode/ShaderNode.js';

Expand Down
5 changes: 4 additions & 1 deletion types/three/examples/jsm/nodes/shadernode/ShaderNode.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { ConstNode, Node, NodeBuilder, NodeTypeOption, SwizzleOption } from '../Nodes.js';
import Node from '../core/Node.js';
import { NodeTypeOption, SwizzleOption } from '../core/constants.js';
import ConstNode from '../core/ConstNode.js';
import NodeBuilder from '../core/NodeBuilder.js';

export type Swizzable<T extends Node = Node> = T & {
[key in SwizzleOption | number]: Swizzable;
Expand Down

0 comments on commit b09cce7

Please sign in to comment.