Skip to content

Commit cf8707e

Browse files
0b5vrMethuselah96
andauthored
fix: expose addNodeMaterial and createNodeMaterialFromType (#1122)
* fix: expose addNodeMaterial and createNodeMaterialFromType these functions are now exposed - See: https://github.com/mrdoob/three.js/blob/a00f79b32274975d5bd5c0f3d83ac8c31efec64d/src/nodes/materials/Materials.js#L3 - See: https://github.com/mrdoob/three.js/blob/a00f79b32274975d5bd5c0f3d83ac8c31efec64d/src/nodes/Nodes.js#L200 * refactor: npm run format * Update --------- Co-authored-by: Nathan Bierema <[email protected]>
1 parent 5769807 commit cf8707e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

types/three/src/nodes/materials/Materials.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.
88
export { default as MeshSSSPhysicalNodeMaterial } from "./MeshSSSNodeMaterial.js";
99
export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js";
1010
export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js";
11-
export { default as NodeMaterial } from "./NodeMaterial.js";
11+
export { addNodeMaterial, createNodeMaterialFromType, default as NodeMaterial } from "./NodeMaterial.js";
1212
export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js";
1313
export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js";
1414
export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js";

types/three/src/nodes/materials/NodeMaterial.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,6 @@ export default class NodeMaterial extends Material {
118118
static fromMaterial(material: NodeMaterial): NodeMaterial;
119119
static fromMaterial(material: Material): NodeMaterial;
120120
}
121+
122+
export function addNodeMaterial(type: string, nodeMaterial: typeof NodeMaterial): void;
123+
export function createNodeMaterialFromType(type: string): NodeMaterial;

0 commit comments

Comments
 (0)