|
@@ -13,6 +13,8 @@ interface IRenderingComponentProps {
|
|
globalState: GlobalState;
|
|
globalState: GlobalState;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+declare const Ammo: any;
|
|
|
|
+
|
|
export class RenderingComponent extends React.Component<IRenderingComponentProps> {
|
|
export class RenderingComponent extends React.Component<IRenderingComponentProps> {
|
|
private _engine: Nullable<Engine>;
|
|
private _engine: Nullable<Engine>;
|
|
private _scene: Nullable<Scene>;
|
|
private _scene: Nullable<Scene>;
|
|
@@ -156,6 +158,11 @@ export class RenderingComponent extends React.Component<IRenderingComponentProps
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // Check for Ammo.js
|
|
|
|
+ if (code.indexOf("AmmoJSPlugin") > -1 && typeof Ammo === "function") {
|
|
|
|
+ await Ammo();
|
|
|
|
+ }
|
|
|
|
+
|
|
// Check for Unity Toolkit
|
|
// Check for Unity Toolkit
|
|
if ((location.href.indexOf("UnityToolkit") !== -1 || Utilities.ReadBoolFromStore("unity-toolkit", false)) && !this._unityToolkitWasLoaded) {
|
|
if ((location.href.indexOf("UnityToolkit") !== -1 || Utilities.ReadBoolFromStore("unity-toolkit", false)) && !this._unityToolkitWasLoaded) {
|
|
await this._loadScriptAsync("/libs/babylon.manager.js");
|
|
await this._loadScriptAsync("/libs/babylon.manager.js");
|