@babylonjs/node-editor 5.0.0-beta.3 → 5.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,11 +84,13 @@ declare module "@babylonjs/node-editor/blockTools" {
84
84
  import { VoronoiNoiseBlock } from '@babylonjs/core/Materials/Node/Blocks/voronoiNoiseBlock';
85
85
  import { ScreenSpaceBlock } from '@babylonjs/core/Materials/Node/Blocks/Fragment/screenSpaceBlock';
86
86
  import { TwirlBlock } from '@babylonjs/core/Materials/Node/Blocks/Fragment/twirlBlock';
87
+ import { ElbowBlock } from '@babylonjs/core/Materials/Node/Blocks/elbowBlock';
88
+ import { ClipPlanesBlock } from '@babylonjs/core/Materials/Node/Blocks/Dual/clipPlanesBlock';
87
89
  export class BlockTools {
88
- static GetBlockFromString(data: string, scene: Scene, nodeMaterial: NodeMaterial): TwirlBlock | VoronoiNoiseBlock | ScreenSpaceBlock | CloudBlock | MatrixBuilderBlock | DesaturateBlock | RefractBlock | ReflectBlock | DerivativeBlock | Rotate2dBlock | NormalBlendBlock | WorleyNoise3DBlock | SimplexPerlin3DBlock | BonesBlock | InstancesBlock | MorphTargetsBlock | DiscardBlock | ImageProcessingBlock | ColorMergerBlock | VectorMergerBlock | ColorSplitterBlock | VectorSplitterBlock | TextureBlock | ReflectionTextureBlock | LightBlock | FogBlock | VertexOutputBlock | FragmentOutputBlock | AddBlock | ClampBlock | ScaleBlock | CrossBlock | DotBlock | PowBlock | MultiplyBlock | TransformBlock | TrigonometryBlock | RemapBlock | NormalizeBlock | FresnelBlock | LerpBlock | NLerpBlock | DivideBlock | SubtractBlock | ModBlock | StepBlock | SmoothStepBlock | OneMinusBlock | ReciprocalBlock | ViewDirectionBlock | LightInformationBlock | MaxBlock | MinBlock | LengthBlock | DistanceBlock | NegateBlock | PerturbNormalBlock | RandomNumberBlock | ReplaceColorBlock | PosterizeBlock | ArcTan2Block | GradientBlock | FrontFacingBlock | WaveBlock | InputBlock | PBRMetallicRoughnessBlock | SheenBlock | AnisotropyBlock | ReflectionBlock | ClearCoatBlock | RefractionBlock | SubSurfaceBlock | CurrentScreenBlock | ParticleTextureBlock | ParticleRampGradientBlock | ParticleBlendMultiplyBlock | FragCoordBlock | ScreenSizeBlock | SceneDepthBlock | ConditionalBlock | ImageSourceBlock | null;
90
+ static GetBlockFromString(data: string, scene: Scene, nodeMaterial: NodeMaterial): ElbowBlock | TwirlBlock | VoronoiNoiseBlock | ScreenSpaceBlock | CloudBlock | MatrixBuilderBlock | DesaturateBlock | RefractBlock | ReflectBlock | DerivativeBlock | Rotate2dBlock | NormalBlendBlock | WorleyNoise3DBlock | SimplexPerlin3DBlock | BonesBlock | InstancesBlock | MorphTargetsBlock | DiscardBlock | ImageProcessingBlock | ColorMergerBlock | VectorMergerBlock | ColorSplitterBlock | VectorSplitterBlock | TextureBlock | ReflectionTextureBlock | LightBlock | FogBlock | VertexOutputBlock | FragmentOutputBlock | AddBlock | ClampBlock | ScaleBlock | CrossBlock | DotBlock | PowBlock | MultiplyBlock | TransformBlock | TrigonometryBlock | RemapBlock | NormalizeBlock | FresnelBlock | LerpBlock | NLerpBlock | DivideBlock | SubtractBlock | ModBlock | StepBlock | SmoothStepBlock | OneMinusBlock | ReciprocalBlock | ViewDirectionBlock | LightInformationBlock | MaxBlock | MinBlock | LengthBlock | DistanceBlock | NegateBlock | PerturbNormalBlock | RandomNumberBlock | ReplaceColorBlock | PosterizeBlock | ArcTan2Block | GradientBlock | FrontFacingBlock | WaveBlock | InputBlock | PBRMetallicRoughnessBlock | SheenBlock | AnisotropyBlock | ReflectionBlock | ClearCoatBlock | RefractionBlock | SubSurfaceBlock | CurrentScreenBlock | ParticleTextureBlock | ParticleRampGradientBlock | ParticleBlendMultiplyBlock | FragCoordBlock | ScreenSizeBlock | SceneDepthBlock | ConditionalBlock | ImageSourceBlock | ClipPlanesBlock | null;
89
91
  static GetColorFromConnectionNodeType(type: NodeMaterialBlockConnectionPointTypes): string;
90
92
  static GetConnectionNodeTypeFromString(type: string): NodeMaterialBlockConnectionPointTypes.Float | NodeMaterialBlockConnectionPointTypes.Vector2 | NodeMaterialBlockConnectionPointTypes.Vector3 | NodeMaterialBlockConnectionPointTypes.Vector4 | NodeMaterialBlockConnectionPointTypes.Color3 | NodeMaterialBlockConnectionPointTypes.Color4 | NodeMaterialBlockConnectionPointTypes.Matrix | NodeMaterialBlockConnectionPointTypes.AutoDetect;
91
- static GetStringFromConnectionNodeType(type: NodeMaterialBlockConnectionPointTypes): "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix" | "Color3" | "Color4" | "";
93
+ static GetStringFromConnectionNodeType(type: NodeMaterialBlockConnectionPointTypes): "" | "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix" | "Color3" | "Color4";
92
94
  }
93
95
  }
