aotrautils 0.0.1840 → 0.0.1842
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.
- aotrautils/aotrautils.build.js +35 -10
- aotrautils/package.json +1 -1
aotrautils/aotrautils.build.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (
|
|
3
|
+
/*utils COMMONS library associated with aotra version : «1_29072022-2359 (09/04/2026-01:57:45)»*/
|
|
4
4
|
/*-----------------------------------------------------------------------------*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -4117,13 +4117,37 @@ window.instanciate=function(className=null){
|
|
|
4117
4117
|
if(className==="Array") return [];
|
|
4118
4118
|
|
|
4119
4119
|
|
|
4120
|
-
|
|
4121
|
-
if(
|
|
4120
|
+
let classInWindow=globalThis[className];
|
|
4121
|
+
if(typeof(classInWindow)=="undefined"){
|
|
4122
4122
|
// TRACE
|
|
4123
|
-
lognow(`WARN : CAUTION : «${className}» class does not seem to be registered in the
|
|
4123
|
+
lognow(`WARN : CAUTION : «${className}» class does not seem to be registered in the globalThis object. This can lead to problems instanciating it in a pure nodejs context.`);
|
|
4124
|
+
classInWindow=window[className];
|
|
4125
|
+
if(typeof(classInWindow)=="undefined"){
|
|
4126
|
+
// TRACE
|
|
4127
|
+
lognow(`WARN : CAUTION : «${className}» class does not seem to be registered in the window object. This can lead to problems instanciating it in a pure nodejs context.`);
|
|
4128
|
+
if(typeof(global)!="undefined"){
|
|
4129
|
+
lognow(`WARN : Trying with global object...`);
|
|
4130
|
+
classInWindow=global[className];
|
|
4131
|
+
if(!classInWindow){
|
|
4132
|
+
// TRACE
|
|
4133
|
+
lognow(`ERROR : CAUTION : «${className}» class does not seem to be registered in the global object. Cannot instanciate it.`);
|
|
4134
|
+
|
|
4135
|
+
// TODO : FIXME : I don't like that at all, to use eval(...), but on today I know of no other solution... :
|
|
4136
|
+
newObj=eval("new "+className+"();");
|
|
4137
|
+
|
|
4138
|
+
}
|
|
4139
|
+
}else{
|
|
4140
|
+
// TRACE
|
|
4141
|
+
lognow(`ERROR : CAUTION : «${className}» class does not seem to be accessible in the globalThis nor window object, and global object does not exist. Cannot instanciate it.`);
|
|
4142
|
+
|
|
4143
|
+
// TODO : FIXME : I don't like that at all, to use eval(...), but on today I know of no other solution... :
|
|
4144
|
+
newObj=eval("new "+className+"();");
|
|
4145
|
+
|
|
4146
|
+
}
|
|
4147
|
+
return newObj;
|
|
4148
|
+
}
|
|
4124
4149
|
}
|
|
4125
4150
|
|
|
4126
|
-
|
|
4127
4151
|
// OLD :
|
|
4128
4152
|
// try{
|
|
4129
4153
|
// try{
|
|
@@ -4162,6 +4186,7 @@ window.instanciate=function(className=null){
|
|
|
4162
4186
|
// }
|
|
4163
4187
|
// }
|
|
4164
4188
|
|
|
4189
|
+
// NEW :
|
|
4165
4190
|
newObj=new classInWindow();
|
|
4166
4191
|
return newObj;
|
|
4167
4192
|
};
|
|
@@ -5384,7 +5409,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
|
|
|
5384
5409
|
|
|
5385
5410
|
|
|
5386
5411
|
|
|
5387
|
-
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (
|
|
5412
|
+
/*utils CLIENT library associated with aotra version : «1_29072022-2359 (09/04/2026-01:57:45)»*/
|
|
5388
5413
|
/*-----------------------------------------------------------------------------*/
|
|
5389
5414
|
/* ## Utility global methods in a browser (htmljs) client environment.
|
|
5390
5415
|
*
|
|
@@ -13210,7 +13235,7 @@ createOritaMicroClient=function(url, port, isNode=false, staticMicroClientIdPara
|
|
|
13210
13235
|
|
|
13211
13236
|
|
|
13212
13237
|
|
|
13213
|
-
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (
|
|
13238
|
+
/*utils GEOMETRY library associated with aotra version : «1_29072022-2359 (09/04/2026-01:57:45)»*/
|
|
13214
13239
|
/*-----------------------------------------------------------------------------*/
|
|
13215
13240
|
|
|
13216
13241
|
|
|
@@ -14539,10 +14564,10 @@ function rayVsUnitSphereClosestPoint(p, r) {
|
|
|
14539
14564
|
// MUST REMAIN AT THE END OF THIS LIBRARY FILE !
|
|
14540
14565
|
|
|
14541
14566
|
AOTRAUTILS_GEOMETRY_LIB_IS_LOADED=true;
|
|
14542
|
-
/*utils 3D library associated with aotra version : «1_29072022-2359 (
|
|
14567
|
+
/*utils 3D library associated with aotra version : «1_29072022-2359 (09/04/2026-01:57:45)»*/
|
|
14543
14568
|
/*-----------------------------------------------------------------------------*/
|
|
14544
14569
|
|
|
14545
|
-
/*utils AI library associated with aotra version : «1_29072022-2359 (
|
|
14570
|
+
/*utils AI library associated with aotra version : «1_29072022-2359 (09/04/2026-01:57:45)»*/
|
|
14546
14571
|
/*-----------------------------------------------------------------------------*/
|
|
14547
14572
|
|
|
14548
14573
|
|
|
@@ -14688,7 +14713,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
|
|
|
14688
14713
|
|
|
14689
14714
|
|
|
14690
14715
|
|
|
14691
|
-
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (
|
|
14716
|
+
/*utils CONSOLE library associated with aotra version : «1_29072022-2359 (09/04/2026-01:57:45)»*/
|
|
14692
14717
|
/*-----------------------------------------------------------------------------*/
|
|
14693
14718
|
|
|
14694
14719
|
|
aotrautils/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aotrautils",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1842",
|
|
4
4
|
"main": "aotrautils.build.js",
|
|
5
5
|
"description": "A library for vanilla javascript utils (client-side) used in aotra javascript CMS",
|
|
6
6
|
"author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",
|