bugfix: only show stats when debug + AnonToDict() for python

This commit is contained in:
Leon van Kammen 2024-02-17 12:02:07 +00:00
parent 7547e9e0e1
commit 5e6ede7682
10 changed files with 1378 additions and 11 deletions

Binary file not shown.

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Fri Feb 16 04:36:12 PM UTC 2024
* v0.5.1 generated at Sat Feb 17 12:00:53 PM UTC 2024
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
@ -1357,7 +1357,6 @@ xrf.init = function(opts){
console.log("add #debug=[0-9] to URL to see XR Fragment debuglog")
xrf.debug = parseInt( ( document.location.hash.match(/debug=([0-9])/) || [0,'0'] )[1] )
}
if( xrf.debug != undefined ) xrf.stats()
xrf.Parser.debug = xrf.debug
xrf.detectCameraRig(opts)
@ -1701,6 +1700,8 @@ xrf.init = ((init) => function(opts){
// return xrfragment lib as 'xrf' query functor (like jquery)
for ( let i in xrf ) xrf.query[i] = xrf[i]
if( xrf.debug ) xrf.stats()
return xrf.query
})(xrf.init)

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Fri Feb 16 04:36:12 PM UTC 2024
* v0.5.1 generated at Sat Feb 17 12:00:53 PM UTC 2024
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
@ -1355,7 +1355,6 @@ xrf.init = function(opts){
console.log("add #debug=[0-9] to URL to see XR Fragment debuglog")
xrf.debug = parseInt( ( document.location.hash.match(/debug=([0-9])/) || [0,'0'] )[1] )
}
if( xrf.debug != undefined ) xrf.stats()
xrf.Parser.debug = xrf.debug
xrf.detectCameraRig(opts)
@ -1699,6 +1698,8 @@ xrf.init = ((init) => function(opts){
// return xrfragment lib as 'xrf' query functor (like jquery)
for ( let i in xrf ) xrf.query[i] = xrf[i]
if( xrf.debug ) xrf.stats()
return xrf.query
})(xrf.init)

File diff suppressed because it is too large Load Diff

21
dist/xrfragment.py vendored
View File