94
96
  declare module "@babylonjs/node-editor/components/log/logComponent" {
@@ -1569,6 +1571,17 @@ declare module "@babylonjs/node-editor/diagram/display/imageSourceDisplayManager
1569
1571
  updatePreviewContent(block: NodeMaterialBlock, contentArea: HTMLDivElement): void;
1570
1572
  }
1571
1573
  }
1574
+ declare module "@babylonjs/node-editor/diagram/display/elbowDisplayManager" {
1575
+ import { IDisplayManager } from "@babylonjs/node-editor/diagram/display/displayManager";
1576
+ import { NodeMaterialBlock } from '@babylonjs/core/Materials/Node/nodeMaterialBlock';
1577
+ export class ElbowDisplayManager implements IDisplayManager {
1578
+ getHeaderClass(block: NodeMaterialBlock): string;
1579
+ shouldDisplayPortLabels(block: NodeMaterialBlock): boolean;
1580
+ getHeaderText(block: NodeMaterialBlock): string;
1581
+ getBackgroundColor(block: NodeMaterialBlock): string;
1582
+ updatePreviewContent(block: NodeMaterialBlock, contentArea: HTMLDivElement): void;
1583
+ }
1584
+ }
1572
1585
  declare module "@babylonjs/node-editor/diagram/displayLedger" {
1573
1586
  export class DisplayLedger {
1574
1587
  static RegisteredControls: {
@@ -2145,6 +2158,20 @@ declare module "@babylonjs/node-editor/sharedUiComponents/lines/buttonLineCompon
2145
2158
  render(): JSX.Element;
2146
2159
  }
2147
2160
  }
2161
+ declare module "@babylonjs/node-editor/sharedUiComponents/lines/targetsProxy" {
2162
+ import { PropertyChangedEvent } from "@babylonjs/node-editor/sharedUiComponents/propertyChangedEvent";
2163
+ import { Observable } from "@babylonjs/core/Misc/observable";
2164
+ export const conflictingValuesPlaceholder = "\u2014";
2165
+ /**
2166
+ *
2167
+ * @param propertyName the property that the input changes
2168
+ * @param targets a list of selected targets
2169
+ * @param defaultValue the value that should be returned when two targets have conflicting values
2170
+ * @param setter an optional setter function to override the default setter behavior
2171
+ * @returns a proxy object that can be passed as a target into the input
2172
+ */
2173
+ export function makeTargetsProxy(targets: any[], onPropertyChangedObservable?: Observable<PropertyChangedEvent>): {};
2174
+ }
2148
2175
  declare module "@babylonjs/node-editor/sharedUiComponents/lines/checkBoxLineComponent" {
2149
2176
  import * as React from "react";
2150
2177
  import { Observable } from "@babylonjs/core/Misc/observable";
@@ -2166,6 +2193,7 @@ declare module "@babylonjs/node-editor/sharedUiComponents/lines/checkBoxLineComp
2166
2193
  export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
2167
2194
  isSelected: boolean;
2168
2195
  isDisabled?: boolean;
2196
+ isConflict: boolean;
2169
2197
  }> {
2170
2198
  private static _UniqueIdSeed;
2171
2199
  private _uniqueId;
@@ -2174,11 +2202,23 @@ declare module "@babylonjs/node-editor/sharedUiComponents/lines/checkBoxLineComp
2174
2202
  shouldComponentUpdate(nextProps: ICheckBoxLineComponentProps, nextState: {
2175
2203
  isSelected: boolean;
2176
2204
  isDisabled: boolean;
2205
+ isConflict: boolean;
2177
2206
  }): boolean;
2178
2207
  onChange(): void;
2179
2208
  render(): JSX.Element;
2180
2209
  }
2181
2210
  }
