babylonjs-editor 5.2.4 → 5.4.0

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.
Files changed (88) hide show
  1. package/.env +1 -0
  2. package/build/src/index.js +10 -2
  3. package/declaration/src/dashboard/main.d.ts +2 -0
  4. package/declaration/src/dashboard/preferences.d.ts +7 -0
  5. package/declaration/src/editor/dialogs/generate/complete.d.ts +5 -0
  6. package/declaration/src/editor/dialogs/generate/generate-project.d.ts +24 -0
  7. package/declaration/src/editor/dialogs/generate/generate.d.ts +10 -0
  8. package/declaration/src/editor/dialogs/generate/options.d.ts +5 -0
  9. package/declaration/src/editor/layout/assets-browser/items/ragdoll.d.ts +12 -0
  10. package/declaration/src/editor/layout/assets-browser.d.ts +1 -0
  11. package/declaration/src/editor/layout/cinematic/editor.d.ts +3 -1
  12. package/declaration/src/editor/layout/cinematic/timelines.d.ts +1 -0
  13. package/declaration/src/editor/layout/cinematic/tools/tracks.d.ts +2 -0
  14. package/declaration/src/editor/layout/cinematic/tracker.d.ts +1 -0
  15. package/declaration/src/editor/layout/cinematic/tracks.d.ts +1 -0
  16. package/declaration/src/editor/layout/graph.d.ts +2 -2
  17. package/declaration/src/editor/layout/inspector/fields/list.d.ts +2 -1
  18. package/declaration/src/editor/layout/inspector/fields/texture.d.ts +1 -0
  19. package/declaration/src/editor/layout/inspector/marketplace/asset.d.ts +40 -0
  20. package/declaration/src/editor/layout/inspector/particles/node-particle-system-set.d.ts +17 -0
  21. package/declaration/src/editor/layout/inspector/scene/scene.d.ts +1 -0
  22. package/declaration/src/editor/layout/inspector/transform.d.ts +1 -0
  23. package/declaration/src/editor/layout/marketplace/footer.d.ts +11 -0
  24. package/declaration/src/editor/layout/marketplace/grid.d.ts +9 -0
  25. package/declaration/src/editor/layout/marketplace/import-progress.d.ts +11 -0
  26. package/declaration/src/editor/layout/marketplace/item.d.ts +7 -0
  27. package/declaration/src/editor/layout/marketplace/settings-dialog.d.ts +21 -0
  28. package/declaration/src/editor/layout/marketplace/sidebar.d.ts +19 -0
  29. package/declaration/src/editor/layout/marketplace/toolbar.d.ts +17 -0
  30. package/declaration/src/editor/layout/marketplace.d.ts +36 -0
  31. package/declaration/src/editor/layout/navmesh/preview.d.ts +7 -0
  32. package/declaration/src/editor/layout/preview/import/particles.d.ts +3 -2
  33. package/declaration/src/editor/layout/preview/play.d.ts +0 -1
  34. package/declaration/src/editor/layout/ragdoll/editor.d.ts +23 -0
  35. package/declaration/src/editor/layout/ragdoll/empty.d.ts +5 -0
  36. package/declaration/src/editor/layout/ragdoll/inspector.d.ts +28 -0
  37. package/declaration/src/editor/layout/ragdoll/preview.d.ts +27 -0
  38. package/declaration/src/editor/layout/ragdoll/toolbar.d.ts +5 -0
  39. package/declaration/src/editor/layout/toolbar.d.ts +1 -0
  40. package/declaration/src/editor/layout.d.ts +12 -0
  41. package/declaration/src/editor/main.d.ts +8 -0
  42. package/declaration/src/editor/menu.d.ts +4 -1
  43. package/declaration/src/editor/nodes/node-particle-system.d.ts +30 -0
  44. package/declaration/src/editor/rendering/taa.d.ts +11 -0
  45. package/declaration/src/electron/oauth.d.ts +1 -0
  46. package/declaration/src/electron/protocol.d.ts +1 -0
  47. package/declaration/src/export.d.ts +0 -1
  48. package/declaration/src/index.d.ts +3 -0
  49. package/declaration/src/project/export/materials.d.ts +7 -0
  50. package/declaration/src/project/export/particles.d.ts +9 -0
  51. package/declaration/src/project/load/install.d.ts +8 -0
  52. package/declaration/src/project/load/plugins/animation-groups.d.ts +4 -0
  53. package/declaration/src/project/load/plugins/cameras.d.ts +4 -0
  54. package/declaration/src/project/load/plugins/gui.d.ts +3 -0
  55. package/declaration/src/project/load/plugins/lights.d.ts +4 -0
  56. package/declaration/src/project/load/plugins/meshes.d.ts +3 -0
  57. package/declaration/src/project/load/plugins/morph-targets.d.ts +4 -0
  58. package/declaration/src/project/load/plugins/node-particle-system-sets.d.ts +4 -0
  59. package/declaration/src/project/load/plugins/particle-systems.d.ts +4 -0
  60. package/declaration/src/project/load/plugins/shadow-generators.d.ts +4 -0
  61. package/declaration/src/project/load/plugins/skeletons.d.ts +4 -0
  62. package/declaration/src/project/load/plugins/sounds.d.ts +4 -0
  63. package/declaration/src/project/load/plugins/sprite-managers.d.ts +4 -0
  64. package/declaration/src/project/load/plugins/sprite-maps.d.ts +4 -0
  65. package/declaration/src/project/load/plugins/transform-nodes.d.ts +4 -0
  66. package/declaration/src/project/load/scene.d.ts +11 -1
  67. package/declaration/src/project/load/texture.d.ts +2 -3
  68. package/declaration/src/tools/guards/particles.d.ts +6 -0
  69. package/declaration/src/tools/local-storage.d.ts +9 -0
  70. package/declaration/src/tools/marketplaces/ambientcg.d.ts +12 -0
  71. package/declaration/src/tools/marketplaces/polyhaven.d.ts +11 -0
  72. package/declaration/src/tools/marketplaces/provider.d.ts +37 -0
  73. package/declaration/src/tools/marketplaces/registrations.d.ts +3 -0
  74. package/declaration/src/tools/marketplaces/sketchfab/settings.d.ts +8 -0
  75. package/declaration/src/tools/marketplaces/sketchfab.d.ts +25 -0
  76. package/declaration/src/tools/marketplaces/types.d.ts +79 -0
  77. package/declaration/src/tools/material/extract.d.ts +1 -1
  78. package/declaration/src/tools/material/texture.d.ts +2 -0
  79. package/declaration/src/tools/node/metadata.d.ts +2 -2
  80. package/declaration/src/tools/node/parenting.d.ts +11 -0
  81. package/declaration/src/tools/observables.d.ts +5 -1
  82. package/declaration/src/tools/particles/augmentations.d.ts +0 -9
  83. package/declaration/src/tools/particles/extract.d.ts +3 -2
  84. package/declaration/src/tools/particles/metadata.d.ts +39 -0
  85. package/declaration/src/tools/particles/particle.d.ts +6 -0
  86. package/declaration/src/ui/shadcn/ui/alert.d.ts +9 -0
  87. package/declaration/src/ui/shadcn/ui/field.d.ts +24 -0
  88. package/package.json +45 -32