@ -1767,6 +1767,20 @@ class python_HaxeIterator:
python_HaxeIterator._hx_class = python_HaxeIterator
class python_Lib:
_hx_class_name = "python.Lib"
__slots__ = ()
_hx_statics = ["anonToDict"]
@staticmethod
def anonToDict(o):
if isinstance(o,_hx_AnonObject):
return o.__dict__.copy()
else:
return None
python_Lib._hx_class = python_Lib
class python_internal_ArrayImpl:
_hx_class_name = "python.internal.ArrayImpl"
__slots__ = ()
@ -2351,7 +2365,7 @@ class xrfragment_XRF:
__slots__ = ("fragment", "flags", "index", "x", "y", "z", "shift", "floats", "color", "string", "int", "float", "filter", "reset", "loop", "xrfScheme")
_hx_fields = ["fragment", "flags", "index", "x", "y", "z", "shift", "floats", "color", "string", "int", "float", "filter", "reset", "loop", "xrfScheme"]
_hx_methods = ["is", "validate", "guessType"]
_hx_statics = ["IMMUTABLE", "PROP_BIND", "QUERY_OPERATOR", "PROMPT", "CUSTOMFRAG", "NAVIGATOR", "METADATA", "PV_OVERRIDE", "PV_EXECUTE", "T_COLOR", "T_INT", "T_FLOAT", "T_VECTOR2", "T_VECTOR3", "T_URL", "T_PREDEFINED_VIEW", "T_STRING", "T_MEDIAFRAG", "T_DYNAMICKEY", "T_DYNAMICKEYVALUE", "isColor", "isInt", "isFloat", "isVector", "isUrl", "isUrlOrPretypedView", "isString", "operators", "isProp", "isExclude", "isDeep", "isNumber", "isMediaFrag", "isReset", "isShift", "isXRFScheme", "set", "unset"]
_hx_statics = ["__meta__", "IMMUTABLE", "PROP_BIND", "QUERY_OPERATOR", "PROMPT", "CUSTOMFRAG", "NAVIGATOR", "METADATA", "PV_OVERRIDE", "PV_EXECUTE", "T_COLOR", "T_INT", "T_FLOAT", "T_VECTOR2", "T_VECTOR3", "T_URL", "T_PREDEFINED_VIEW", "T_STRING", "T_MEDIAFRAG", "T_DYNAMICKEY", "T_DYNAMICKEYVALUE", "isColor", "isInt", "isFloat", "isVector", "isUrl", "isUrlOrPretypedView", "isString", "operators", "isProp", "isExclude", "isDeep", "isNumber", "isMediaFrag", "isReset", "isShift", "isXRFScheme", "set", "unset", "toDict"]
def __init__(self,_fragment,_flags,_index = None):
self.xrfScheme = None
@ -2452,6 +2466,10 @@ class xrfragment_XRF:
def unset(flag,flags):
return (flags & ~flag)
@staticmethod
def toDict(o):
return python_Lib.anonToDict(o)
xrfragment_XRF._hx_class = xrfragment_XRF
Math.NEGATIVE_INFINITY = float("-inf")
@ -2471,6 +2489,7 @@ python_Boot.prefixLength = len("_hx_")
xrfragment_Parser.error = ""
xrfragment_Parser.debug = False
xrfragment_URI.__meta__ = _hx_AnonObject({'statics': _hx_AnonObject({'template': _hx_AnonObject({'keep': None})})})
xrfragment_XRF.__meta__ = _hx_AnonObject({'statics': _hx_AnonObject({'toDict': _hx_AnonObject({'keep': None})})})
xrfragment_XRF.IMMUTABLE = 1
xrfragment_XRF.PROP_BIND = 2
xrfragment_XRF.QUERY_OPERATOR = 4

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Fri Feb 16 04:36:12 PM UTC 2024
* v0.5.1 generated at Sat Feb 17 12:00:53 PM UTC 2024
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
@ -1355,7 +1355,6 @@ xrf.init = function(opts){
console.log("add #debug=[0-9] to URL to see XR Fragment debuglog")
xrf.debug = parseInt( ( document.location.hash.match(/debug=([0-9])/) || [0,'0'] )[1] )
}
if( xrf.debug != undefined ) xrf.stats()
xrf.Parser.debug = xrf.debug
xrf.detectCameraRig(opts)
@ -1699,6 +1698,8 @@ xrf.init = ((init) => function(opts){
// return xrfragment lib as 'xrf' query functor (like jquery)
for ( let i in xrf ) xrf.query[i] = xrf[i]
if( xrf.debug ) xrf.stats()
return xrf.query
})(xrf.init)

View File

@ -1,5 +1,5 @@
/*
* v0.5.1 generated at Fri Feb 16 04:36:12 PM UTC 2024
* v0.5.1 generated at Sat Feb 17 12:00:53 PM UTC 2024
* https://xrfragment.org
* SPDX-License-Identifier: MPL-2.0
*/
@ -1355,7 +1355,6 @@ xrf.init = function(opts){
console.log("add #debug=[0-9] to URL to see XR Fragment debuglog")
xrf.debug = parseInt( ( document.location.hash.match(/debug=([0-9])/) || [0,'0'] )[1] )
}
if( xrf.debug != undefined ) xrf.stats()
xrf.Parser.debug = xrf.debug
xrf.detectCameraRig(opts)
@ -1699,6 +1698,8 @@ xrf.init = ((init) => function(opts){
// return xrfragment lib as 'xrf' query functor (like jquery)
for ( let i in xrf ) xrf.query[i] = xrf[i]
if( xrf.debug ) xrf.stats()
return xrf.query
})(xrf.init)

View File

@ -11,7 +11,6 @@ xrf.init = function(opts){
console.log("add #debug=[0-9] to URL to see XR Fragment debuglog")
xrf.debug = parseInt( ( document.location.hash.match(/debug=([0-9])/) || [0,'0'] )[1] )
}
if( xrf.debug != undefined ) xrf.stats()
xrf.Parser.debug = xrf.debug
xrf.detectCameraRig(opts)

View File

@ -14,6 +14,8 @@ xrf.init = ((init) => function(opts){
// return xrfragment lib as 'xrf' query functor (like jquery)
for ( let i in xrf ) xrf.query[i] = xrf[i]
if( xrf.debug ) xrf.stats()
return xrf.query
})(xrf.init)

View File

@ -141,4 +141,11 @@ class XRF {
}else v.filter = new Filter(v.fragment);
}
#if python
@keep
public static function toDict(o:{}){
return python.Lib.anonToDict(o);
}
#end
}