Skip to content

Commit

Permalink
Revert "Adding new debug tools to the scene Inspector : copyCommandTo…
Browse files Browse the repository at this point in the history
…Clipboard & window.debugNode" (#15065)
  • Loading branch information
deltakosh committed May 3, 2024
1 parent a802ac9 commit bbc0571
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 350 deletions.
4 changes: 0 additions & 4 deletions packages/dev/core/src/Audio/sound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import type { ISoundOptions } from "./Interfaces/ISoundOptions";
import { EngineStore } from "../Engines/engineStore";
import type { IAudioEngine } from "./Interfaces/IAudioEngine";
import type { Observer } from "../Misc/observable";
import { RegisterClass } from "../Misc/typeStore";

/**
* Defines a sound that can be played in the application.
Expand Down Expand Up @@ -1307,6 +1306,3 @@ export class Sound {
}
}
}

// Register Class Name
RegisterClass("BABYLON.Sound", Sound);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Cameras/arcRotateCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import type { ArcRotateCameraMouseWheelInput } from "../Cameras/Inputs/arcRotate
import { ArcRotateCameraInputsManager } from "../Cameras/arcRotateCameraInputsManager";
import { Epsilon } from "../Maths/math.constants";
import { Tools } from "../Misc/tools";
import { RegisterClass } from "../Misc/typeStore";

import type { Collider } from "../Collisions/collider";
import type { TransformNode } from "core/Meshes/transformNode";
Expand Down Expand Up @@ -1361,6 +1360,3 @@ export class ArcRotateCamera extends TargetCamera {
return "ArcRotateCamera";
}
}

// Register Class Name
RegisterClass("BABYLON.ArcRotateCamera", ArcRotateCamera);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Cameras/flyCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { FlyCameraInputsManager } from "./flyCameraInputsManager";
import type { FlyCameraMouseInput } from "../Cameras/Inputs/flyCameraMouseInput";
import type { FlyCameraKeyboardInput } from "../Cameras/Inputs/flyCameraKeyboardInput";
import { Tools } from "../Misc/tools";
import { RegisterClass } from "../Misc/typeStore";

import type { Collider } from "../Collisions/collider";

Expand Down Expand Up @@ -452,6 +451,3 @@ export class FlyCamera extends TargetCamera {
return "FlyCamera";
}
}

// Register Class Name
RegisterClass("BABYLON.FlyCamera", FlyCamera);
6 changes: 0 additions & 6 deletions packages/dev/core/src/Cameras/followCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import { TmpVectors, Vector3 } from "../Maths/math.vector";
import { Node } from "../node";
import type { AbstractMesh } from "../Meshes/abstractMesh";
import { FollowCameraInputsManager } from "./followCameraInputsManager";
import { RegisterClass } from "../Misc/typeStore";

Node.AddNodeConstructor("FollowCamera", (name, scene) => {
return () => new FollowCamera(name, Vector3.Zero(), scene);
});
Expand Down Expand Up @@ -309,7 +307,3 @@ export class ArcFollowCamera extends TargetCamera {
return "ArcFollowCamera";
}
}

// Register Class Name
RegisterClass("BABYLON.FollowCamera", FollowCamera);
RegisterClass("BABYLON.ArcFollowCamera", ArcFollowCamera);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Cameras/freeCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { FreeCameraInputsManager } from "./freeCameraInputsManager";
import type { FreeCameraMouseInput } from "../Cameras/Inputs/freeCameraMouseInput";
import type { FreeCameraKeyboardMoveInput } from "../Cameras/Inputs/freeCameraKeyboardMoveInput";
import { Tools } from "../Misc/tools";
import { RegisterClass } from "../Misc/typeStore";

import type { Collider } from "../Collisions/collider";

Expand Down Expand Up @@ -455,6 +454,3 @@ export class FreeCamera extends TargetCamera {
return "FreeCamera";
}
}

// Register Class Name
RegisterClass("BABYLON.FreeCamera", FreeCamera);
5 changes: 0 additions & 5 deletions packages/dev/core/src/Lights/directionalLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import type { AbstractMesh } from "../Meshes/abstractMesh";
import { Light } from "./light";
import { ShadowLight } from "./shadowLight";
import type { Effect } from "../Materials/effect";
import { RegisterClass } from "../Misc/typeStore";

Node.AddNodeConstructor("Light_Type_1", (name, scene) => {
return () => new DirectionalLight(name, Vector3.Zero(), scene);
});
Expand Down Expand Up @@ -354,6 +352,3 @@ export class DirectionalLight extends ShadowLight {
defines["DIRLIGHT" + lightIndex] = true;
}
}

// Register Class Name
RegisterClass("BABYLON.DirectionalLight", DirectionalLight);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Lights/hemisphericLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Node } from "../node";
import type { Effect } from "../Materials/effect";
import { Light } from "./light";
import type { IShadowGenerator } from "./Shadows/shadowGenerator";
import { RegisterClass } from "../Misc/typeStore";

Node.AddNodeConstructor("Light_Type_3", (name, scene) => {
return () => new HemisphericLight(name, Vector3.Zero(), scene);
Expand Down Expand Up @@ -129,6 +128,3 @@ export class HemisphericLight extends Light {
defines["HEMILIGHT" + lightIndex] = true;
}
}

// Register Class Name
RegisterClass("BABYLON.HemisphericLight", HemisphericLight);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Lights/pointLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type { AbstractMesh } from "../Meshes/abstractMesh";
import { Light } from "./light";
import { ShadowLight } from "./shadowLight";
import type { Effect } from "../Materials/effect";
import { RegisterClass } from "../Misc/typeStore";

Node.AddNodeConstructor("Light_Type_0", (name, scene) => {
return () => new PointLight(name, Vector3.Zero(), scene);
Expand Down Expand Up @@ -216,6 +215,3 @@ export class PointLight extends ShadowLight {
defines["POINTLIGHT" + lightIndex] = true;
}
}

// Register Class Name
RegisterClass("BABYLON.PointLight", PointLight);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Lights/spotLight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { ShadowLight } from "./shadowLight";
import { Texture } from "../Materials/Textures/texture";
import type { ProceduralTexture } from "../Materials/Textures/Procedurals/proceduralTexture";
import type { Camera } from "../Cameras/camera";
import { RegisterClass } from "../Misc/typeStore";

Node.AddNodeConstructor("Light_Type_2", (name, scene) => {
return () => new SpotLight(name, Vector3.Zero(), Vector3.Zero(), 0, 0, scene);
Expand Down Expand Up @@ -475,6 +474,3 @@ export class SpotLight extends ShadowLight {
defines["PROJECTEDLIGHTTEXTURE" + lightIndex] = this.projectionTexture && this.projectionTexture.isReady() ? true : false;
}
}

// Register Class Name
RegisterClass("BABYLON.SpotLight", SpotLight);
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { Mix } from "../Misc/tools.functions";
import { SerializationHelper } from "../Misc/decorators.serialization";
import type { IImageProcessingConfigurationDefines } from "./imageProcessingConfiguration.defines";
import { PrepareSamplersForImageProcessing, PrepareUniformsForImageProcessing } from "./imageProcessingConfiguration.functions";
import { RegisterClass } from "../Misc/typeStore";

/**
* This groups together the common properties used for image processing either in direct forward pass
Expand Down Expand Up @@ -644,6 +643,3 @@ export class ImageProcessingConfiguration {

// References the dependencies.
SerializationHelper._ImageProcessingConfigurationParser = ImageProcessingConfiguration.Parse;

// Register Class Name
RegisterClass("BABYLON.ImageProcessingConfiguration", ImageProcessingConfiguration);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Materials/materialPluginBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import type { Material } from "./material";
import type { BaseTexture } from "./Textures/baseTexture";
import type { RenderTargetTexture } from "./Textures/renderTargetTexture";
import { SerializationHelper } from "../Misc/decorators.serialization";
import { RegisterClass } from "../Misc/typeStore";

/**
* Base class for material plugins.
Expand Down Expand Up @@ -306,6 +305,3 @@ export class MaterialPluginBase {
SerializationHelper.Parse(() => this, source, scene, rootUrl);
}
}

// Register Class Name
RegisterClass("BABYLON.MaterialPluginBase", MaterialPluginBase);
4 changes: 0 additions & 4 deletions packages/dev/core/src/Meshes/instancedMesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type { Light } from "../Lights/light";
import { VertexBuffer } from "../Buffers/buffer";
import { Tools } from "../Misc/tools";
import type { ThinEngine } from "../Engines/thinEngine";
import { RegisterClass } from "../Misc/typeStore";

Mesh._instancedMeshFactory = (name: string, mesh: Mesh): InstancedMesh => {
const instance = new InstancedMesh(name, mesh);
Expand Down Expand Up @@ -816,6 +815,3 @@ Mesh.prototype._disposeInstanceSpecificData = function () {

this.instancedBuffers = {};
};

// Register Class Name
RegisterClass("BABYLON.InstancedMesh", InstancedMesh);
12 changes: 0 additions & 12 deletions packages/dev/core/src/Misc/typeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,3 @@ export function RegisterClass(className: string, type: Object) {
export function GetClass(fqdn: string): any {
return _RegisteredTypes[fqdn];
}

/**
* @internal
*/
export function GetClassName(obj: any): string {
for (const key in _RegisteredTypes) {
if (obj instanceof (_RegisteredTypes[key] as any) && !key.includes("Abstract")) {
return key;
}
}
return "Unknown";
}
4 changes: 0 additions & 4 deletions packages/dev/core/src/Particles/baseParticleSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import type { HemisphericParticleEmitter } from "./EmitterTypes/hemisphericParti
import type { SphereDirectedParticleEmitter, SphereParticleEmitter } from "./EmitterTypes/sphereParticleEmitter";
import type { CylinderDirectedParticleEmitter, CylinderParticleEmitter } from "./EmitterTypes/cylinderParticleEmitter";
import type { ConeParticleEmitter } from "./EmitterTypes/coneParticleEmitter";
import { RegisterClass } from "../Misc/typeStore";