@@ -1 +1,4 @@
1
- export declare function setupEditorMenu(): void;
1
+ export declare function setupEditorMenu(options: {
2
+ enableExperimentalFeatures: boolean;
3
+ openedTabs: string[];
4
+ }): void;
@@ -0,0 +1,30 @@
1
+ import { Scene, Mesh, NodeParticleSystemSet, ParticleSystemSet, Node } from "babylonjs";
2
+ export declare class NodeParticleSystemSetMesh extends Mesh {
3
+ /**
4
+ * Defines the reference to the associated Particle System Set created from the node particle system set.
5
+ */
6
+ particleSystemSet: ParticleSystemSet | null;
7
+ /**
8
+ * Defines the reference to the associated Node Particle System Set.
9
+ */
10
+ nodeParticleSystemSet: NodeParticleSystemSet | null;
11
+ /**
12
+ * Constructor.
13
+ * @param name defines the name of mesh.
14
+ * @param scene defines the scene the mesh belongs to.
15
+ */
16
+ constructor(name: string, scene: Scene, parent?: Node | null, source?: Mesh, doNotCloneChildren?: boolean, clonePhysicsImpostor?: boolean);
17
+ buildNodeParticleSystemSet(data: any): Promise<void>;
18
+ /**
19
+ * Releases resources associated with this scene link.
20
+ */
21
+ dispose(): void;
22
+ /**
23
+ * Gets the current object class name.
24
+ * @return the class name
25
+ */
26
+ getClassName(): string;
27
+ clone(name?: string, newParent?: Node | null, doNotCloneChildren?: boolean, clonePhysicsImpostor?: boolean): NodeParticleSystemSetMesh;
28
+ serialize(serializationObject?: any): any;
29
+ static Parse(parsedMesh: any, scene: Scene, _rootUrl: string): NodeParticleSystemSetMesh;
30
+ }
@@ -0,0 +1,11 @@
1
+ import { TAARenderingPipeline, Camera } from "babylonjs";
2
+ import { Editor } from "../main";
3
+ /**
4
+ * Defines the configuration of the TAA rendering pipeline per camera.
5
+ */
6
+ export declare const taaPipelineCameraConfigurations: Map<Camera, any>;
7
+ export declare function getTAARenderingPipeline(): TAARenderingPipeline | null;
8
+ export declare function disposeTAARenderingPipeline(): void;
9
+ export declare function createTAARenderingPipeline(editor: Editor): TAARenderingPipeline;
10
+ export declare function serializeTAARenderingPipeline(): any;
11
+ export declare function parseTAARenderingPipeline(editor: Editor, data: any): TAARenderingPipeline;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -83,4 +83,3 @@ export * from "./ui/shadcn/ui/toggle";
83
83
  export * from "./ui/shadcn/ui/toolbar-radio-group";