2211
+ declare module "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject" {
2212
+ /**
2213
+ * Class used to provide lock mechanism
2214
+ */
2215
+ export class LockObject {
2216
+ /**
2217
+ * Gets or set if the lock is engaged
2218
+ */
2219
+ lock: boolean;
2220
+ }
2221
+ }
2182
2222
  declare module "@babylonjs/node-editor/sharedUiComponents/lines/numericInputComponent" {
2183
2223
  import * as React from "react";
2184
2224
  interface INumericInputComponentProps {
@@ -2228,22 +2268,14 @@ declare module "@babylonjs/node-editor/sharedUiComponents/lines/colorPickerCompo
2228
2268
  constructor(props: IColorPickerComponentProps);
2229
2269
  syncPositions(): void;
2230
2270
  shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
2271
+ getHexString(props?: Readonly<IColorPickerComponentProps> & Readonly<{
2272
+ children?: React.ReactNode;
2273
+ }>): string;
2231
2274
  componentDidUpdate(): void;
2232
2275
  componentDidMount(): void;
2233
2276
  render(): JSX.Element;
2234
2277
  }
2235
2278
  }
2236
- declare module "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject" {
2237
- /**
2238
- * Class used to provide lock mechanism
2239
- */
2240
- export class LockObject {
2241
- /**
2242
- * Gets or set if the lock is engaged
2243
- */
2244
- lock: boolean;
2245
- }
2246
- }
2247
2279
  declare module "@babylonjs/node-editor/sharedUiComponents/lines/textInputLineComponent" {
2248
2280
  import * as React from "react";
2249
2281
  import { Observable } from "@babylonjs/core/Misc/observable";
@@ -2277,83 +2309,91 @@ declare module "@babylonjs/node-editor/sharedUiComponents/lines/textInputLineCom
2277
2309
  render(): JSX.Element;
2278
2310
  }
2279
2311
  }
