Skip to content

Commit

Permalink
fix: expose addNodeMaterial and createNodeMaterialFromType (#1122)
Browse files Browse the repository at this point in the history
* 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 <nbierema@gmail.com>
  • Loading branch information
0b5vr and Methuselah96 authored Jul 23, 2024
1 parent 5769807 commit cf8707e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion types/three/src/nodes/materials/Materials.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.
export { default as MeshSSSPhysicalNodeMaterial } from "./MeshSSSNodeMaterial.js";
export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js";
export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js";
export { default as NodeMaterial } from "./NodeMaterial.js";
export { addNodeMaterial, createNodeMaterialFromType, default as NodeMaterial } from "./NodeMaterial.js";
export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js";
export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js";
export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js";
Expand Down
3 changes: 3 additions & 0 deletions types/three/src/nodes/materials/NodeMaterial.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,6 @@ export default class NodeMaterial extends Material {
static fromMaterial(material: NodeMaterial): NodeMaterial;
static fromMaterial(material: Material): NodeMaterial;
}

export function addNodeMaterial(type: string, nodeMaterial: typeof NodeMaterial): void;
export function createNodeMaterialFromType(type: string): NodeMaterial;

0 comments on commit cf8707e

Please sign in to comment.