/**
* This represents the base class for particle system in Babylon.
Expand Down Expand Up @@ -825,6 +824,3 @@ export class BaseParticleSystem implements IClipPlanesHolder {
throw new Error("Method not implemented.");
}
}

// Register Class Name
RegisterClass("BABYLON.BaseParticleSystem", BaseParticleSystem);
4 changes: 0 additions & 4 deletions packages/dev/core/src/abstractScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import type { Light } from "./Lights/light";
import type { Node } from "./node";
import type { PostProcess } from "./PostProcesses/postProcess";
import type { Animation } from "./Animations/animation";
import { RegisterClass } from "./Misc/typeStore";

/**
* Defines how the parser contract is defined.
Expand Down Expand Up @@ -229,6 +228,3 @@ export abstract class AbstractScene {
return nodes;
}
}

// Register Class Name
RegisterClass("BABYLON.AbstractScene", AbstractScene);
4 changes: 0 additions & 4 deletions packages/dev/core/src/scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ import type { Texture } from "./Materials/Textures/texture";
import { PointerPickingConfiguration } from "./Inputs/pointerPickingConfiguration";
import { Logger } from "./Misc/logger";
import type { AbstractEngine } from "./Engines/abstractEngine";
import { RegisterClass } from "./Misc/typeStore";

/**
* Define an interface for all classes that will hold resources
Expand Down Expand Up @@ -5756,6 +5755,3 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
return this.getLastSkeletonById(id);
}
}

// Register Class Name
RegisterClass("BABYLON.Scene", Scene);
Loading

0 comments on commit bbc0571

Please sign in to comment.