2280
- declare module "@babylonjs/node-editor/sharedUiComponents/lines/color3LineComponent" {
2312
+ declare module "@babylonjs/node-editor/sharedUiComponents/lines/colorLineComponent" {
2281
2313
  import * as React from "react";
2282
2314
  import { Observable } from "@babylonjs/core/Misc/observable";
2315
+ import { Color4 } from "@babylonjs/core/Maths/math.color";
2283
2316
  import { PropertyChangedEvent } from "@babylonjs/node-editor/sharedUiComponents/propertyChangedEvent";
2284
- import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
2285
2317
  import { LockObject } from "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject";
2286
- export interface IColor3LineComponentProps {
2318
+ export interface IColorLineComponentProps {
2287
2319
  label: string;
2288
- target: any;
2320
+ target?: any;
2289
2321
  propertyName: string;
2290
2322
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
2323
+ onChange?: () => void;
2291
2324
  isLinear?: boolean;
2292
2325
  icon?: string;
2293
- lockObject?: LockObject;
2294
2326
  iconLabel?: string;
2295
- onValueChange?: (value: string) => void;
2327
+ lockObject?: LockObject;
2328
+ disableAlpha?: boolean;
2296
2329
  }
2297
- export class Color3LineComponent extends React.Component<IColor3LineComponentProps, {
2330
+ interface IColorLineComponentState {
2298
2331
  isExpanded: boolean;
2299
- color: Color3 | Color4;
2300
- colorText: string;
2301
- }> {
2302
- private _localChange;
2303
- constructor(props: IColor3LineComponentProps);
2304
- private convertToColor3;
2305
- shouldComponentUpdate(nextProps: IColor3LineComponentProps, nextState: {
2306
- color: Color3 | Color4;
2307
- colorText: string;
2308
- }): boolean;
2309
- setPropertyValue(newColor: Color3 | Color4, newColorText: string): void;
2310
- onChange(newValue: string): void;
2332
+ color: Color4;
2333
+ colorString: string;
2334
+ }
2335
+ export class ColorLineComponent extends React.Component<IColorLineComponentProps, IColorLineComponentState> {
2336
+ constructor(props: IColorLineComponentProps);
2337
+ shouldComponentUpdate(nextProps: IColorLineComponentProps, nextState: IColorLineComponentState): boolean;
2338
+ getValue(props?: Readonly<IColorLineComponentProps> & Readonly<{
2339
+ children?: React.ReactNode;
2340
+ }>): Color4;
2341
+ getValueAsString(props?: Readonly<IColorLineComponentProps> & Readonly<{
2342
+ children?: React.ReactNode;
2343
+ }>): string;
2344
+ setColorFromString(colorString: string): void;
2345
+ setColor(color: Color4): void;
2346
+ updateColor(newColor: Color4): void;
2311
2347
  switchExpandState(): void;
2312
- raiseOnPropertyChanged(previousValue: Color3 | Color4): void;
2313
2348
  updateStateR(value: number): void;
2314
2349
  updateStateG(value: number): void;
2315
2350
  updateStateB(value: number): void;
2351
+ updateStateA(value: number): void;
2316
2352
  copyToClipboard(): void;
2317
- convert(colorString: string): void;
2318
- private _colorStringSaved;
2319
- private _colorPickerOpen;
2320
- private _colorString;
2353
+ get colorString(): string;
2354
+ set colorString(_: string);
2355
+ private convertToColor;
2356
+ private toColor3;
2357
+ render(): JSX.Element;
2358
+ }
2359
+ }
2360
+ declare module "@babylonjs/node-editor/sharedUiComponents/lines/color3LineComponent" {
2361
+ import * as React from "react";
2362
+ import { Observable } from "@babylonjs/core/Misc/observable";
2363
+ import { PropertyChangedEvent } from "@babylonjs/node-editor/sharedUiComponents/propertyChangedEvent";
2364
+ import { LockObject } from "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject";
2365
+ export interface IColor3LineComponentProps {
2366
+ label: string;
2367
+ target: any;
2368
+ propertyName: string;
2369
+ onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
2370
+ isLinear?: boolean;
2371
+ icon?: string;
2372
+ lockObject?: LockObject;
2373
+ iconLabel?: string;
2374
+ onValueChange?: (value: string) => void;
2375
+ }
2376
+ export class Color3LineComponent extends React.Component<IColor3LineComponentProps> {
2321
2377
  render(): JSX.Element;
2322
2378
  }
2323
2379
  }
2324
2380
  declare module "@babylonjs/node-editor/sharedUiComponents/lines/color4LineComponent" {
2325
2381
  import * as React from "react";
2326
2382
  import { Observable } from "@babylonjs/core/Misc/observable";
2327
- import { Color4 } from "@babylonjs/core/Maths/math.color";
2328
2383
  import { PropertyChangedEvent } from "@babylonjs/node-editor/sharedUiComponents/propertyChangedEvent";
2384
+ import { LockObject } from "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject";
2329
2385
  export interface IColor4LineComponentProps {
2330
2386
  label: string;
2331
- target: any;
2387
+ target?: any;
2332
2388
  propertyName: string;
2333
2389
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
2334
2390
  onChange?: () => void;
2335
2391
  isLinear?: boolean;
2336
2392
  icon?: string;
2337
2393
  iconLabel?: string;
2394
+ lockObject?: LockObject;
2338
2395
  }
2339
- export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
2340
- isExpanded: boolean;
2341
- color: Color4;
2342
- }> {
2343
- private _localChange;
2344
- constructor(props: IColor4LineComponentProps);
2345
- shouldComponentUpdate(nextProps: IColor4LineComponentProps, nextState: {
2346
- color: Color4;
2347
- }): boolean;
2348
- setPropertyValue(newColor: Color4): void;
2349
- onChange(newValue: string): void;
2350
- switchExpandState(): void;
2351
- raiseOnPropertyChanged(previousValue: Color4): void;
2352
- updateStateR(value: number): void;
2353
- updateStateG(value: number): void;
2354
- updateStateB(value: number): void;
2355
- updateStateA(value: number): void;
2356
- copyToClipboard(): void;
2396
+ export class Color4LineComponent extends React.Component<IColor4LineComponentProps> {
2357
2397
  render(): JSX.Element;
2358
2398
  }
2359
2399
  }
@@ -2473,6 +2513,7 @@ declare module "@babylonjs/node-editor/sharedUiComponents/lines/floatLineCompone
2473
2513
  private _store;
2474
2514
  constructor(props: IFloatLineComponentProps);
2475
2515
  componentWillUnmount(): void;
2516
+ getValueString(value: any): string;
2476
2517
  shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
2477
2518
  value: string;
2478
2519
  }): boolean;
@@ -2828,14 +2869,15 @@ declare module "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/gui
2828
2869
  import { Control } from "@babylonjs/gui/2D/controls/control";
2829
2870
  import { LockObject } from "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject";
2830
2871
  interface ICommonControlPropertyGridComponentProps {
2831
- control: Control;
2872
+ controls?: Control[];
2873
+ control?: Control;
2832
2874
  lockObject: LockObject;
2833
2875
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
2834
2876
  }
2835
2877
  export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
2836
2878
  constructor(props: ICommonControlPropertyGridComponentProps);
2837
- renderGridInformation(): JSX.Element | null;
2838
- render(): JSX.Element;
2879
+ renderGridInformation(control: Control): JSX.Element | null;
2880
+ render(): JSX.Element | undefined;
2839
2881
  }
