@kite3d/engine 0.15.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.
- package/dist/authoring.d.ts +54 -0
- package/dist/authoring.js +165 -0
- package/dist/authoring.js.map +1 -0
- package/dist/authoringValidation.d.ts +110 -0
- package/dist/authoringValidation.js +488 -0
- package/dist/authoringValidation.js.map +1 -0
- package/dist/defaults.d.ts +2 -0
- package/dist/fileTypes.d.ts +5 -0
- package/dist/fileTypes.js +51 -0
- package/dist/fileTypes.js.map +1 -0
- package/dist/importMap.d.ts +15 -0
- package/dist/importMap.js +62 -0
- package/dist/importMap.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2756 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations.js +5 -0
- package/dist/migrations.js.map +1 -0
- package/dist/paths.d.ts +9 -0
- package/dist/paths.js +13 -0
- package/dist/paths.js.map +1 -0
- package/dist/plugins/GeneratorComponent.d.ts +40 -0
- package/dist/plugins/HtmlUiComponent.d.ts +52 -0
- package/dist/plugins/HtmlUiComponent.example.d.ts +0 -0
- package/dist/plugins/cannon/Cannon3DBodyComponent.d.ts +27 -0
- package/dist/plugins/cannon/Cannon3DShapeComponent.d.ts +57 -0
- package/dist/plugins/cannon/CannonPhysicsPlugin.d.ts +63 -0
- package/dist/plugins/cannon/CannonRagdollComponent.d.ts +148 -0
- package/dist/plugins/cannon/helper.d.ts +24 -0
- package/dist/plugins/cannon/threeToCannon.d.ts +63 -0
- package/dist/plugins/cannon/utils.d.ts +9 -0
- package/dist/projectFormat.js +108 -0
- package/dist/projectFormat.js.map +1 -0
- package/dist/runtime/createGame.d.ts +29 -0
- package/dist/runtime/index.d.ts +18 -0
- package/dist/runtime/migrations.d.ts +5 -0
- package/dist/runtime/nestedAssets.d.ts +26 -0
- package/dist/runtime/projectFormat.d.ts +83 -0
- package/dist/runtime/version.d.ts +1 -0
- package/dist/runtime.js +72835 -0
- package/dist/runtime.js.map +1 -0
- package/dist/sceneSerialization.d.ts +17 -0
- package/dist/sceneSerialization.js +174 -0
- package/dist/sceneSerialization.js.map +1 -0
- package/dist/scripts.d.ts +17 -0
- package/dist/version.js +7 -0
- package/dist/version.js.map +1 -0
- package/package.json +86 -0
- package/src/authoring.ts +293 -0
- package/src/authoringValidation.ts +815 -0
- package/src/defaults.ts +277 -0
- package/src/fileTypes.ts +53 -0
- package/src/importMap.ts +105 -0
- package/src/index.ts +15 -0
- package/src/paths.ts +9 -0
- package/src/plugins/GeneratorComponent.ts +275 -0
- package/src/plugins/HtmlUiComponent.example.ts +202 -0
- package/src/plugins/HtmlUiComponent.md +219 -0
- package/src/plugins/HtmlUiComponent.ts +320 -0
- package/src/plugins/cannon/Cannon3DBodyComponent.ts +227 -0
- package/src/plugins/cannon/Cannon3DShapeComponent.ts +258 -0
- package/src/plugins/cannon/CannonPhysicsPlugin.ts +409 -0
- package/src/plugins/cannon/CannonRagdollComponent.ts +1170 -0
- package/src/plugins/cannon/helper.ts +255 -0
- package/src/plugins/cannon/threeToCannon.ts +441 -0
- package/src/plugins/cannon/utils.ts +185 -0
- package/src/runtime/createGame.ts +337 -0
- package/src/runtime/index.ts +19 -0
- package/src/runtime/migrations.ts +6 -0
- package/src/runtime/nestedAssets.ts +226 -0
- package/src/runtime/projectFormat.ts +233 -0
- package/src/runtime/version.ts +3 -0
- package/src/sceneSerialization.ts +289 -0
- package/src/scripts.ts +52 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const p = {
|
|
2
|
+
plugin: [".plugin.js", ".plugin.ts"],
|
|
3
|
+
script: [".script.js", ".script.ts"],
|
|
4
|
+
material: [".mat", ".mat.json"],
|
|
5
|
+
image: [".png", ".jpeg", ".jpg", ".gif", ".bmp", ".tiff", ".webp", ".hdr", ".exr", ".ktx2", ".svg"]
|
|
6
|
+
// 'texture': ['.png', '.jpeg', '.jpg', '.gif', '.bmp', '.tiff', '.webp', '.tex.json'],
|
|
7
|
+
// 'geometry': ['.glb', '.gltf', '.obj', '.fbx', '.ply', '.stl', '.geom.json'],
|
|
8
|
+
// 'object': ['.glb', '.gltf', '.obj', '.fbx', '.ply', '.stl', '.geom.json'],
|
|
9
|
+
}, m = {
|
|
10
|
+
"image/jpeg": "jpg",
|
|
11
|
+
"image/png": "png",
|
|
12
|
+
"image/svg+xml": "svg",
|
|
13
|
+
"image/webp": "webp",
|
|
14
|
+
"image/x-exr": "exr",
|
|
15
|
+
"image/x-hdr": "hdr",
|
|
16
|
+
"model/gltf+binary": "glb",
|
|
17
|
+
"model/gltf+json": "gltf",
|
|
18
|
+
"model/gltf": "gltf"
|
|
19
|
+
}, g = {
|
|
20
|
+
".html": "text/html; charset=utf-8",
|
|
21
|
+
".css": "text/css; charset=utf-8",
|
|
22
|
+
".js": "text/javascript; charset=utf-8",
|
|
23
|
+
".mjs": "text/javascript; charset=utf-8",
|
|
24
|
+
".ts": "text/typescript; charset=utf-8",
|
|
25
|
+
".json": "application/json; charset=utf-8",
|
|
26
|
+
".gltf": "model/gltf+json",
|
|
27
|
+
".glb": "model/gltf-binary",
|
|
28
|
+
".png": "image/png",
|
|
29
|
+
".jpg": "image/jpeg",
|
|
30
|
+
".jpeg": "image/jpeg",
|
|
31
|
+
".gif": "image/gif",
|
|
32
|
+
".webp": "image/webp",
|
|
33
|
+
".svg": "image/svg+xml",
|
|
34
|
+
".wasm": "application/wasm",
|
|
35
|
+
".mp3": "audio/mpeg",
|
|
36
|
+
".ogg": "audio/ogg",
|
|
37
|
+
".wav": "audio/wav",
|
|
38
|
+
".mp4": "video/mp4",
|
|
39
|
+
".webm": "video/webm"
|
|
40
|
+
};
|
|
41
|
+
function o(s) {
|
|
42
|
+
const i = s.toLowerCase(), e = Object.keys(g).sort((t, a) => a.length - t.length).find((t) => i.endsWith(t));
|
|
43
|
+
return e ? g[e] : "application/octet-stream";
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
g as extensionMimeTypes,
|
|
47
|
+
m as mimeToExt,
|
|
48
|
+
o as mimeTypeForPath,
|
|
49
|
+
p as typesExts
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=fileTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileTypes.js","sources":["../src/fileTypes.ts"],"sourcesContent":["export type Kite3dFileType = 'plugin' | 'script' | 'material' | 'image'\n\nexport const typesExts: Partial<Record<Kite3dFileType, string[]>> = {\n 'plugin': ['.plugin.js', '.plugin.ts'],\n 'script': ['.script.js', '.script.ts'],\n 'material': ['.mat', '.mat.json'],\n 'image': ['.png', '.jpeg', '.jpg', '.gif', '.bmp', '.tiff', '.webp', '.hdr', '.exr', '.ktx2', '.svg'],\n // 'texture': ['.png', '.jpeg', '.jpg', '.gif', '.bmp', '.tiff', '.webp', '.tex.json'],\n // 'geometry': ['.glb', '.gltf', '.obj', '.fbx', '.ply', '.stl', '.geom.json'],\n // 'object': ['.glb', '.gltf', '.obj', '.fbx', '.ply', '.stl', '.geom.json'],\n}\nexport const mimeToExt: Record<string, string> = {\n 'image/jpeg': 'jpg',\n 'image/png': 'png',\n 'image/svg+xml': 'svg',\n 'image/webp': 'webp',\n 'image/x-exr': 'exr',\n 'image/x-hdr': 'hdr',\n 'model/gltf+binary': 'glb',\n 'model/gltf+json': 'gltf',\n 'model/gltf': 'gltf',\n}\n\nexport const extensionMimeTypes: Record<string, string> = {\n '.html': 'text/html; charset=utf-8',\n '.css': 'text/css; charset=utf-8',\n '.js': 'text/javascript; charset=utf-8',\n '.mjs': 'text/javascript; charset=utf-8',\n '.ts': 'text/typescript; charset=utf-8',\n '.json': 'application/json; charset=utf-8',\n '.gltf': 'model/gltf+json',\n '.glb': 'model/gltf-binary',\n '.png': 'image/png',\n '.jpg': 'image/jpeg',\n '.jpeg': 'image/jpeg',\n '.gif': 'image/gif',\n '.webp': 'image/webp',\n '.svg': 'image/svg+xml',\n '.wasm': 'application/wasm',\n '.mp3': 'audio/mpeg',\n '.ogg': 'audio/ogg',\n '.wav': 'audio/wav',\n '.mp4': 'video/mp4',\n '.webm': 'video/webm',\n}\n\nexport function mimeTypeForPath(path: string): string {\n const lower = path.toLowerCase()\n const extension = Object.keys(extensionMimeTypes)\n .sort((a, b) => b.length - a.length)\n .find((candidate) => lower.endsWith(candidate))\n return extension ? extensionMimeTypes[extension] : 'application/octet-stream'\n}\n"],"names":["typesExts","mimeToExt","extensionMimeTypes","mimeTypeForPath","path","lower","extension","a","b","candidate"],"mappings":"AAEO,MAAMA,IAAuD;AAAA,EAChE,QAAU,CAAC,cAAc,YAAY;AAAA,EACrC,QAAU,CAAC,cAAc,YAAY;AAAA,EACrC,UAAY,CAAC,QAAQ,WAAW;AAAA,EAChC,OAAS,CAAC,QAAQ,SAAS,QAAQ,QAAQ,QAAQ,SAAS,SAAS,QAAQ,QAAQ,SAAS,MAAM;AAAA;AAAA;AAAA;AAIxG,GACaC,IAAoC;AAAA,EAC7C,cAAc;AAAA,EACd,aAAa;AAAA,EACb,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,mBAAmB;AAAA,EACnB,cAAc;AAClB,GAEaC,IAA6C;AAAA,EACtD,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AACb;AAEO,SAASC,EAAgBC,GAAsB;AAClD,QAAMC,IAAQD,EAAK,YAAA,GACbE,IAAY,OAAO,KAAKJ,CAAkB,EAC3C,KAAK,CAACK,GAAGC,MAAMA,EAAE,SAASD,EAAE,MAAM,EAClC,KAAK,CAACE,MAAcJ,EAAM,SAASI,CAAS,CAAC;AAClD,SAAOH,IAAYJ,EAAmBI,CAAS,IAAI;AACvD;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProjectDependency } from './runtime/projectFormat.ts';
|
|
2
|
+
export declare const RUNTIME_SPECIFIERS: readonly ["threepipe", "three", "uiconfig.js", "ts-browser-helpers", "@kite3d/engine"];
|
|
3
|
+
export interface InstalledPluginImport {
|
|
4
|
+
specifier: string;
|
|
5
|
+
entry: string;
|
|
6
|
+
rootUrl: string;
|
|
7
|
+
}
|
|
8
|
+
/** Create one safe import map for both editor play mode and published games. */
|
|
9
|
+
export declare function dependencyImportMap(dependencies: ProjectDependency[], runtimeUrl?: string, installedPlugins?: InstalledPluginImport[]): {
|
|
10
|
+
imports: Record<string, string>;
|
|
11
|
+
};
|
|
12
|
+
/** Read dependency declarations without exposing package-manager-only specs. */
|
|
13
|
+
export declare function projectDependencies(packageJson: Record<string, unknown>): ProjectDependency[];
|
|
14
|
+
/** Return configured plugin names that are exact project dependency keys. */
|
|
15
|
+
export declare function projectPluginNames(packageJson: Record<string, unknown>): string[];
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const u = [
|
|
2
|
+
"threepipe",
|
|
3
|
+
"three",
|
|
4
|
+
"uiconfig.js",
|
|
5
|
+
"ts-browser-helpers",
|
|
6
|
+
"@kite3d/engine"
|
|
7
|
+
];
|
|
8
|
+
function m(t, i = "./_blitz/runtime.js", r = []) {
|
|
9
|
+
const c = d(t).filter(a), f = r.map(({ specifier: e }) => e).filter((e) => !u.includes(e)), s = [.../* @__PURE__ */ new Set([...u, ...c.map(({ key: e }) => e), ...f])], n = Object.fromEntries(
|
|
10
|
+
u.map((e) => [e, i])
|
|
11
|
+
);
|
|
12
|
+
for (const e of c) {
|
|
13
|
+
const o = e.url || `https://esm.sh/${e.key}@${e.version}`, l = o.includes("?") ? "&" : "?";
|
|
14
|
+
n[e.key] = `${o}${l}external=${s.join(",")}`;
|
|
15
|
+
}
|
|
16
|
+
for (const e of r) {
|
|
17
|
+
if (u.includes(e.specifier)) continue;
|
|
18
|
+
const o = e.rootUrl.endsWith("/") ? e.rootUrl : `${e.rootUrl}/`;
|
|
19
|
+
n[e.specifier] = `${o}${e.entry.replace(/^\.\//, "")}`, n[`${e.specifier}/`] = o;
|
|
20
|
+
}
|
|
21
|
+
return { imports: n };
|
|
22
|
+
}
|
|
23
|
+
function h(t) {
|
|
24
|
+
const i = [], r = t.dependencies;
|
|
25
|
+
if (p(r))
|
|
26
|
+
for (const [s, n] of Object.entries(r))
|
|
27
|
+
typeof n == "string" && i.push({ key: s, version: n });
|
|
28
|
+
const c = t.kite3d, f = p(c) ? c.imports : void 0;
|
|
29
|
+
if (p(f))
|
|
30
|
+
for (const [s, n] of Object.entries(f))
|
|
31
|
+
typeof n == "string" && i.push(n.startsWith("@") ? { key: s, version: n.slice(1) } : { key: s, version: "", url: n });
|
|
32
|
+
return i;
|
|
33
|
+
}
|
|
34
|
+
function k(t) {
|
|
35
|
+
const i = p(t.dependencies) ? t.dependencies : {}, r = p(t.kite3d) ? t.kite3d : {}, f = (Array.isArray(r.plugins) ? r.plugins : []).flatMap((s) => {
|
|
36
|
+
const n = typeof s == "string" ? s.replace(/\(.*\)$/, "").trim() : p(s) && typeof s.import == "string" ? s.import : "", e = Object.keys(i).filter((o) => n === o || n.startsWith(`${o}:`)).sort((o, l) => l.length - o.length);
|
|
37
|
+
return e.length ? [e[0]] : [];
|
|
38
|
+
});
|
|
39
|
+
return [...new Set(f)];
|
|
40
|
+
}
|
|
41
|
+
function d(t) {
|
|
42
|
+
const i = /* @__PURE__ */ new Map();
|
|
43
|
+
for (const r of t)
|
|
44
|
+
i.has(r.key) || i.set(r.key, r);
|
|
45
|
+
return [...i.values()];
|
|
46
|
+
}
|
|
47
|
+
function a(t) {
|
|
48
|
+
return u.includes(t.key) || t.key.startsWith("@kite3d/") ? !1 : !!t.url || y(t.version);
|
|
49
|
+
}
|
|
50
|
+
function y(t) {
|
|
51
|
+
return /^(?:[~^]|[<>]=?)?v?\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?$/.test(t.trim());
|
|
52
|
+
}
|
|
53
|
+
function p(t) {
|
|
54
|
+
return !!t && typeof t == "object" && !Array.isArray(t);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
u as RUNTIME_SPECIFIERS,
|
|
58
|
+
m as dependencyImportMap,
|
|
59
|
+
h as projectDependencies,
|
|
60
|
+
k as projectPluginNames
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=importMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importMap.js","sources":["../src/importMap.ts"],"sourcesContent":["import type {ProjectDependency} from './runtime/projectFormat.ts'\n\nexport const RUNTIME_SPECIFIERS = [\n 'threepipe',\n 'three',\n 'uiconfig.js',\n 'ts-browser-helpers',\n '@kite3d/engine',\n] as const\n\nexport interface InstalledPluginImport {\n specifier: string\n entry: string\n rootUrl: string\n}\n\n/** Create one safe import map for both editor play mode and published games. */\nexport function dependencyImportMap(\n dependencies: ProjectDependency[],\n runtimeUrl = './_blitz/runtime.js',\n installedPlugins: InstalledPluginImport[] = [],\n): {imports: Record<string, string>} {\n const extras = uniqueDependencies(dependencies).filter(isMappableDependency)\n const pluginSpecifiers = installedPlugins\n .map(({specifier}) => specifier)\n .filter((specifier) => !RUNTIME_SPECIFIERS.includes(specifier as typeof RUNTIME_SPECIFIERS[number]))\n const externals = [...new Set([...RUNTIME_SPECIFIERS, ...extras.map(({key}) => key), ...pluginSpecifiers])]\n const imports: Record<string, string> = Object.fromEntries(\n RUNTIME_SPECIFIERS.map((specifier) => [specifier, runtimeUrl]),\n )\n for (const dependency of extras) {\n const baseUrl = dependency.url || `https://esm.sh/${dependency.key}@${dependency.version}`\n const separator = baseUrl.includes('?') ? '&' : '?'\n imports[dependency.key] = `${baseUrl}${separator}external=${externals.join(',')}`\n }\n // Installed plugins map their bare name to the package entry and their trailing-slash name to the package root.\n for (const plugin of installedPlugins) {\n if (RUNTIME_SPECIFIERS.includes(plugin.specifier as typeof RUNTIME_SPECIFIERS[number])) continue\n const rootUrl = plugin.rootUrl.endsWith('/') ? plugin.rootUrl : `${plugin.rootUrl}/`\n imports[plugin.specifier] = `${rootUrl}${plugin.entry.replace(/^\\.\\//, '')}`\n imports[`${plugin.specifier}/`] = rootUrl\n }\n return {imports}\n}\n\n/** Read dependency declarations without exposing package-manager-only specs. */\nexport function projectDependencies(packageJson: Record<string, unknown>): ProjectDependency[] {\n const result: ProjectDependency[] = []\n const dependencies = packageJson.dependencies\n if (isRecord(dependencies)) {\n for (const [key, version] of Object.entries(dependencies)) {\n if (typeof version === 'string') result.push({key, version})\n }\n }\n const kite3d = packageJson.kite3d\n const imports = isRecord(kite3d) ? kite3d.imports : undefined\n if (isRecord(imports)) {\n for (const [key, value] of Object.entries(imports)) {\n if (typeof value !== 'string') continue\n result.push(value.startsWith('@')\n ? {key, version: value.slice(1)}\n : {key, version: '', url: value})\n }\n }\n return result\n}\n\n/** Return configured plugin names that are exact project dependency keys. */\nexport function projectPluginNames(packageJson: Record<string, unknown>): string[] {\n const dependencies = isRecord(packageJson.dependencies) ? packageJson.dependencies : {}\n const kite3d = isRecord(packageJson.kite3d) ? packageJson.kite3d : {}\n const plugins = Array.isArray(kite3d.plugins) ? kite3d.plugins : []\n const names = plugins.flatMap((plugin) => {\n const specifier = typeof plugin === 'string'\n ? plugin.replace(/\\(.*\\)$/, '').trim()\n : isRecord(plugin) && typeof plugin.import === 'string' ? plugin.import : ''\n const matches = Object.keys(dependencies)\n .filter((name) => specifier === name || specifier.startsWith(`${name}:`))\n .sort((left, right) => right.length - left.length)\n return matches.length ? [matches[0]] : []\n })\n return [...new Set(names)]\n}\n\nfunction uniqueDependencies(dependencies: ProjectDependency[]): ProjectDependency[] {\n const byKey = new Map<string, ProjectDependency>()\n for (const dependency of dependencies) {\n if (!byKey.has(dependency.key)) byKey.set(dependency.key, dependency)\n }\n return [...byKey.values()]\n}\n\nfunction isMappableDependency(dependency: ProjectDependency): boolean {\n if (RUNTIME_SPECIFIERS.includes(dependency.key as typeof RUNTIME_SPECIFIERS[number])) return false\n if (dependency.key.startsWith('@kite3d/')) return false\n return Boolean(dependency.url) || isSemverSpec(dependency.version)\n}\n\nfunction isSemverSpec(value: string): boolean {\n return /^(?:[~^]|[<>]=?)?v?\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$/.test(value.trim())\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return Boolean(value) && typeof value === 'object' && !Array.isArray(value)\n}\n"],"names":["RUNTIME_SPECIFIERS","dependencyImportMap","dependencies","runtimeUrl","installedPlugins","extras","uniqueDependencies","isMappableDependency","pluginSpecifiers","specifier","externals","key","imports","dependency","baseUrl","separator","plugin","rootUrl","projectDependencies","packageJson","result","isRecord","version","kite3d","value","projectPluginNames","names","matches","name","left","right","byKey","isSemverSpec"],"mappings":"AAEO,MAAMA,IAAqB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ;AASO,SAASC,EACZC,GACAC,IAAa,uBACbC,IAA4C,CAAA,GACX;AACjC,QAAMC,IAASC,EAAmBJ,CAAY,EAAE,OAAOK,CAAoB,GACrEC,IAAmBJ,EACpB,IAAI,CAAC,EAAC,WAAAK,QAAeA,CAAS,EAC9B,OAAO,CAACA,MAAc,CAACT,EAAmB,SAASS,CAA8C,CAAC,GACjGC,IAAY,CAAC,GAAG,oBAAI,IAAI,CAAC,GAAGV,GAAoB,GAAGK,EAAO,IAAI,CAAC,EAAC,KAAAM,QAASA,CAAG,GAAG,GAAGH,CAAgB,CAAC,CAAC,GACpGI,IAAkC,OAAO;AAAA,IAC3CZ,EAAmB,IAAI,CAACS,MAAc,CAACA,GAAWN,CAAU,CAAC;AA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
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './runtime/index.ts';
|
|
2
|
+
export * from './scripts.ts';
|
|
3
|
+
export * from './importMap.ts';
|
|
4
|
+
export * from './defaults.ts';
|
|
5
|
+
export * from './fileTypes.ts';
|
|
6
|
+
export * from './paths.ts';
|
|
7
|
+
export * from './sceneSerialization.ts';
|
|
8
|
+
export * from './authoring.ts';
|
|
9
|
+
export * from './authoringValidation.ts';
|
|
10
|
+
export * from './plugins/HtmlUiComponent.ts';
|
|
11
|
+
export * from './plugins/GeneratorComponent.ts';
|
|
12
|
+
export * from './plugins/cannon/CannonPhysicsPlugin.ts';
|
|
13
|
+
export * from './plugins/cannon/Cannon3DBodyComponent.ts';
|
|
14
|
+
export * from './plugins/cannon/Cannon3DShapeComponent.ts';
|
|
15
|
+
export * from './plugins/cannon/CannonRagdollComponent.ts';
|