nodeMaterialConnectionPointCustomObject.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132
  1. import type { NodeMaterialBlock } from "./nodeMaterialBlock";
  2. import type { NodeMaterialConnectionPointDirection } from "./nodeMaterialBlockConnectionPoint";
  3. import { NodeMaterialConnectionPoint, NodeMaterialConnectionPointCompatibilityStates } from "./nodeMaterialBlockConnectionPoint";
  4. import type { Nullable } from "../../types";
  5. /**
  6. * Defines a connection point to be used for points with a custom object type
  7. */
  8. export declare class NodeMaterialConnectionPointCustomObject<T extends NodeMaterialBlock> extends NodeMaterialConnectionPoint {
  9. _blockType: new (...args: any[]) => T;
  10. private _blockName;
  11. /**
  12. * Creates a new connection point
  13. * @param name defines the connection point name
  14. * @param ownerBlock defines the block hosting this connection point
  15. * @param direction defines the direction of the connection point
  16. * @param _blockType
  17. * @param _blockName
  18. */
  19. constructor(name: string, ownerBlock: NodeMaterialBlock, direction: NodeMaterialConnectionPointDirection, _blockType: new (...args: any[]) => T, _blockName: string);
  20. /**
  21. * Gets a number indicating if the current point can be connected to another point
  22. * @param connectionPoint defines the other connection point
  23. * @returns a number defining the compatibility state
  24. */
  25. checkCompatibilityState(connectionPoint: NodeMaterialConnectionPoint): NodeMaterialConnectionPointCompatibilityStates;
  26. /**
  27. * Creates a block suitable to be used as an input for this input point.
  28. * If null is returned, a block based on the point type will be created.
  29. * @returns The returned string parameter is the name of the output point of NodeMaterialBlock (first parameter of the returned array) that can be connected to the input
  30. */
  31. createCustomInputBlock(): Nullable<[NodeMaterialBlock, string]>;
  32. }