1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537 |
- /// <reference types="react" />
- declare module NODEEDITOR {
- export class BlockTools {
- static GetBlockFromString(data: string, scene: BABYLON.Scene, nodeMaterial: BABYLON.NodeMaterial): BABYLON.DesaturateBlock | BABYLON.RefractBlock | BABYLON.ReflectBlock | BABYLON.DerivativeBlock | BABYLON.Rotate2dBlock | BABYLON.NormalBlendBlock | BABYLON.WorleyNoise3DBlock | BABYLON.SimplexPerlin3DBlock | BABYLON.BonesBlock | BABYLON.InstancesBlock | BABYLON.MorphTargetsBlock | BABYLON.DiscardBlock | BABYLON.ImageProcessingBlock | BABYLON.ColorMergerBlock | BABYLON.VectorMergerBlock | BABYLON.ColorSplitterBlock | BABYLON.VectorSplitterBlock | BABYLON.TextureBlock | BABYLON.ReflectionTextureBlock | BABYLON.LightBlock | BABYLON.FogBlock | BABYLON.VertexOutputBlock | BABYLON.FragmentOutputBlock | BABYLON.AddBlock | BABYLON.ClampBlock | BABYLON.ScaleBlock | BABYLON.CrossBlock | BABYLON.DotBlock | BABYLON.PowBlock | BABYLON.MultiplyBlock | BABYLON.TransformBlock | BABYLON.TrigonometryBlock | BABYLON.RemapBlock | BABYLON.NormalizeBlock | BABYLON.FresnelBlock | BABYLON.LerpBlock | BABYLON.NLerpBlock | BABYLON.DivideBlock | BABYLON.SubtractBlock | BABYLON.ModBlock | BABYLON.StepBlock | BABYLON.SmoothStepBlock | BABYLON.OneMinusBlock | BABYLON.ReciprocalBlock | BABYLON.ViewDirectionBlock | BABYLON.LightInformationBlock | BABYLON.MaxBlock | BABYLON.MinBlock | BABYLON.LengthBlock | BABYLON.DistanceBlock | BABYLON.NegateBlock | BABYLON.PerturbNormalBlock | BABYLON.RandomNumberBlock | BABYLON.ReplaceColorBlock | BABYLON.PosterizeBlock | BABYLON.ArcTan2Block | BABYLON.GradientBlock | BABYLON.FrontFacingBlock | BABYLON.WaveBlock | BABYLON.InputBlock | BABYLON.PBRMetallicRoughnessBlock | BABYLON.SheenBlock | BABYLON.AmbientOcclusionBlock | BABYLON.ReflectivityBlock | BABYLON.AnisotropyBlock | BABYLON.ReflectionBlock | BABYLON.ClearCoatBlock | BABYLON.RefractionBlock | BABYLON.SubSurfaceBlock | BABYLON.CurrentScreenBlock | BABYLON.ParticleTextureBlock | BABYLON.ParticleRampGradientBlock | BABYLON.ParticleBlendMultiplyBlock | BABYLON.FragCoordBlock | BABYLON.ScreenSizeBlock | null;
- static GetColorFromConnectionNodeType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): string;
- static GetConnectionNodeTypeFromString(type: string): BABYLON.NodeMaterialBlockConnectionPointTypes.Float | BABYLON.NodeMaterialBlockConnectionPointTypes.Vector2 | BABYLON.NodeMaterialBlockConnectionPointTypes.Vector3 | BABYLON.NodeMaterialBlockConnectionPointTypes.Vector4 | BABYLON.NodeMaterialBlockConnectionPointTypes.Color3 | BABYLON.NodeMaterialBlockConnectionPointTypes.Color4 | BABYLON.NodeMaterialBlockConnectionPointTypes.Matrix | BABYLON.NodeMaterialBlockConnectionPointTypes.AutoDetect;
- static GetStringFromConnectionNodeType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix" | "Color3" | "Color4" | "";
- }
- }
- declare module NODEEDITOR {
- interface ILogComponentProps {
- globalState: GlobalState;
- }
- export class LogEntry {
- message: string;
- isError: boolean;
- constructor(message: string, isError: boolean);
- }
- export class LogComponent extends React.Component<ILogComponentProps, {
- logs: LogEntry[];
- }> {
- constructor(props: ILogComponentProps);
- componentDidMount(): void;
- componentDidUpdate(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export enum PreviewType {
- Sphere = 0,
- Box = 1,
- Torus = 2,
- Cylinder = 3,
- Plane = 4,
- ShaderBall = 5,
- DefaultParticleSystem = 6,
- Bubbles = 7,
- Smoke = 8,
- Rain = 9,
- Explosion = 10,
- Fire = 11,
- Custom = 12
- }
- }
- declare module NODEEDITOR {
- export interface IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- }
- }
- declare module NODEEDITOR {
- export interface INodeLocationInfo {
- blockId: number;
- x: number;
- y: number;
- }
- export interface IFrameData {
- x: number;
- y: number;
- width: number;
- height: number;
- color: number[];
- name: string;
- isCollapsed: boolean;
- blocks: number[];
- comments: string;
- }
- export interface IEditorData {
- locations: INodeLocationInfo[];
- x: number;
- y: number;
- zoom: number;
- frames?: IFrameData[];
- map?: {
- [key: number]: number;
- };
- }
- }
- declare module NODEEDITOR {
- export class SerializationTools {
- static UpdateLocations(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<GraphFrame>): void;
- static Serialize(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<GraphFrame>): string;
- static Deserialize(serializationObject: any, globalState: GlobalState): void;
- static AddFrameToMaterial(serializationObject: any, globalState: GlobalState, currentMaterial: BABYLON.NodeMaterial): void;
- }
- }
- declare module NODEEDITOR {
- export class StringTools {
- private static _SaveAs;
- private static _Click;
- /**
- * Gets the base math type of node material block connection point.
- * @param type Type to parse.
- */
- static GetBaseType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): string;
- /**
- * Download a string into a file that will be saved locally by the browser
- * @param content defines the string to download locally as a file
- */
- static DownloadAsFile(document: HTMLDocument, content: string, filename: string): void;
- }
- }
- declare module NODEEDITOR {
- export class FrameNodePort extends NodePort {
- connectionPoint: BABYLON.NodeMaterialConnectionPoint;
- node: GraphNode;
- private _parentFrameId;
- private _isInput;
- private _framePortPosition;
- private _framePortId;
- private _onFramePortPositionChangedObservable;
- get parentFrameId(): number;
- get onFramePortPositionChangedObservable(): BABYLON.Observable<FrameNodePort>;
- get isInput(): boolean;
- get framePortId(): number;
- get framePortPosition(): FramePortPosition;
- set framePortPosition(position: FramePortPosition);
- constructor(portContainer: HTMLElement, connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, globalState: GlobalState, isInput: boolean, framePortId: number, parentFrameId: number);
- static CreateFrameNodePortElement(connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<IDisplayManager>, globalState: GlobalState, isInput: boolean, framePortId: number, parentFrameId: number): FrameNodePort;
- }
- }
- declare module NODEEDITOR {
- export enum FramePortPosition {
- Top = 0,
- Middle = 1,
- Bottom = 2
- }
- export class GraphFrame {
- private readonly CollapsedWidth;
- private static _FrameCounter;
- private static _FramePortCounter;
- private _name;
- private _color;
- private _x;
- private _y;
- private _gridAlignedX;
- private _gridAlignedY;
- private _width;
- private _height;
- element: HTMLDivElement;
- private _borderElement;
- private _headerElement;
- private _headerTextElement;
- private _headerCollapseElement;
- private _headerCloseElement;
- private _commentsElement;
- private _portContainer;
- private _outputPortContainer;
- private _inputPortContainer;
- private _nodes;
- private _ownerCanvas;
- private _mouseStartPointX;
- private _mouseStartPointY;
- private _onSelectionChangedObserver;
- private _onGraphNodeRemovalObserver;
- private _onExposePortOnFrameObserver;
- private _onNodeLinkDisposedObservers;
- private _isCollapsed;
- private _frameInPorts;
- private _frameOutPorts;
- private _controlledPorts;
- private _id;
- private _comments;
- private _frameIsResizing;
- private _resizingDirection;
- private _minFrameHeight;
- private _minFrameWidth;
- private mouseXLimit;
- onExpandStateChanged: BABYLON.Observable<GraphFrame>;
- private readonly CloseSVG;
- private readonly ExpandSVG;
- private readonly CollapseSVG;
- get id(): number;
- get isCollapsed(): boolean;
- private _createInputPort;
- private _markFramePortPositions;
- private _createFramePorts;
- private _redrawFramePorts;
- set isCollapsed(value: boolean);
- get nodes(): GraphNode[];
- get ports(): FrameNodePort[];
- get name(): string;
- set name(value: string);
- get color(): BABYLON.Color3;
- set color(value: BABYLON.Color3);
- get x(): number;
- set x(value: number);
- get y(): number;
- set y(value: number);
- get width(): number;
- set width(value: number);
- get height(): number;
- set height(value: number);
- get comments(): string;
- set comments(comments: string);
- constructor(candidate: BABYLON.Nullable<HTMLDivElement>, canvas: GraphCanvasComponent, doNotCaptureNodes?: boolean);
- refresh(): void;
- addNode(node: GraphNode): void;
- removeNode(node: GraphNode): void;
- syncNode(node: GraphNode): void;
- cleanAccumulation(): void;
- private _onDown;
- move(newX: number, newY: number, align?: boolean): void;
- private _onUp;
- private _moveFrame;
- private _onMove;
- moveFramePortUp(nodePort: FrameNodePort): void;
- private _movePortUp;
- moveFramePortDown(nodePort: FrameNodePort): void;
- private _movePortDown;
- private initResizing;
- private cleanUpResizing;
- private updateMinHeightWithComments;
- private _isResizingTop;
- private _isResizingRight;
- private _isResizingBottom;
- private _isResizingLeft;
- private _onRightHandlePointerDown;
- private _onRightHandlePointerMove;
- private _moveRightHandle;
- private _onRightHandlePointerUp;
- private _onBottomHandlePointerDown;
- private _onBottomHandlePointerMove;
- private _moveBottomHandle;
- private _onBottomHandlePointerUp;
- private _onLeftHandlePointerDown;
- private _onLeftHandlePointerMove;
- private _moveLeftHandle;
- private _onLeftHandlePointerUp;
- private _onTopHandlePointerDown;
- private _onTopHandlePointerMove;
- private _moveTopHandle;
- private _onTopHandlePointerUp;
- private _onTopRightHandlePointerDown;
- private _onTopRightHandlePointerMove;
- private _moveTopRightHandle;
- private _onTopRightHandlePointerUp;
- private _onBottomRightHandlePointerDown;
- private _onBottomRightHandlePointerMove;
- private _moveBottomRightHandle;
- private _onBottomRightHandlePointerUp;
- private _onBottomLeftHandlePointerDown;
- private _onBottomLeftHandlePointerMove;
- private _moveBottomLeftHandle;
- private _onBottomLeftHandlePointerUp;
- private _onTopLeftHandlePointerDown;
- private _onTopLeftHandlePointerMove;
- private _moveTopLeftHandle;
- private _onTopLeftHandlePointerUp;
- private _expandLeft;
- private _expandTop;
- private _expandRight;
- private _expandBottom;
- dispose(): void;
- serialize(): IFrameData;
- export(): void;
- static Parse(serializationData: IFrameData, canvas: GraphCanvasComponent, map?: {
- [key: number]: number;
- }): GraphFrame;
- }
- }
- declare module NODEEDITOR {
- export class NodePort {
- connectionPoint: BABYLON.NodeMaterialConnectionPoint;
- node: GraphNode;
- protected _element: HTMLDivElement;
- protected _img: HTMLImageElement;
- protected _globalState: GlobalState;
- protected _portLabelElement: Element;
- protected _onCandidateLinkMovedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.Vector2>>>;
- protected _onSelectionChangedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<GraphFrame | GraphNode | NodeLink | NodePort | FramePortData>>>;
- protected _exposedOnFrame: boolean;
- delegatedPort: BABYLON.Nullable<FrameNodePort>;
- get element(): HTMLDivElement;
- get portName(): string;
- set portName(newName: string);
- get disabled(): boolean;
- hasLabel(): boolean;
- get exposedOnFrame(): boolean;
- set exposedOnFrame(value: boolean);
- private _isConnectedToNodeOutsideOfFrame;
- refresh(): void;
- constructor(portContainer: HTMLElement, connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, globalState: GlobalState);
- dispose(): void;
- static CreatePortElement(connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<IDisplayManager>, globalState: GlobalState): NodePort;
- }
- }
- declare module NODEEDITOR {
- export class NodeLink {
- private _graphCanvas;
- private _portA;
- private _portB?;
- private _nodeA;
- private _nodeB?;
- private _path;
- private _selectionPath;
- private _onSelectionChangedObserver;
- private _isVisible;
- onDisposedObservable: BABYLON.Observable<NodeLink>;
- get isVisible(): boolean;
- set isVisible(value: boolean);
- get portA(): FrameNodePort | NodePort;
- get portB(): FrameNodePort | NodePort | undefined;
- get nodeA(): GraphNode;
- get nodeB(): GraphNode | undefined;
- update(endX?: number, endY?: number, straight?: boolean): void;
- constructor(graphCanvas: GraphCanvasComponent, portA: NodePort, nodeA: GraphNode, portB?: NodePort, nodeB?: GraphNode);
- onClick(): void;
- dispose(): void;
- }
- }
- declare module NODEEDITOR {
- export interface IGraphCanvasComponentProps {
- globalState: GlobalState;
- }
- export type FramePortData = {
- frame: GraphFrame;
- port: FrameNodePort;
- };
- export const isFramePortData: (variableToCheck: any) => variableToCheck is FramePortData;
- export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentProps> {
- private readonly MinZoom;
- private readonly MaxZoom;
- private _hostCanvas;
- private _graphCanvas;
- private _selectionContainer;
- private _frameContainer;
- private _svgCanvas;
- private _rootContainer;
- private _nodes;
- private _links;
- private _mouseStartPointX;
- private _mouseStartPointY;
- private _dropPointX;
- private _dropPointY;
- private _selectionStartX;
- private _selectionStartY;
- private _candidateLinkedHasMoved;
- private _x;
- private _y;
- private _zoom;
- private _selectedNodes;
- private _selectedLink;
- private _selectedPort;
- private _candidateLink;
- private _candidatePort;
- private _gridSize;
- private _selectionBox;
- private _selectedFrame;
- private _frameCandidate;
- private _frames;
- private _altKeyIsPressed;
- private _ctrlKeyIsPressed;
- private _oldY;
- _frameIsMoving: boolean;
- _isLoading: boolean;
- get gridSize(): number;
- set gridSize(value: number);
- get globalState(): GlobalState;
- get nodes(): GraphNode[];
- get links(): NodeLink[];
- get frames(): GraphFrame[];
- get zoom(): number;
- set zoom(value: number);
- get x(): number;
- set x(value: number);
- get y(): number;
- set y(value: number);
- get selectedNodes(): GraphNode[];
- get selectedLink(): BABYLON.Nullable<NodeLink>;
- get selectedFrame(): BABYLON.Nullable<GraphFrame>;
- get selectedPort(): BABYLON.Nullable<NodePort>;
- get canvasContainer(): HTMLDivElement;
- get hostCanvas(): HTMLDivElement;
- get svgCanvas(): HTMLElement;
- get selectionContainer(): HTMLDivElement;
- get frameContainer(): HTMLDivElement;
- constructor(props: IGraphCanvasComponentProps);
- getGridPosition(position: number, useCeil?: boolean): number;
- getGridPositionCeil(position: number): number;
- updateTransform(): void;
- onKeyUp(): void;
- findNodeFromBlock(block: BABYLON.NodeMaterialBlock): GraphNode;
- reset(): void;
- connectPorts(pointA: BABYLON.NodeMaterialConnectionPoint, pointB: BABYLON.NodeMaterialConnectionPoint): void;
- removeLink(link: NodeLink): void;
- appendBlock(block: BABYLON.NodeMaterialBlock): GraphNode;
- distributeGraph(): void;
- componentDidMount(): void;
- onMove(evt: React.PointerEvent): void;
- onDown(evt: React.PointerEvent<HTMLElement>): void;
- onUp(evt: React.PointerEvent): void;
- onWheel(evt: React.WheelEvent): void;
- zoomToFit(): void;
- processCandidatePort(): void;
- processEditorData(editorData: IEditorData): void;
- addFrame(frameData: IFrameData): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class PropertyChangedEvent {
- object: any;
- property: string;
- value: any;
- initialValue: any;
- }
- }
- declare module NODEEDITOR {
- interface IFloatLineComponentProps {
- label: string;
- target: any;
- propertyName: string;
- onChange?: (newValue: number) => void;
- isInteger?: boolean;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- additionalClass?: string;
- step?: string;
- digits?: number;
- globalState: GlobalState;
- }
- export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
- value: string;
- }> {
- private _localChange;
- private _store;
- constructor(props: IFloatLineComponentProps);
- shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
- value: string;
- }): boolean;
- raiseOnPropertyChanged(newValue: number, previousValue: number): void;
- updateValue(valueString: string): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IFloatPropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class FloatPropertyTabComponent extends React.Component<IFloatPropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface ISliderLineComponentProps {
- label: string;
- target?: any;
- propertyName?: string;
- minimum: number;
- maximum: number;
- step: number;
- directValue?: number;
- useEuler?: boolean;
- onChange?: (value: number) => void;
- onInput?: (value: number) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- decimalCount?: number;
- }
- export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
- value: number;
- }> {
- private _localChange;
- constructor(props: ISliderLineComponentProps);
- shouldComponentUpdate(nextProps: ISliderLineComponentProps, nextState: {
- value: number;
- }): boolean;
- onChange(newValueString: any): void;
- onInput(newValueString: any): void;
- prepareDataToRead(value: number): number;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface INumericInputComponentProps {
- label: string;
- value: number;
- step?: number;
- onChange: (value: number) => void;
- globalState: GlobalState;
- }
- export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
- value: string;
- }> {
- static defaultProps: {
- step: number;
- };
- private _localChange;
- constructor(props: INumericInputComponentProps);
- shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
- value: string;
- }): boolean;
- updateValue(evt: any): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IVector2LineComponentProps {
- label: string;
- target: any;
- propertyName: string;
- step?: number;
- onChange?: (newvalue: BABYLON.Vector2) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- globalState: GlobalState;
- }
- export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
- isExpanded: boolean;
- value: BABYLON.Vector2;
- }> {
- static defaultProps: {
- step: number;
- };
- private _localChange;
- constructor(props: IVector2LineComponentProps);
- shouldComponentUpdate(nextProps: IVector2LineComponentProps, nextState: {
- isExpanded: boolean;
- value: BABYLON.Vector2;
- }): boolean;
- switchExpandState(): void;
- raiseOnPropertyChanged(previousValue: BABYLON.Vector2): void;
- updateStateX(value: number): void;
- updateStateY(value: number): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IVector2PropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class Vector2PropertyTabComponent extends React.Component<IVector2PropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IColorPickerComponentProps {
- value: BABYLON.Color4 | BABYLON.Color3;
- onColorChanged: (newOne: string) => void;
- globalState: GlobalState;
- disableAlpha?: boolean;
- }
- interface IColorPickerComponentState {
- pickerEnabled: boolean;
- color: {
- r: number;
- g: number;
- b: number;
- a?: number;
- };
- hex: string;
- }
- export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
- private _floatRef;
- private _floatHostRef;
- constructor(props: IColorPickerComponentProps);
- syncPositions(): void;
- shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
- componentDidUpdate(): void;
- componentDidMount(): void;
- setPickerState(enabled: boolean): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IColor3LineComponentProps {
- label: string;
- target: any;
- propertyName: string;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- onChange?: () => void;
- globalState: GlobalState;
- }
- export class Color3LineComponent extends React.Component<IColor3LineComponentProps, {
- isExpanded: boolean;
- color: BABYLON.Color3;
- }> {
- private _localChange;
- constructor(props: IColor3LineComponentProps);
- shouldComponentUpdate(nextProps: IColor3LineComponentProps, nextState: {
- color: BABYLON.Color3;
- }): boolean;
- onChange(newValue: string): void;
- switchExpandState(): void;
- raiseOnPropertyChanged(previousValue: BABYLON.Color3): void;
- updateStateR(value: number): void;
- updateStateG(value: number): void;
- updateStateB(value: number): void;
- copyToClipboard(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IColor3PropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class Color3PropertyTabComponent extends React.Component<IColor3PropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IVector3LineComponentProps {
- label: string;
- target: any;
- propertyName: string;
- step?: number;
- onChange?: (newvalue: BABYLON.Vector3) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- globalState: GlobalState;
- }
- export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
- isExpanded: boolean;
- value: BABYLON.Vector3;
- }> {
- static defaultProps: {
- step: number;
- };
- private _localChange;
- constructor(props: IVector3LineComponentProps);
- shouldComponentUpdate(nextProps: IVector3LineComponentProps, nextState: {
- isExpanded: boolean;
- value: BABYLON.Vector3;
- }): boolean;
- switchExpandState(): void;
- raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
- updateVector3(): void;
- updateStateX(value: number): void;
- updateStateY(value: number): void;
- updateStateZ(value: number): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IVector3PropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class Vector3PropertyTabComponent extends React.Component<IVector3PropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IVector4LineComponentProps {
- label: string;
- target?: any;
- propertyName?: string;
- value?: BABYLON.Vector4;
- step?: number;
- onChange?: (newvalue: BABYLON.Vector4) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- globalState: GlobalState;
- }
- export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
- isExpanded: boolean;
- value: BABYLON.Vector4;
- }> {
- static defaultProps: {
- step: number;
- };
- private _localChange;
- constructor(props: IVector4LineComponentProps);
- shouldComponentUpdate(nextProps: IVector4LineComponentProps, nextState: {
- isExpanded: boolean;
- value: BABYLON.Vector4;
- }): boolean;
- switchExpandState(): void;
- raiseOnPropertyChanged(previousValue: BABYLON.Vector4): void;
- updateVector4(): void;
- updateStateX(value: number): void;
- updateStateY(value: number): void;
- updateStateZ(value: number): void;
- updateStateW(value: number): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IVector4PropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class Vector4PropertyTabComponent extends React.Component<IVector4PropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- class ListLineOption {
- label: string;
- value: number | string;
- }
- interface IOptionsLineComponentProps {
- label: string;
- target: any;
- className?: string;
- propertyName?: string;
- options: ListLineOption[];
- noDirectUpdate?: boolean;
- onSelect?: (value: number | string) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- valuesAreStrings?: boolean;
- defaultIfNull?: number;
- getSelection?: (target: any) => number;
- }
- export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
- value: number | string;
- }> {
- private _localChange;
- private _getValue;
- constructor(props: IOptionsLineComponentProps);
- setValue(value: string | number): void;
- shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
- value: number;
- }): boolean;
- raiseOnPropertyChanged(newValue: number | string, previousValue: number | string): void;
- updateValue(valueString: string): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IMatrixLineComponentProps {
- label: string;
- target: any;
- propertyName: string;
- step?: number;
- onChange?: (newValue: BABYLON.Matrix) => void;
- onModeChange?: (mode: number) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- mode?: number;
- globalState: GlobalState;
- }
- export class MatrixLineComponent extends React.Component<IMatrixLineComponentProps, {
- value: BABYLON.Matrix;
- mode: number;
- angle: number;
- }> {
- private _localChange;
- constructor(props: IMatrixLineComponentProps);
- shouldComponentUpdate(nextProps: IMatrixLineComponentProps, nextState: {
- value: BABYLON.Matrix;
- mode: number;
- angle: number;
- }): boolean;
- raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
- updateMatrix(): void;
- updateRow(value: BABYLON.Vector4, row: number): void;
- updateBasedOnMode(value: number): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IMatrixPropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class MatrixPropertyTabComponent extends React.Component<IMatrixPropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface ILineContainerComponentProps {
- title: string;
- children: any[] | any;
- closed?: boolean;
- }
- export class LineContainerComponent extends React.Component<ILineContainerComponentProps, {
- isExpanded: boolean;
- }> {
- constructor(props: ILineContainerComponentProps);
- switchExpandedState(): void;
- renderHeader(): JSX.Element;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IPropertyComponentProps {
- globalState: GlobalState;
- block: BABYLON.NodeMaterialBlock;
- }
- }
- declare module NODEEDITOR {
- interface ITextInputLineComponentProps {
- label: string;
- globalState: GlobalState;
- target?: any;
- propertyName?: string;
- value?: string;
- onChange?: (value: string) => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- }
- export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
- value: string;
- }> {
- private _localChange;
- constructor(props: ITextInputLineComponentProps);
- shouldComponentUpdate(nextProps: ITextInputLineComponentProps, nextState: {
- value: string;
- }): boolean;
- raiseOnPropertyChanged(newValue: string, previousValue: string): void;
- updateValue(value: string, raisePropertyChanged: boolean): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface ITextLineComponentProps {
- label: string;
- value: string;
- color?: string;
- underline?: boolean;
- onLink?: () => void;
- }
- export class TextLineComponent extends React.Component<ITextLineComponentProps> {
- constructor(props: ITextLineComponentProps);
- onLink(): void;
- renderContent(): JSX.Element;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface ICheckBoxLineComponentProps {
- label: string;
- target?: any;
- propertyName?: string;
- isSelected?: () => boolean;
- onSelect?: (value: boolean) => void;
- onValueChanged?: () => void;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- disabled?: boolean;
- }
- export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
- isSelected: boolean;
- isDisabled?: boolean;
- }> {
- private static _UniqueIdSeed;
- private _uniqueId;
- private _localChange;
- constructor(props: ICheckBoxLineComponentProps);
- shouldComponentUpdate(nextProps: ICheckBoxLineComponentProps, nextState: {
- isSelected: boolean;
- isDisabled: boolean;
- }): boolean;
- onChange(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class GenericPropertyComponent extends React.Component<IPropertyComponentProps> {
- constructor(props: IPropertyComponentProps);
- render(): JSX.Element;
- }
- export class GeneralPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- constructor(props: IPropertyComponentProps);
- render(): JSX.Element;
- }
- export class GenericPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- constructor(props: IPropertyComponentProps);
- forceRebuild(notifiers?: {
- "rebuild"?: boolean;
- "update"?: boolean;
- }): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IColor4LineComponentProps {
- label: string;
- target: any;
- propertyName: string;
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
- onChange?: () => void;
- globalState: GlobalState;
- }
- export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
- isExpanded: boolean;
- color: BABYLON.Color4;
- }> {
- private _localChange;
- constructor(props: IColor4LineComponentProps);
- shouldComponentUpdate(nextProps: IColor4LineComponentProps, nextState: {
- color: BABYLON.Color4;
- }): boolean;
- onChange(newValue: string): void;
- switchExpandState(): void;
- raiseOnPropertyChanged(previousValue: BABYLON.Color4): void;
- updateStateR(value: number): void;
- updateStateG(value: number): void;
- updateStateB(value: number): void;
- updateStateA(value: number): void;
- copyToClipboard(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IColor4PropertyTabComponentProps {
- globalState: GlobalState;
- inputBlock: BABYLON.InputBlock;
- }
- export class Color4PropertyTabComponent extends React.Component<IColor4PropertyTabComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class InputPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- private onValueChangedObserver;
- constructor(props: IPropertyComponentProps);
- componentDidMount(): void;
- componentWillUnmount(): void;
- renderValue(globalState: GlobalState): JSX.Element | null;
- setDefaultValue(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class TransformPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- constructor(props: IPropertyComponentProps);
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IGradientStepComponentProps {
- globalState: GlobalState;
- step: BABYLON.GradientBlockColorStep;
- lineIndex: number;
- onDelete: () => void;
- onUpdateStep: () => void;
- onCheckForReOrder: () => void;
- }
- export class GradientStepComponent extends React.Component<IGradientStepComponentProps, {
- gradient: number;
- }> {
- constructor(props: IGradientStepComponentProps);
- updateColor(color: string): void;
- updateStep(gradient: number): void;
- onPointerUp(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IButtonLineComponentProps {
- label: string;
- onClick: () => void;
- }
- export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
- constructor(props: IButtonLineComponentProps);
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class GradientPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- constructor(props: IPropertyComponentProps);
- forceRebuild(): void;
- deleteStep(step: BABYLON.GradientBlockColorStep): void;
- addNewStep(): void;
- checkForReOrder(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class LightPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class LightInformationPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IFileButtonLineComponentProps {
- label: string;
- onClick: (file: File) => void;
- accept: string;
- uploadName?: string;
- }
- export class FileButtonLineComponent extends React.Component<IFileButtonLineComponentProps> {
- private uploadRef;
- constructor(props: IFileButtonLineComponentProps);
- onChange(evt: any): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- type ReflectionTexture = BABYLON.ReflectionTextureBlock | BABYLON.ReflectionBlock | BABYLON.RefractionBlock;
- type AnyTexture = BABYLON.TextureBlock | ReflectionTexture | BABYLON.CurrentScreenBlock | BABYLON.ParticleTextureBlock;
- export class TexturePropertyTabComponent extends React.Component<IPropertyComponentProps, {
- isEmbedded: boolean;
- loadAsCubeTexture: boolean;
- }> {
- get textureBlock(): AnyTexture;
- constructor(props: IPropertyComponentProps);
- UNSAFE_componentWillUpdate(nextProps: IPropertyComponentProps, nextState: {
- isEmbedded: boolean;
- loadAsCubeTexture: boolean;
- }): void;
- private _generateRandomForCache;
- updateAfterTextureLoad(): void;
- removeTexture(): void;
- _prepareTexture(): void;
- /**
- * Replaces the texture of the node
- * @param file the file of the texture to use
- */
- replaceTexture(file: File): void;
- replaceTextureWithUrl(url: string): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class TrigonometryPropertyTabComponent extends React.Component<IPropertyComponentProps> {
- constructor(props: IPropertyComponentProps);
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class PropertyLedger {
- static RegisteredControls: {
- [key: string]: React.ComponentClass<IPropertyComponentProps>;
- };
- }
- }
- declare module NODEEDITOR {
- export class InputDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): "" | "constant" | "inspector";
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class OutputDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class ClampDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class GradientDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class RemapDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- private _extractInputValue;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class TrigonometryDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- interface ITextureLineComponentProps {
- texture: BABYLON.BaseTexture;
- width: number;
- height: number;
- globalState?: any;
- hideChannelSelect?: boolean;
- }
- export interface ITextureLineComponentState {
- displayRed: boolean;
- displayGreen: boolean;
- displayBlue: boolean;
- displayAlpha: boolean;
- face: number;
- }
- export class TextureLineComponent extends React.Component<ITextureLineComponentProps, ITextureLineComponentState> {
- private canvasRef;
- constructor(props: ITextureLineComponentProps);
- shouldComponentUpdate(nextProps: ITextureLineComponentProps, nextState: {
- displayRed: boolean;
- displayGreen: boolean;
- displayBlue: boolean;
- displayAlpha: boolean;
- face: number;
- }): boolean;
- componentDidMount(): void;
- componentDidUpdate(): void;
- updatePreview(): void;
- static UpdatePreview(previewCanvas: HTMLCanvasElement, texture: BABYLON.BaseTexture, width: number, options: ITextureLineComponentState, onReady?: () => void, globalState?: any): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class TextureDisplayManager implements IDisplayManager {
- private _previewCanvas;
- private _previewImage;
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class DiscardDisplayManager implements IDisplayManager {
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
- }
- }
- declare module NODEEDITOR {
- export class DisplayLedger {
- static RegisteredControls: {
- [key: string]: any;
- };
- }
- }
- declare module NODEEDITOR {
- export class GraphNode {
- block: BABYLON.NodeMaterialBlock;
- private _visual;
- private _header;
- private _connections;
- private _inputsContainer;
- private _outputsContainer;
- private _content;
- private _comments;
- private _inputPorts;
- private _outputPorts;
- private _links;
- private _x;
- private _y;
- private _gridAlignedX;
- private _gridAlignedY;
- private _mouseStartPointX;
- private _mouseStartPointY;
- private _globalState;
- private _onSelectionChangedObserver;
- private _onSelectionBoxMovedObserver;
- private _onFrameCreatedObserver;
- private _onUpdateRequiredObserver;
- private _ownerCanvas;
- private _isSelected;
- private _displayManager;
- private _isVisible;
- private _enclosingFrameId;
- get isVisible(): boolean;
- set isVisible(value: boolean);
- private _upateNodePortNames;
- get outputPorts(): NodePort[];
- get inputPorts(): NodePort[];
- get links(): NodeLink[];
- get gridAlignedX(): number;
- get gridAlignedY(): number;
- get x(): number;
- set x(value: number);
- get y(): number;
- set y(value: number);
- get width(): number;
- get height(): number;
- get id(): number;
- get name(): string;
- get isSelected(): boolean;
- get enclosingFrameId(): number;
- set enclosingFrameId(value: number);
- set isSelected(value: boolean);
- constructor(block: BABYLON.NodeMaterialBlock, globalState: GlobalState);
- isOverlappingFrame(frame: GraphFrame): boolean;
- getPortForConnectionPoint(point: BABYLON.NodeMaterialConnectionPoint): BABYLON.Nullable<NodePort>;
- getLinksForConnectionPoint(point: BABYLON.NodeMaterialConnectionPoint): NodeLink[];
- private _refreshFrames;
- _refreshLinks(): void;
- refresh(): void;
- private _onDown;
- cleanAccumulation(useCeil?: boolean): void;
- private _onUp;
- private _onMove;
- renderProperties(): BABYLON.Nullable<JSX.Element>;
- appendVisual(root: HTMLDivElement, owner: GraphCanvasComponent): void;
- dispose(): void;
- }
- }
- declare module NODEEDITOR {
- export class GlobalState {
- nodeMaterial: BABYLON.NodeMaterial;
- hostElement: HTMLElement;
- hostDocument: HTMLDocument;
- hostWindow: Window;
- onSelectionChangedObservable: BABYLON.Observable<BABYLON.Nullable<GraphFrame | GraphNode | NodePort | NodeLink | FramePortData>>;
- onRebuildRequiredObservable: BABYLON.Observable<void>;
- onBuiltObservable: BABYLON.Observable<void>;
- onResetRequiredObservable: BABYLON.Observable<void>;
- onUpdateRequiredObservable: BABYLON.Observable<void>;
- onZoomToFitRequiredObservable: BABYLON.Observable<void>;
- onReOrganizedRequiredObservable: BABYLON.Observable<void>;
- onLogRequiredObservable: BABYLON.Observable<LogEntry>;
- onErrorMessageDialogRequiredObservable: BABYLON.Observable<string>;
- onIsLoadingChanged: BABYLON.Observable<boolean>;
- onPreviewCommandActivated: BABYLON.Observable<boolean>;
- onLightUpdated: BABYLON.Observable<void>;
- onPreviewBackgroundChanged: BABYLON.Observable<void>;
- onBackFaceCullingChanged: BABYLON.Observable<void>;
- onDepthPrePassChanged: BABYLON.Observable<void>;
- onAnimationCommandActivated: BABYLON.Observable<void>;
- onCandidateLinkMoved: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector2>>;
- onSelectionBoxMoved: BABYLON.Observable<DOMRect | ClientRect>;
- onFrameCreatedObservable: BABYLON.Observable<GraphFrame>;
- onCandidatePortSelectedObservable: BABYLON.Observable<BABYLON.Nullable<FrameNodePort | NodePort>>;
- onImportFrameObservable: BABYLON.Observable<any>;
- onGraphNodeRemovalObservable: BABYLON.Observable<GraphNode>;
- onGetNodeFromBlock: (block: BABYLON.NodeMaterialBlock) => GraphNode;
- onGridSizeChanged: BABYLON.Observable<void>;
- onExposePortOnFrameObservable: BABYLON.Observable<GraphNode>;
- previewType: PreviewType;
- previewFile: File;
- listOfCustomPreviewFiles: File[];
- rotatePreview: boolean;
- backgroundColor: BABYLON.Color4;
- backFaceCulling: boolean;
- depthPrePass: boolean;
- blockKeyboardEvents: boolean;
- hemisphericLight: boolean;
- directionalLight0: boolean;
- directionalLight1: boolean;
- controlCamera: boolean;
- storeEditorData: (serializationObject: any, frame?: BABYLON.Nullable<GraphFrame>) => void;
- _mode: BABYLON.NodeMaterialModes;
- /** Gets the mode */
- get mode(): BABYLON.NodeMaterialModes;
- /** Sets the mode */
- set mode(m: BABYLON.NodeMaterialModes);
- customSave?: {
- label: string;
- action: (data: string) => Promise<void>;
- };
- constructor();
- }
- }
- declare module NODEEDITOR {
- export interface IButtonLineComponentProps {
- data: string;
- tooltip: string;
- }
- export class DraggableLineComponent extends React.Component<IButtonLineComponentProps> {
- constructor(props: IButtonLineComponentProps);
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface INodeListComponentProps {
- globalState: GlobalState;
- }
- export class NodeListComponent extends React.Component<INodeListComponentProps, {
- filter: string;
- }> {
- private _onResetRequiredObserver;
- private static _Tooltips;
- constructor(props: INodeListComponentProps);
- componentWillUnmount(): void;
- filterContent(filter: string): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IFramePropertyTabComponentProps {
- globalState: GlobalState;
- frame: GraphFrame;
- }
- export class FramePropertyTabComponent extends React.Component<IFramePropertyTabComponentProps> {
- private onFrameExpandStateChangedObserver;
- constructor(props: IFramePropertyTabComponentProps);
- componentDidMount(): void;
- componentWillUnmount(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IFrameNodePortPropertyTabComponentProps {
- globalState: GlobalState;
- frameNodePort: FrameNodePort;
- frame: GraphFrame;
- }
- export class FrameNodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps, {
- port: FrameNodePort;
- }> {
- private _onFramePortPositionChangedObserver;
- private _onSelectionChangedObserver;
- constructor(props: IFrameNodePortPropertyTabComponentProps);
- componentWillUnmount(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export interface IFrameNodePortPropertyTabComponentProps {
- globalState: GlobalState;
- nodePort: NodePort;
- }
- export class NodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps> {
- private _onSelectionChangedObserver;
- constructor(props: IFrameNodePortPropertyTabComponentProps);
- componentWillUnmount(): void;
- toggleExposeOnFrame(value: boolean): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IPropertyTabComponentProps {
- globalState: GlobalState;
- }
- interface IPropertyTabComponentState {
- currentNode: BABYLON.Nullable<GraphNode>;
- currentFrame: BABYLON.Nullable<GraphFrame>;
- currentFrameNodePort: BABYLON.Nullable<FrameNodePort>;
- currentNodePort: BABYLON.Nullable<NodePort>;
- }
- export class PropertyTabComponent extends React.Component<IPropertyTabComponentProps, IPropertyTabComponentState> {
- private _onBuiltObserver;
- private _modeSelect;
- constructor(props: IPropertyTabComponentProps);
- componentDidMount(): void;
- componentWillUnmount(): void;
- processInputBlockUpdate(ib: BABYLON.InputBlock): void;
- renderInputBlock(block: BABYLON.InputBlock): JSX.Element | null;
- load(file: File): void;
- loadFrame(file: File): void;
- save(): void;
- customSave(): void;
- saveToSnippetServer(): void;
- loadFromSnippet(): void;
- changeMode(value: any, force?: boolean, loadDefault?: boolean): boolean;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IPortalProps {
- globalState: GlobalState;
- }
- export class Portal extends React.Component<IPortalProps> {
- render(): React.ReactPortal;
- }
- }
- declare module NODEEDITOR {
- interface IMessageDialogComponentProps {
- globalState: GlobalState;
- }
- export class MessageDialogComponent extends React.Component<IMessageDialogComponentProps, {
- message: string;
- isError: boolean;
- }> {
- constructor(props: IMessageDialogComponentProps);
- render(): JSX.Element | null;
- }
- }
- declare module NODEEDITOR {
- export class PreviewManager {
- private _nodeMaterial;
- private _onBuildObserver;
- private _onPreviewCommandActivatedObserver;
- private _onAnimationCommandActivatedObserver;
- private _onUpdateRequiredObserver;
- private _onPreviewBackgroundChangedObserver;
- private _onBackFaceCullingChangedObserver;
- private _onDepthPrePassChangedObserver;
- private _onLightUpdatedObserver;
- private _engine;
- private _scene;
- private _meshes;
- private _camera;
- private _material;
- private _globalState;
- private _currentType;
- private _lightParent;
- private _postprocess;
- private _particleSystem;
- constructor(targetCanvas: HTMLCanvasElement, globalState: GlobalState);
- private _handleAnimations;
- private _prepareLights;
- private _prepareScene;
- private _refreshPreviewMesh;
- private _loadParticleSystem;
- private _forceCompilationAsync;
- private _updatePreview;
- dispose(): void;
- }
- }
- declare module NODEEDITOR {
- interface IPreviewMeshControlComponent {
- globalState: GlobalState;
- togglePreviewAreaComponent: () => void;
- }
- export class PreviewMeshControlComponent extends React.Component<IPreviewMeshControlComponent> {
- private colorInputRef;
- private filePickerRef;
- private _onResetRequiredObserver;
- constructor(props: IPreviewMeshControlComponent);
- componentWillUnmount(): void;
- changeMeshType(newOne: PreviewType): void;
- useCustomMesh(evt: any): void;
- onPopUp(): void;
- changeAnimation(): void;
- changeBackground(value: string): void;
- changeBackgroundClick(): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IPreviewAreaComponentProps {
- globalState: GlobalState;
- width: number;
- }
- export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
- isLoading: boolean;
- }> {
- private _onIsLoadingChangedObserver;
- private _onResetRequiredObserver;
- constructor(props: IPreviewAreaComponentProps);
- componentWillUnmount(): void;
- changeBackFaceCulling(value: boolean): void;
- changeDepthPrePass(value: boolean): void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- interface IGraphEditorProps {
- globalState: GlobalState;
- }
- interface IGraphEditorState {
- showPreviewPopUp: boolean;
- }
- interface IInternalPreviewAreaOptions extends BABYLON.IInspectorOptions {
- popup: boolean;
- original: boolean;
- explorerWidth?: string;
- inspectorWidth?: string;
- embedHostWidth?: string;
- }
- export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditorState> {
- private readonly NodeWidth;
- private _graphCanvas;
- private _startX;
- private _moveInProgress;
- private _leftWidth;
- private _rightWidth;
- private _blocks;
- private _previewManager;
- private _copiedNodes;
- private _copiedFrame;
- private _mouseLocationX;
- private _mouseLocationY;
- private _onWidgetKeyUpPointer;
- private _previewHost;
- private _popUpWindow;
- /**
- * Creates a node and recursivly creates its parent nodes from it's input
- * @param nodeMaterialBlock
- */
- createNodeFromObject(block: BABYLON.NodeMaterialBlock, recursion?: boolean): GraphNode;
- addValueNode(type: string): GraphNode;
- componentDidMount(): void;
- componentWillUnmount(): void;
- constructor(props: IGraphEditorProps);
- reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
- pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, selectNew?: boolean): GraphNode[] | undefined;
- zoomToFit(): void;
- buildMaterial(): void;
- build(): void;
- loadGraph(): void;
- showWaitScreen(): void;
- hideWaitScreen(): void;
- reOrganize(editorData?: BABYLON.Nullable<IEditorData>, isImportingAFrame?: boolean): void;
- onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
- onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
- resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
- buildColumnLayout(): string;
- emitNewBlock(event: React.DragEvent<HTMLDivElement>): void;
- handlePopUp: () => void;
- handleClosingPopUp: () => void;
- initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
- createPopUp: () => void;
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
- copyStyles: (sourceDoc: HTMLDocument, targetDoc: HTMLDocument) => void;
- createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: HTMLElement | null) => void;
- createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: HTMLElement | null) => void;
- fixPopUpStyles: (document: Document) => void;
- render(): JSX.Element;
- }
- }
- declare module NODEEDITOR {
- export class Popup {
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
- private static _CopyStyles;
- }
- }
- declare module NODEEDITOR {
- /**
- * Interface used to specify creation options for the node editor
- */
- export interface INodeEditorOptions {
- nodeMaterial: BABYLON.NodeMaterial;
- hostElement?: HTMLElement;
- customSave?: {
- label: string;
- action: (data: string) => Promise<void>;
- };
- customLoadObservable?: BABYLON.Observable<any>;
- }
- /**
- * Class used to create a node editor
- */
- export class NodeEditor {
- private static _CurrentState;
- /**
- * Show the node editor
- * @param options defines the options to use to configure the node editor
- */
- static Show(options: INodeEditorOptions): void;
- }
- }
|