2840
2882
  }
2841
2883
  declare module "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/gui/checkboxPropertyGridComponent" {
@@ -2992,7 +3034,7 @@ declare module "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/gui
2992
3034
  import { LockObject } from "@babylonjs/node-editor/sharedUiComponents/tabs/propertyGrids/lockObject";
2993
3035
  import { RadioButton } from "@babylonjs/gui/2D/controls/radioButton";
2994
3036
  interface IRadioButtonPropertyGridComponentProps {
2995
- radioButton: RadioButton;
3037
+ radioButtons: RadioButton[];
2996
3038
  lockObject: LockObject;
2997
3039
  onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
2998
3040
  }
package/package.json CHANGED
@@ -4,14 +4,14 @@
4
4
  },
5
5
  "name": "@babylonjs/node-editor",
6
6
  "description": "The Babylon.js node material editor.",
7
- "version": "5.0.0-beta.3",
7
+ "version": "5.0.0-beta.7",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/BabylonJS/Babylon.js.git"
11
11
  },
12
12
  "license": "Apache-2.0",
13
13
  "dependencies": {
14
- "@babylonjs/core": "5.0.0-beta.3",
14
+ "@babylonjs/core": "5.0.0-beta.7",
15
15
  "tslib": "^2.3.1"
16
16
  },
17
17
  "files": [