84
84
  export * from "./ui/shadcn/ui/tooltip";
85
85
  export * from "./project/configuration";
86
- export * as AiIcons from "react-icons/ai";
@@ -1,3 +1,4 @@
1
+ import "dotenv/config";
1
2
  import "./electron/node-pty";
2
3
  import "./electron/events/shell";
3
4
  import "./electron/events/dialog";
@@ -5,3 +6,5 @@ import "./electron/events/editor";
5
6
  import "./electron/events/window";
6
7
  import "./electron/assimp/assimpjs";
7
8
  import "./electron/events/export";
9
+ import "./electron/protocol";
10
+ import "./electron/oauth";
@@ -1 +1,8 @@
1
+ import { Editor } from "../../editor/main";
1
2
  export declare function configureMaterials(data: any): void;
3
+ export type ProcessExportedMaterialOptions = {
4
+ force: boolean;
5
+ scenePath: string;
6
+ exportedAssets: string[];
7
+ };
8
+ export declare function processExportedMaterial(editor: Editor, absolutePath: string, options: ProcessExportedMaterialOptions): Promise<void>;
@@ -0,0 +1,9 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../editor/main";
3
+ export declare function configureParticleSystems(data: any, scene: Scene): void;
4
+ export type ProcessExportedParticleSystemOptions = {
5
+ force: boolean;
6
+ scenePath: string;
7
+ exportedAssets: string[];
8
+ };
9
+ export declare function processExportedNodeParticleSystemSet(editor: Editor, absolutePath: string, options: ProcessExportedParticleSystemOptions): Promise<void>;
@@ -13,3 +13,11 @@ export declare function installDependencies(packageManager: EditorProjectPackage
13
13
  * @param version defines the version of babylonjs-editor-tools to install.
14
14
  */
15
15
  export declare function installBabylonJSEditorTools(packageManager: EditorProjectPackageManager, cwd: string, version: string): Promise<number>;
16
+ /**
17
+ * Installs the babylonjs-editor-cli package that matches the given version.
18
+ * The given version is mostly the current version of the editor.
19
+ * @param packageManager defines the package manager to use for installation.
20
+ * @param cwd defines absolute path to the working directory where to install the dependencies.
21
+ * @param version defines the version of babylonjs-editor-cli to install.
22
+ */
23
+ export declare function installBabylonJSEditorCLI(packageManager: EditorProjectPackageManager, cwd: string, version: string): Promise<number>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadAnimationGroups(editor: Editor, animationGroupFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadCameras(editor: Editor, cameraFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { Editor } from "../../../editor/main";
2
+ import { ISceneLoaderPluginOptions } from "../scene";
3
+ export declare function loadGuis(editor: Editor, guiFiles: string[], options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadLights(editor: Editor, lightsFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { Scene } from "babylonjs";
2
+ import { ISceneLoaderPluginOptions } from "../scene";
3
+ export declare function loadMeshes(meshesFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadMorphTargetManagers(editor: Editor, morphTargetManagerFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadNodeParticleSystemSets(editor: Editor, nodeParticleSystemSetFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadParticleSystems(editor: Editor, particleSystemFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadShadowGenerators(editor: Editor, shadowGeneratorFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadSkeletons(editor: Editor, skeletonFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadSounds(editor: Editor, soundFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadSpriteManagers(editor: Editor, spriteManagerFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadSpriteMaps(editor: Editor, spriteMapFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import { Scene } from "babylonjs";
2
+ import { Editor } from "../../../editor/main";
3
+ import { ISceneLoaderPluginOptions } from "../scene";
4
+ export declare function loadTransformNodes(editor: Editor, nodesFiles: string[], scene: Scene, options: ISceneLoaderPluginOptions): Promise<void>;
@@ -3,7 +3,8 @@ import { Editor } from "../../editor/main";
3
3
  import { SceneLinkNode } from "../../editor/nodes/scene-link";
4
4
  import { SpriteMapNode } from "../../editor/nodes/sprite-map";
5
5
  import { SpriteManagerNode } from "../../editor/nodes/sprite-manager";
6
- import "./texture";
6
+ import { IAssetCache } from "../../tools/assets/cache";
7
+ import { LoadSceneProgressComponent } from "./progress";
7
8
  export type SceneLoaderOptions = {
8
9
  /**
9
10
  * Defines wether or not the scene is being loaded as link.
@@ -21,4 +22,13 @@ export type SceneLoadResult = {
21
22
  spriteMaps: SpriteMapNode[];
22
23
  spriteManagers: SpriteManagerNode[];
23
24
  };
25
+ export type ISceneLoaderPluginOptions = SceneLoaderOptions & {
26
+ scenePath: string;
27
+ relativeScenePath: string;
28
+ projectPath: string;
29
+ loadResult: SceneLoadResult;
30
+ progress: LoadSceneProgressComponent;
31
+ progressStep: number;
32
+ assetsCache: Record<string, IAssetCache>;
33
+ };
24
34
  export declare function loadScene(editor: Editor, projectPath: string, scenePath: string, options?: SceneLoaderOptions): Promise<SceneLoadResult>;
@@ -1,3 +1,2 @@
1
- import { Scene, BaseTexture } from "babylonjs";
2
- export declare const originalTextureParser: (sourceProperty: any, scene: Scene, rootUrl: string) => import("babylonjs").Nullable<BaseTexture>;
3
- export declare function textureParser(source: any, scene: Scene, rootUrl: string): BaseTexture | null;
1
+ import { Editor } from "../../editor/main";
2
+ export declare function registerTextureParser(editor: Editor): void;
@@ -1,4 +1,5 @@
1
1
  import { ParticleSystem, GPUParticleSystem, IParticleSystem } from "babylonjs";
2
+ import { NodeParticleSystemSetMesh } from "../../editor/nodes/node-particle-system";
2
3
  /**
3
4
  * Returns wether or not the given object is a ParticleSystem.
4
5
  * @param object defines the reference to the object to test its class name.
@@ -9,6 +10,11 @@ export declare function isParticleSystem(object: any): object is ParticleSystem;
9
10
  * @param object defines the reference to the object to test its class name.
10
11
  */
11
12
  export declare function isGPUParticleSystem(object: any): object is GPUParticleSystem;
13
+ /**
14
+ * Returns wether or not the given object is a NodeParticleSystemMesh.
15
+ * @param object defines the reference to the object to test its class name.
16
+ */
17
+ export declare function isNodeParticleSystemSetMesh(object: any): object is NodeParticleSystemSetMesh;
12
18
  /**
13
19
  * Returns wether or not the given object is a IParticleSystem.
14
20
  * @param object defines the reference to the object to test its class name.
@@ -27,3 +27,12 @@ export declare function tryGetCloseDashboardOnProjectOpenFromLocalStorage(): boo
27
27
  * @param enabled defines whether or not the dashboard should be closed when a project is opened.
28
28
  */
29
29
  export declare function trySetCloseDashboardOnProjectOpenInLocalStorage(enabled: boolean): void;
30
+ /**
31
+ * Returns the terminal path stored in the local storage, or null if it fails to access the local storage or if no terminal path is stored.
32
+ */
33
+ export declare function tryGetTerminalFromLocalStorage(): string | null;
34
+ /**
35
+ * Sets the terminal path in the local storage.
36
+ * @param terminalPath defines the terminal path to set in the local storage.
37
+ */
38
+ export declare function trySetTerminalInLocalStorage(terminalPath: string): void;
@@ -0,0 +1,12 @@
1
+ import { IMarketplaceAsset, IMarketplaceSearchResult, IFileToDownload, IMarketplaceSearchFilters, IMarketplaceFilterDefinition } from "./types";
2
+ import { MarketplaceProvider } from "./provider";
3
+ export declare class AmbientCGProvider extends MarketplaceProvider {
4
+ id: string;
5
+ title: string;
6
+ private readonly _baseUrl;
7
+ private _assetCache;
8
+ getSearchFilters(): IMarketplaceFilterDefinition[];
9
+ search(query: string, pageToken?: string, filters?: IMarketplaceSearchFilters): Promise<IMarketplaceSearchResult>;
10
+ getAssetDetails(id: string): Promise<IMarketplaceAsset>;
11
+ protected getFilesToDownload(asset: IMarketplaceAsset, selectedQuality: string, selectedType: string): IFileToDownload[];
12
+ }
@@ -0,0 +1,11 @@
1
+ import { IMarketplaceAsset, IMarketplaceSearchResult, IMarketplaceFilterDefinition, IMarketplaceSearchFilters, IFileToDownload } from "./types";
2
+ import { MarketplaceProvider } from "./provider";
3
+ export declare class PolyHavenProvider extends MarketplaceProvider {
4
+ id: string;
5
+ title: string;
6
+ private _apiUrl;
7
+ getSearchFilters(): IMarketplaceFilterDefinition[];
8
+ search(query: string, pageToken?: string, filters?: IMarketplaceSearchFilters): Promise<IMarketplaceSearchResult>;
9
+ getAssetDetails(id: string): Promise<IMarketplaceAsset>;
10
+ protected getFilesToDownload(asset: IMarketplaceAsset, selectedQuality: string, selectedType: string): IFileToDownload[];
11
+ }
@@ -0,0 +1,37 @@
1
+ import { Editor } from "../../editor/main";
2
+ import { IMarketplaceAsset, IMarketplaceSearchResult, IMarketplaceFilterDefinition, IMarketplaceSearchFilters, IFileToDownload, IMarketplaceProgress, IMarketplaceOAuth, IMarketplaceSettings } from "./types";
3
+ export declare abstract class MarketplaceProvider {
4
+ private static _registry;
5
+ static register(provider: MarketplaceProvider): void;
6
+ static getProviders(): MarketplaceProvider[];
7
+ abstract id: string;
8
+ abstract title: string;
9
+ private _activeDownloadIds;
10
+ private _downloadListeners;
11
+ protected _settings: IMarketplaceSettings;
12
+ private _settingsListeners;
13
+ onSettingsChanged(listener: (id: string, value: any) => void): void;
14
+ removeSettingsListener(listener: (id: string, value: any) => void): void;
15
+ getSearchFilters?(): IMarketplaceFilterDefinition[];
16
+ abstract search(query: string, pageToken?: string, filters?: IMarketplaceSearchFilters): Promise<IMarketplaceSearchResult>;
17
+ abstract getAssetDetails?(id: string): Promise<IMarketplaceAsset>;
18
+ protected onSettingChanged(id: string, value: any): void;
19
+ protected getSettings<T extends IMarketplaceSettings>(): T;
20
+ getOAuth?(): IMarketplaceOAuth;
21
+ isAuthenticated?(): boolean;
22
+ login?(): void;
23
+ renderSettings?(): any;
24
+ protected abstract getFilesToDownload(asset: IMarketplaceAsset, selectedQuality: string, selectedType: string): IFileToDownload[];
25
+ registerDownloadListener(listener: (id: string, progress: IMarketplaceProgress) => void): () => void;
26
+ abortDownload(id: string): void;
27
+ getAssetDir(assetId: string, projectPath: string): string;
28
+ downloadAndImport(asset: IMarketplaceAsset, editor: Editor, selectedQuality: string, selectedType: string, type?: string): Promise<void>;
29
+ private _convertFileToEnv;
30
+ private _convertTextureToEnv;
31
+ private _getFilesRecursive;
32
+ private _loadTexture;
33
+ private _parseTextures;
34
+ private _packNormalParallax;
35
+ private _packORM;
36
+ private _convertToMaterial;
37
+ }
@@ -0,0 +1,3 @@
1
+ import { MarketplaceProvider } from "./provider";
2
+ declare const _default: () => MarketplaceProvider[];
3
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { ISketchfabSettings } from "../sketchfab";
2
+ interface ISketchfabProviderSettingsProps {
3
+ onSettingChanged: (key: string, value: string) => void;
4
+ settings: ISketchfabSettings;
5
+ handleOAuthLogin: () => void;
6
+ }
7
+ export declare const SketchfabProviderSettings: ({ onSettingChanged, handleOAuthLogin, settings }: ISketchfabProviderSettingsProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from "react";
2
+ import { IMarketplaceAsset, IMarketplaceSearchResult, IFileToDownload, IMarketplaceSettings, IMarketplaceSearchFilters, IMarketplaceFilterDefinition, IMarketplaceOAuth } from "./types";
3
+ import { MarketplaceProvider } from "./provider";
4
+ export interface ISketchfabSettings extends IMarketplaceSettings {
5
+ token: string;
6
+ }
7
+ export declare class SketchfabProvider extends MarketplaceProvider {
8
+ id: string;
9
+ title: string;
10
+ private readonly _baseUrl;
11
+ private readonly _oauthCallbackUrl;
12
+ private _pendingOAuthState;
13
+ protected _settings: ISketchfabSettings;
14
+ renderSettings(): ReactNode;
15
+ getOAuth(): IMarketplaceOAuth;
16
+ getSearchFilters(): IMarketplaceFilterDefinition[];
17
+ search(query: string, pageToken?: string, filters?: IMarketplaceSearchFilters): Promise<IMarketplaceSearchResult>;
18
+ getAssetDetails(id: string): Promise<IMarketplaceAsset>;
19
+ protected getFilesToDownload(asset: IMarketplaceAsset, selectedQuality: string, selectedType: string): IFileToDownload[];
20
+ isAuthenticated(): boolean;
21
+ login(): void;
22
+ private _handleOAuthLogin;
23
+ private _createOAuthState;
24
+ private _resolveOAuthCallbackUrl;
25
+ }
@@ -0,0 +1,79 @@
1
+ export interface IDownloadOptions {
2
+ [quality: string]: {
3
+ [fileType: string]: {
4
+ include: {
5
+ [path: string]: {
6
+ size: number;
7
+ url: string;
8
+ md5: string;
9
+ };
10
+ };
11
+ size: number;
12
+ url: string;
13
+ md5: string;
14
+ extension?: string;
15
+ };
16
+ };
17
+ }
18
+ export interface IMarketplaceAsset {
19
+ id: string;
20
+ name: string;
21
+ thumbnailUrl: string;
22
+ description?: string;
23
+ author?: string;
24
+ license?: string;
25
+ tags?: string[];
26
+ marketplaceUrl?: string;
27
+ marketplaceActionLabel?: string;
28
+ isDownloadable?: boolean;
29
+ downloadOptions?: IDownloadOptions;
30
+ }
31
+ export interface IMarketplaceSearchResult {
32
+ assets: IMarketplaceAsset[];
33
+ totalCount?: number;
34
+ nextPageToken?: string;
35
+ }
36
+ export type MarketplaceFilterValue = string | number | boolean | string[];
37
+ export interface IMarketplaceFilterOption {
38
+ label: string;
39
+ value: string;
40
+ }
41
+ export interface IMarketplaceFilterDefinition {
42
+ id: string;
43
+ label: string;
44
+ type: "boolean" | "select" | "multi-select" | "number" | "text";
45
+ options?: IMarketplaceFilterOption[];
46
+ defaultValue?: MarketplaceFilterValue;
47
+ placeholder?: string;
48
+ min?: number;
49
+ max?: number;
50
+ step?: number;
51
+ }
52
+ export interface IMarketplaceSearchFilters {
53
+ [id: string]: MarketplaceFilterValue | undefined;
54
+ }
55
+ export interface IFileToDownload {
56
+ url: string;
57
+ path: string;
58
+ size?: number;
59
+ md5?: string;
60
+ extract?: boolean;
61
+ }
62
+ export interface IMarketplaceProgress {
63
+ progress?: number;
64
+ loaded?: number;
65
+ total?: number;
66
+ speed?: number;
67
+ extraStatus?: string;
68
+ }
69
+ export interface IMarketplaceOAuth {
70
+ authorizeUrl: string;
71
+ redirectUrl: string;
72
+ onRedirect(url: string): Promise<void>;
73
+ }
74
+ export interface IMarketplaceSettings {
75
+ }
76
+ export interface IMarketplaceDownloadItem {
77
+ id: string;
78
+ abortController: AbortController;
79
+ }
@@ -3,4 +3,4 @@ export interface IExtractNodeMaterialTexturesOptions {
3
3
  materialData: any;
4
4
  assetsDirectory: string;
5
5
  }
6
- export declare function extractNodeMaterialTextures(editor: Editor, options: IExtractNodeMaterialTexturesOptions): Promise<void>;
6
+ export declare function extractNodeMaterialTextures(editor: Editor, options: IExtractNodeMaterialTexturesOptions): Promise<string[]>;
@@ -0,0 +1,2 @@
1
+ import { Scene } from "babylonjs";
2
+ export declare function storeTexturesBaseSize(scene: Scene): void;
@@ -1,5 +1,5 @@
1
1
  import { Node } from "babylonjs";
2
- export interface IMetadata {
2
+ export interface INodeMetadata {
3
3
  /**
4
4
  * Defines wether or not the object is locked.
5
5
  */
@@ -18,7 +18,7 @@ export interface IMetadata {
18
18
  * @param node defines the node to ensure metadata for.
19
19
  * @returns the metadata of the node, creating it if does not exist.
20
20
  */
21
- export declare function ensureNodeMetadata(node: Node): IMetadata;
21
+ export declare function ensureNodeMetadata(node: Node): INodeMetadata;
22
22
  /**
23
23
  * Gets wether or not the given node is locked in the editor.
24
24
  * @param node defines the node to check.
@@ -0,0 +1,11 @@
1
+ import { Node, Vector3, Quaternion, TransformNode } from "babylonjs";
2
+ export interface IOldNodeHierarchyConfiguration {
3
+ parent: Node | null;
4
+ position?: Vector3;
5
+ rotation?: Vector3;
6
+ scaling?: Vector3;
7
+ rotationQuaternion?: Quaternion;
8
+ }
9
+ export declare function getNodeParentingConfiguration(node: Node): IOldNodeHierarchyConfiguration;
10
+ export declare function applyNodeParentingConfiguration(node: Node, config: IOldNodeHierarchyConfiguration): void;
11
+ export declare function applyTransformNodeParentingConfiguration(node: Node, newParent: Node | null, tempTransfromNode: TransformNode): void;
@@ -1,4 +1,4 @@
1
- import { BaseTexture, Node, Observable, IParticleSystem, Sprite } from "babylonjs";
1
+ import { BaseTexture, Node, Observable, IParticleSystem, Sprite, Skeleton } from "babylonjs";
2
2
  /**
3
3
  * Observable for when the project has been saved.
4
4
  */
@@ -11,6 +11,10 @@ export declare const onNodesAddedObservable: Observable<void>;
11
11
  * Observable for when a node has been modified in the editor.
12
12
  */
13
13
  export declare const onNodeModifiedObservable: Observable<Node>;
14
+ /**
15
+ * Observable for when a skeleton has been modified in the editor.
16
+ */
17
+ export declare const onSkeletonModifiedObservable: Observable<Skeleton>;
14
18
  /**
15
19
  * Observable for when a sprite has been modified in the editor.
16
20
  */
@@ -4,13 +4,4 @@ declare module "babylonjs" {
4
4
  id?: string;
5
5
  uniqueId?: number;
6
6
  }
7
- interface IParticleSystem {
8
- sourceParticleSystemSetId?: string;
9
- }
10
- interface ParticleSystem {
11
- sourceParticleSystemSetId?: string;
12
- }
13
- interface GPUParticleSystem {
14
- sourceParticleSystemSetId?: string;
15
- }
16
7
  }
@@ -1,9 +1,10 @@
1
1
  import { Editor } from "../../editor/main";
2
+ import { IExtractTextureAssetFromDataStringResult } from "../assets/extract";
2
3
  export interface IExtractParticleSystemTexturesOptions {
3
4
  assetsDirectory: string;
4
5
  }
5
- export declare function extractParticleSystemTextures(editor: Editor, options: IExtractParticleSystemTexturesOptions): Promise<void>;
6
+ export declare function extractParticleSystemTextures(editor: Editor, particleSystemData: any, options: IExtractParticleSystemTexturesOptions): Promise<IExtractTextureAssetFromDataStringResult | null>;
6
7
  export interface IExtractNodeParticleSystemSetTexturesOptions extends IExtractParticleSystemTexturesOptions {
7
8
  particlesData: any;
8
9
  }
9
- export declare function extractNodeParticleSystemSetTextures(editor: Editor, options: IExtractNodeParticleSystemSetTexturesOptions): Promise<void>;
10
+ export declare function extractNodeParticleSystemSetTextures(editor: Editor, options: IExtractNodeParticleSystemSetTexturesOptions): Promise<string[]>;
@@ -0,0 +1,39 @@
1
+ import { ParticleSystem, GPUParticleSystem } from "babylonjs";
2
+ export interface IParticleSystemMetadata {
3
+ /**
4
+ * Defines wether or not the object should be serialized when the scene is exported.
5
+ */
6
+ doNotSerialize?: boolean;
7
+ /**
8
+ * Defines wether or not the object is visible in the graph panel in the editor.
9
+ */
10
+ notVisibleInGraph?: boolean;
11
+ }
12
+ /**
13
+ * Ensures that metadata exists for the given node.
14
+ * @param node defines the node to ensure metadata for.
15
+ * @returns the metadata of the node, creating it if does not exist.
16
+ */
17
+ export declare function ensureParticleSystemMetadata(node: ParticleSystem | GPUParticleSystem): IParticleSystemMetadata;
18
+ /**
19
+ * Gets wether or not the given node is not serializable.
20
+ * @param node defines the reference to the node to get the metadata to.
21
+ */
22
+ export declare function isParticleSystemSerializable(node: ParticleSystem | GPUParticleSystem): boolean;
23
+ /**
24
+ * Sets wether or not the given node is not serializable.
25
+ * @param node defines the reference to the node to set configuration.
26
+ * @param value defines the value to set.
27
+ */
28
+ export declare function setParticleSystemSerializable(node: ParticleSystem | GPUParticleSystem, value: boolean): void;
29
+ /**
30
+ * Gets wether or not the given node is visible in the graph panel of the editor.
31
+ * @param node defines the reference to the node to check.
32
+ */
33
+ export declare function isParticleSystemVisibleInGraph(node: ParticleSystem | GPUParticleSystem): boolean;
34
+ /**
35
+ * Sets wether or not the given node is visible in the graph panel of the editor.
36
+ * @param node defines the reference to the node to set configuration.
37
+ * @param value defines the value to set.
38
+ */
39
+ export declare function setParticleSystemVisibleInGraph(node: ParticleSystem | GPUParticleSystem, value: boolean): void;
@@ -0,0 +1,6 @@
1
+ import { NodeParticleSystemSet } from "babylonjs";
2
+ /**
3
+ * Normalizes the unique IDs of the nodes in the given Node Particle System Set based on the provided node particle system set data.
4
+ * This allows to get ids not modified after reloading the node particle system set to be git-compliant.
5
+ */
6
+ export declare function normalizeNodeParticleSystemSetUniqueIds(nodeParticleSystem: NodeParticleSystemSet, nodeParticleSystemSetData: any): void;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,24 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import { Label } from "./label";
3
+ declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
4
+ declare function FieldLegend({ className, variant, ...props }: React.ComponentProps<"legend"> & {
5
+ variant?: "legend" | "label";
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function FieldGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare const fieldVariants: (props?: ({
9
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
10
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
11
+ declare function Field({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof fieldVariants>): import("react/jsx-runtime").JSX.Element;
12
+ declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
13
+ declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
14
+ declare function FieldTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
15
+ declare function FieldDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
16
+ declare function FieldSeparator({ children, className, ...props }: React.ComponentProps<"div"> & {
17
+ children?: React.ReactNode;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function FieldError({ className, children, errors, ...props }: React.ComponentProps<"div"> & {
20
+ errors?: Array<{
21
+ message?: string;
22
+ } | undefined>;
23
+ }): import("react/jsx-runtime").JSX.Element | null;
24
+ export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle };