Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import type { ExtensionMetadata } from "./extensionFeed";

import { BuiltInsExtensionFeed } from "./builtInsExtensionFeed";

const BabylonWebResources = {
homepage: "https://www.babylonjs.com",
repository: "https://github.com/BabylonJS/Babylon.js",
bugs: "https://github.com/BabylonJS/Babylon.js/issues",
} as const satisfies Partial<ExtensionMetadata>;

/**
* Well-known default built in extensions for the Inspector.
*/
Expand All @@ -14,18 +22,24 @@ export const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspecto
name: "Export Tools",
description: "Adds new features to enable exporting Babylon assets such as .gltf, .glb, .babylon, and more.",
keywords: ["export", "gltf", "glb", "babylon", "exporter", "tools"],
...BabylonWebResources,
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
getExtensionModuleAsync: async () => await import("../services/panes/tools/exportService"),
},
{
name: "Capture Tools",
description: "Adds new features to enable capturing screenshots, GIFs, videos, and more.",
keywords: ["capture", "screenshot", "gif", "video", "tools"],
...BabylonWebResources,
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
getExtensionModuleAsync: async () => await import("../services/panes/tools/captureService"),
},
{
name: "Import Tools",
description: "Adds new features related to importing Babylon assets.",
keywords: ["import", "tools"],
...BabylonWebResources,
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
getExtensionModuleAsync: async () => await import("../services/panes/tools/importService"),
},
]);
59 changes: 58 additions & 1 deletion packages/dev/inspector-v2/src/extensibility/extensionFeed.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
import type { WeaklyTypedServiceDefinition } from "../modularity/serviceContainer";

export type PersonMetadata = {
/**
* The name of the person.
*/
readonly name: string;

/**
* The email address of the person.
*/
readonly email?: string;

/**
* The URL to the person's website.
*/
readonly url?: string;

/**
* The Babylon forum username of the person.
*/
readonly forumUserName?: string;
};

export type ExtensionMetadata = {
/**
* The name of the extension.
*/
readonly name: string;

/**
* The version of the extension (as valid semver).
*/
readonly version?: string;

/**
* The description of the extension.
*/
Expand All @@ -14,7 +41,37 @@ export type ExtensionMetadata = {
/**
* The keywords of the extension.
*/
readonly keywords: readonly string[];
readonly keywords?: readonly string[];

/**
* The URL to the extension homepage.
*/
readonly homepage?: string;

/**
* Specify the place where your code lives. This is helpful for people who want to contribute.
*/
readonly repository?: string;

/**
* The URL to your extension's issue tracker and / or the email address to which issues should be reported. These are helpful for people who encounter issues with your extension.
*/
readonly bugs?: string;

/**
* A license for your package so that people know how they are permitted to use it, and any restrictions you're placing on it.
*/
readonly license?: string;

/**
* The primary author of the extension.
*/
readonly author?: string | PersonMetadata;

/**
* The contributors to the extension.
*/
readonly contributors?: readonly (string | PersonMetadata)[];
};

export type ExtensionModule = {
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/inspector-v2/src/modularTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { ExtensionManagerContext } from "./contexts/extensionManagerContext";
import { ExtensionManager } from "./extensibility/extensionManager";
import { SetThemeMode } from "./hooks/themeHooks";
import { ServiceContainer } from "./modularity/serviceContainer";
import { ExtensionListServiceDefinition } from "./services/extensionsListService";
import { MakeShellServiceDefinition, RootComponentServiceIdentity } from "./services/shellService";
import { ThemeSelectorServiceDefinition } from "./services/themeSelectorService";

Expand Down Expand Up @@ -134,6 +133,7 @@ export function MakeModularTool(options: ModularToolOptions): IDisposable {

// Register the extension list service (for browsing/installing extensions) if extension feeds are provided.
if (extensionFeeds.length > 0) {
const { ExtensionListServiceDefinition } = await import("./services/extensionsListService");
await serviceContainer.addServiceAsync(ExtensionListServiceDefinition);
}

Expand Down
Loading