@Deltakosh : by sharing a link to my build, here we are with @Joe_Kerr being able to test it, in āreal conditionā totaly out of any dev infrastructure or context. Do you run such tests at BJS ?
Thatās a good way to be able to avoid the āIt worked on my machineā issue at release push. Maybe it could be an idea, to setup some kind of ātestā CDN where final builds are sent online, for real, in order to be able to trigger an actual āonline testā. It could even be added to the automatic CI/CD. For example a VM or even an actual machine, free of any dev infra, connecting to the test CDN, and running a test, etcā¦
What do you think ?
(By the way, I have a lot of other ideas, but if I put them down, Iāll SPAM the Feature Request Category )
@Deltakosh , @sebavan , Thank you for your kind comments about this PR and its new features
Is there a way I can run a test āat homeā, under the same āconstraintsā than the CI/CD run on Azure DevOps from the official repo ?
Iām asking because, on my machine I had no error on runing the build :
npm run build:dev
npm run build:umd
While the CI/CD gave error such as format, linting, etc⦠(For example I missed some let instead of const on variables which was not modifiedā¦) How can I test myself, instead of pushing a new commit, and waiting for the CI/CD to give me a go ?
Also, there is one last error (from the Linting error on Azure DevOps) I donāt know how to solve, if you can help : error import/no-internal-modules: Reaching to "core/index" is not allowed.
I was trying to reach the main BABYLON namespace in order to find the Class Name of the considered target, among BABYLON Classes, but maybe itās not the way to go. Itās in relation with the first point I was mentioning in the PRās first comment. Any idea about the right way to go ?
To get all the classes it is a bi trickier as we are using modules import in the inspector so there is no Babylon namespace perse (to help with treeshaking)
Ouuhhhw, sweet ! Thatās exactly what I was thinking about : Registering all class names in a dict
The existing function is for going from Name to Class only, but I just added a new one, for going the opposite way, from Class to Name :
/**
* @internal
*/
export function GetClassName(obj: any): string {
for (const key in _RegisteredTypes) {
if (obj instanceof (_RegisteredTypes[key] as any)) {
return key;
}
}
return "Unknown";
}
Built, and tested, it works
Example by clicking on mesh scale : BABYLON.AbstractMesh.scaling = new BABYLON.Vector3(1, 1, -1);
That said, it appears some classes are not registered, such as AbstractScene : Unknown.clearColor = new BABYLON.Color3(0, 0, 0);//(HEX : #000000)
Or as well the ImageProcessingConfiguration : Unknown.contrast = 1;
Iāll have a look at where the classes are registered, in order to try to add them
If I can manage so, Iāll be so happy that a neater solution had been found
Okay, so, I think we are reaching some milestone here :
import * as BABYLON from "core/index"; is not allowed : Solved using new function GetClassName along with registered classes from the core/Misc/typeStore implementation
AbstractXXX : Solved
Missing some Classes : Solved by registering names for Sound, MaterialPluginBase, BaseParticleSyste, ArcRotateCamera, FlyCamera, FollowCamera, ArcFollowCamera, FreeCamer, HemisphericLight, DirectionalLight, PointLight, SpotLight
Issue with copy buttons on particles (component floatLine which is used by component sliderLine was inducing a double copy button) : Solved by tweeking the inspector/components/actionTabs/actionTabs.scss, with a display:none inside the class floatLine when child of sliderLine