renamed BROWSER_OVERRIDE => NAVIGATOR, EMBED_OVERRIDE => EMBEDDED
This commit is contained in:
parent
b3e9736db1
commit
056ee123db
|
@ -220,27 +220,27 @@ xrfragment_Parser.parse = function(key,value,resultMap) {
|
||||||
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
||||||
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE | xrfragment_XRF.PROMPT;
|
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED | xrfragment_XRF.PROMPT;
|
||||||
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
||||||
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.BROWSER_OVERRIDE);
|
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
||||||
|
@ -570,8 +570,8 @@ xrfragment_XRF.PROP_BIND = 2;
|
||||||
xrfragment_XRF.QUERY_OPERATOR = 4;
|
xrfragment_XRF.QUERY_OPERATOR = 4;
|
||||||
xrfragment_XRF.PROMPT = 8;
|
xrfragment_XRF.PROMPT = 8;
|
||||||
xrfragment_XRF.ROUNDROBIN = 16;
|
xrfragment_XRF.ROUNDROBIN = 16;
|
||||||
xrfragment_XRF.BROWSER_OVERRIDE = 32;
|
xrfragment_XRF.NAVIGATOR = 32;
|
||||||
xrfragment_XRF.EMBED_OVERRIDE = 64;
|
xrfragment_XRF.EMBEDDED = 64;
|
||||||
xrfragment_XRF.PV_OVERRIDE = 128;
|
xrfragment_XRF.PV_OVERRIDE = 128;
|
||||||
xrfragment_XRF.PV_EXECUTE = 256;
|
xrfragment_XRF.PV_EXECUTE = 256;
|
||||||
xrfragment_XRF.T_COLOR = 8192;
|
xrfragment_XRF.T_COLOR = 8192;
|
||||||
|
|
|
@ -1432,7 +1432,7 @@ __xrfragment_Parser.parse = function(key,value,resultMap)
|
||||||
else
|
else
|
||||||
Frag_h.src = value1;
|
Frag_h.src = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.PV_OVERRIDE,__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.T_STRING_OBJ),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.PV_OVERRIDE,__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.T_STRING_OBJ),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.pos = __haxe_ds_StringMap.tnull;
|
Frag_h.pos = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
|
@ -1444,73 +1444,73 @@ __xrfragment_Parser.parse = function(key,value,resultMap)
|
||||||
else
|
else
|
||||||
Frag_h.href = value1;
|
Frag_h.href = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.PV_OVERRIDE,__xrfragment_XRF.T_STRING),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.PV_OVERRIDE,__xrfragment_XRF.T_STRING),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.q = __haxe_ds_StringMap.tnull;
|
Frag_h.q = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.q = value1;
|
Frag_h.q = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.scale = __haxe_ds_StringMap.tnull;
|
Frag_h.scale = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.scale = value1;
|
Frag_h.scale = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.rot = __haxe_ds_StringMap.tnull;
|
Frag_h.rot = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.rot = value1;
|
Frag_h.rot = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.translate = __haxe_ds_StringMap.tnull;
|
Frag_h.translate = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.translate = value1;
|
Frag_h.translate = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_INT),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.QUERY_OPERATOR,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_INT),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.visible = __haxe_ds_StringMap.tnull;
|
Frag_h.visible = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.visible = value1;
|
Frag_h.visible = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_STRING),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_STRING),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.env = __haxe_ds_StringMap.tnull;
|
Frag_h.env = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.env = value1;
|
Frag_h.env = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR2),__xrfragment_XRF.BROWSER_OVERRIDE),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.ROUNDROBIN),__xrfragment_XRF.T_VECTOR2),__xrfragment_XRF.NAVIGATOR),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.t = __haxe_ds_StringMap.tnull;
|
Frag_h.t = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.t = value1;
|
Frag_h.t = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.gravity = __haxe_ds_StringMap.tnull;
|
Frag_h.gravity = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.gravity = value1;
|
Frag_h.gravity = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_VECTOR3),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.physics = __haxe_ds_StringMap.tnull;
|
Frag_h.physics = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.physics = value1;
|
Frag_h.physics = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_INT),__xrfragment_XRF.BROWSER_OVERRIDE),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_INT),__xrfragment_XRF.NAVIGATOR),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.fov = __haxe_ds_StringMap.tnull;
|
Frag_h.fov = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.fov = value1;
|
Frag_h.fov = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_VECTOR2),__xrfragment_XRF.BROWSER_OVERRIDE),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_VECTOR2),__xrfragment_XRF.NAVIGATOR),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.clip = __haxe_ds_StringMap.tnull;
|
Frag_h.clip = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.clip = value1;
|
Frag_h.clip = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_STRING),__xrfragment_XRF.BROWSER_OVERRIDE),__xrfragment_XRF.EMBED_OVERRIDE);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.T_STRING),__xrfragment_XRF.NAVIGATOR),__xrfragment_XRF.EMBEDDED);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.fog = __haxe_ds_StringMap.tnull;
|
Frag_h.fog = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
|
@ -1540,14 +1540,14 @@ __xrfragment_Parser.parse = function(key,value,resultMap)
|
||||||
else
|
else
|
||||||
Frag_h.description = value1;
|
Frag_h.description = value1;
|
||||||
end;
|
end;
|
||||||
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.T_URL),__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.BROWSER_OVERRIDE),__xrfragment_XRF.EMBED_OVERRIDE),__xrfragment_XRF.PROMPT);
|
local value1 = _hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(_hx_bit.bor(__xrfragment_XRF.ASSET,__xrfragment_XRF.T_URL),__xrfragment_XRF.PV_OVERRIDE),__xrfragment_XRF.NAVIGATOR),__xrfragment_XRF.EMBEDDED),__xrfragment_XRF.PROMPT);
|
||||||
if (value1 == nil) then
|
if (value1 == nil) then
|
||||||
Frag_h.session = __haxe_ds_StringMap.tnull;
|
Frag_h.session = __haxe_ds_StringMap.tnull;
|
||||||
else
|
else
|
||||||
Frag_h.session = value1;
|
Frag_h.session = value1;
|
||||||
end;
|
end;
|
||||||
if ((__lua_lib_luautf8_Utf8.len(value) == 0) and (Frag_h[key] == nil)) then
|
if ((__lua_lib_luautf8_Utf8.len(value) == 0) and (Frag_h[key] == nil)) then
|
||||||
local value = __xrfragment_XRF.new(key, _hx_bit.bor(__xrfragment_XRF.PV_EXECUTE,__xrfragment_XRF.BROWSER_OVERRIDE));
|
local value = __xrfragment_XRF.new(key, _hx_bit.bor(__xrfragment_XRF.PV_EXECUTE,__xrfragment_XRF.NAVIGATOR));
|
||||||
resultMap[key] = value;
|
resultMap[key] = value;
|
||||||
do return true end;
|
do return true end;
|
||||||
end;
|
end;
|
||||||
|
@ -2381,9 +2381,9 @@ local _hx_static_init = function()
|
||||||
|
|
||||||
__xrfragment_XRF.ROUNDROBIN = 16;
|
__xrfragment_XRF.ROUNDROBIN = 16;
|
||||||
|
|
||||||
__xrfragment_XRF.BROWSER_OVERRIDE = 32;
|
__xrfragment_XRF.NAVIGATOR = 32;
|
||||||
|
|
||||||
__xrfragment_XRF.EMBED_OVERRIDE = 64;
|
__xrfragment_XRF.EMBEDDED = 64;
|
||||||
|
|
||||||
__xrfragment_XRF.PV_OVERRIDE = 128;
|
__xrfragment_XRF.PV_OVERRIDE = 128;
|
||||||
|
|
||||||
|
|
|
@ -220,27 +220,27 @@ xrfragment_Parser.parse = function(key,value,resultMap) {
|
||||||
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
||||||
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE | xrfragment_XRF.PROMPT;
|
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED | xrfragment_XRF.PROMPT;
|
||||||
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
||||||
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.BROWSER_OVERRIDE);
|
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
||||||
|
@ -570,8 +570,8 @@ xrfragment_XRF.PROP_BIND = 2;
|
||||||
xrfragment_XRF.QUERY_OPERATOR = 4;
|
xrfragment_XRF.QUERY_OPERATOR = 4;
|
||||||
xrfragment_XRF.PROMPT = 8;
|
xrfragment_XRF.PROMPT = 8;
|
||||||
xrfragment_XRF.ROUNDROBIN = 16;
|
xrfragment_XRF.ROUNDROBIN = 16;
|
||||||
xrfragment_XRF.BROWSER_OVERRIDE = 32;
|
xrfragment_XRF.NAVIGATOR = 32;
|
||||||
xrfragment_XRF.EMBED_OVERRIDE = 64;
|
xrfragment_XRF.EMBEDDED = 64;
|
||||||
xrfragment_XRF.PV_OVERRIDE = 128;
|
xrfragment_XRF.PV_OVERRIDE = 128;
|
||||||
xrfragment_XRF.PV_EXECUTE = 256;
|
xrfragment_XRF.PV_EXECUTE = 256;
|
||||||
xrfragment_XRF.T_COLOR = 8192;
|
xrfragment_XRF.T_COLOR = 8192;
|
||||||
|
|
|
@ -1297,27 +1297,27 @@ class xrfragment_Parser:
|
||||||
Frag.h["#"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW)
|
Frag.h["#"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW)
|
||||||
Frag.h["class"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["class"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["src"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_URL)
|
Frag.h["src"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_URL)
|
||||||
Frag.h["pos"] = ((((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.T_STRING_OBJ) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["pos"] = ((((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.T_STRING_OBJ) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["href"] = ((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.T_PREDEFINED_VIEW)
|
Frag.h["href"] = ((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.T_PREDEFINED_VIEW)
|
||||||
Frag.h["q"] = ((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["q"] = ((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["scale"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["scale"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["rot"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["rot"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["translate"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["translate"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["visible"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_INT) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["visible"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_INT) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["env"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["env"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["t"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["t"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["gravity"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["gravity"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["physics"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["physics"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["fov"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_INT) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["fov"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_INT) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["clip"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["clip"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["fog"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["fog"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["namespace"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["namespace"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["SPDX"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["SPDX"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["unit"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["unit"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["description"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["description"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["session"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE) | xrfragment_XRF.PROMPT)
|
Frag.h["session"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED) | xrfragment_XRF.PROMPT)
|
||||||
if ((len(value) == 0) and (not (key in Frag.h))):
|
if ((len(value) == 0) and (not (key in Frag.h))):
|
||||||
value1 = xrfragment_XRF(key,(xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.BROWSER_OVERRIDE))
|
value1 = xrfragment_XRF(key,(xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR))
|
||||||
setattr(resultMap,(("_hx_" + key) if ((key in python_Boot.keywords)) else (("_hx_" + key) if (((((len(key) > 2) and ((ord(key[0]) == 95))) and ((ord(key[1]) == 95))) and ((ord(key[(len(key) - 1)]) != 95)))) else key)),value1)
|
setattr(resultMap,(("_hx_" + key) if ((key in python_Boot.keywords)) else (("_hx_" + key) if (((((len(key) > 2) and ((ord(key[0]) == 95))) and ((ord(key[1]) == 95))) and ((ord(key[(len(key) - 1)]) != 95)))) else key)),value1)
|
||||||
return True
|
return True
|
||||||
if ((len(key.split(".")) > 1) and ((len(value.split(".")) > 1))):
|
if ((len(key.split(".")) > 1) and ((len(value.split(".")) > 1))):
|
||||||
|
@ -1565,7 +1565,7 @@ class xrfragment_XRF:
|
||||||
__slots__ = ("fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query")
|
__slots__ = ("fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query")
|
||||||
_hx_fields = ["fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query"]
|
_hx_fields = ["fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query"]
|
||||||
_hx_methods = ["is", "validate", "guessType"]
|
_hx_methods = ["is", "validate", "guessType"]
|
||||||
_hx_statics = ["ASSET", "PROP_BIND", "QUERY_OPERATOR", "PROMPT", "ROUNDROBIN", "BROWSER_OVERRIDE", "EMBED_OVERRIDE", "PV_OVERRIDE", "PV_EXECUTE", "T_COLOR", "T_INT", "T_FLOAT", "T_VECTOR2", "T_VECTOR3", "T_URL", "T_PREDEFINED_VIEW", "T_STRING", "T_STRING_OBJ", "T_STRING_OBJ_PROP", "isColor", "isInt", "isFloat", "isVector", "isUrl", "isUrlOrPretypedView", "isString", "set", "unset"]
|
_hx_statics = ["ASSET", "PROP_BIND", "QUERY_OPERATOR", "PROMPT", "ROUNDROBIN", "NAVIGATOR", "EMBEDDED", "PV_OVERRIDE", "PV_EXECUTE", "T_COLOR", "T_INT", "T_FLOAT", "T_VECTOR2", "T_VECTOR3", "T_URL", "T_PREDEFINED_VIEW", "T_STRING", "T_STRING_OBJ", "T_STRING_OBJ_PROP", "isColor", "isInt", "isFloat", "isVector", "isUrl", "isUrlOrPretypedView", "isString", "set", "unset"]
|
||||||
|
|
||||||
def __init__(self,_fragment,_flags):
|
def __init__(self,_fragment,_flags):
|
||||||
self.query = None
|
self.query = None
|
||||||
|
@ -1655,8 +1655,8 @@ xrfragment_XRF.PROP_BIND = 2
|
||||||
xrfragment_XRF.QUERY_OPERATOR = 4
|
xrfragment_XRF.QUERY_OPERATOR = 4
|
||||||
xrfragment_XRF.PROMPT = 8
|
xrfragment_XRF.PROMPT = 8
|
||||||
xrfragment_XRF.ROUNDROBIN = 16
|
xrfragment_XRF.ROUNDROBIN = 16
|
||||||
xrfragment_XRF.BROWSER_OVERRIDE = 32
|
xrfragment_XRF.NAVIGATOR = 32
|
||||||
xrfragment_XRF.EMBED_OVERRIDE = 64
|
xrfragment_XRF.EMBEDDED = 64
|
||||||
xrfragment_XRF.PV_OVERRIDE = 128
|
xrfragment_XRF.PV_OVERRIDE = 128
|
||||||
xrfragment_XRF.PV_EXECUTE = 256
|
xrfragment_XRF.PV_EXECUTE = 256
|
||||||
xrfragment_XRF.T_COLOR = 8192
|
xrfragment_XRF.T_COLOR = 8192
|
||||||
|
|
|
@ -220,27 +220,27 @@ xrfragment_Parser.parse = function(key,value,resultMap) {
|
||||||
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
||||||
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE | xrfragment_XRF.PROMPT;
|
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED | xrfragment_XRF.PROMPT;
|
||||||
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
||||||
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.BROWSER_OVERRIDE);
|
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
||||||
|
@ -570,8 +570,8 @@ xrfragment_XRF.PROP_BIND = 2;
|
||||||
xrfragment_XRF.QUERY_OPERATOR = 4;
|
xrfragment_XRF.QUERY_OPERATOR = 4;
|
||||||
xrfragment_XRF.PROMPT = 8;
|
xrfragment_XRF.PROMPT = 8;
|
||||||
xrfragment_XRF.ROUNDROBIN = 16;
|
xrfragment_XRF.ROUNDROBIN = 16;
|
||||||
xrfragment_XRF.BROWSER_OVERRIDE = 32;
|
xrfragment_XRF.NAVIGATOR = 32;
|
||||||
xrfragment_XRF.EMBED_OVERRIDE = 64;
|
xrfragment_XRF.EMBEDDED = 64;
|
||||||
xrfragment_XRF.PV_OVERRIDE = 128;
|
xrfragment_XRF.PV_OVERRIDE = 128;
|
||||||
xrfragment_XRF.PV_EXECUTE = 256;
|
xrfragment_XRF.PV_EXECUTE = 256;
|
||||||
xrfragment_XRF.T_COLOR = 8192;
|
xrfragment_XRF.T_COLOR = 8192;
|
||||||
|
@ -593,35 +593,41 @@ xrfragment_XRF.isUrlOrPretypedView = new EReg("(^#|://)?\\..*","");
|
||||||
xrfragment_XRF.isString = new EReg(".*","");
|
xrfragment_XRF.isString = new EReg(".*","");
|
||||||
})({});
|
})({});
|
||||||
var xrfragment = $hx_exports["xrfragment"];
|
var xrfragment = $hx_exports["xrfragment"];
|
||||||
xrfragment.three = {}
|
xrfragment.xrf = {}
|
||||||
|
xrfragment.model = {}
|
||||||
|
|
||||||
xrfragment.init = function(opts){
|
xrfragment.init = function(opts){
|
||||||
opts = opts || {}
|
opts = opts || {}
|
||||||
for ( let i in opts ) xrfragment[i] = opts[i]
|
let XRF = function(){
|
||||||
for ( let i in xrfragment.XRF ) xrfragment[i] = xrfragment.XRF[i] // shortcuts to constants (BROWSER_OVERRIDE e.g.)
|
alert("ja")
|
||||||
|
}
|
||||||
|
for ( let i in opts ) XRF[i] = xrfragment[i] = opts[i]
|
||||||
|
for ( let i in xrfragment.XRF ) XRF[i] = xrfragment.XRF[i] // shortcuts to constants (NAVIGATOR e.g.)
|
||||||
xrfragment.Parser.debug = xrfragment.debug
|
xrfragment.Parser.debug = xrfragment.debug
|
||||||
if( opts.loaders ) opts.loaders.map( xrfragment.patchLoader )
|
if( opts.loaders ) opts.loaders.map( xrfragment.patchLoader )
|
||||||
return xrfragment
|
return XRF
|
||||||
}
|
}
|
||||||
|
|
||||||
xrfragment.patchLoader = function(loader){
|
xrfragment.patchLoader = function(loader){
|
||||||
loader.prototype.load = ((load) => function(url, onLoad, onProgress, onError){
|
loader.prototype.load = ((load) => function(url, onLoad, onProgress, onError){
|
||||||
load.call( this,
|
load.call( this,
|
||||||
url,
|
url,
|
||||||
(model) => { onLoad(model); xrfragment.parseModel(model) },
|
(model) => { onLoad(model); xrfragment.parseModel(model,url) },
|
||||||
onProgress,
|
onProgress,
|
||||||
onError)
|
onError)
|
||||||
})(loader.prototype.load)
|
})(loader.prototype.load)
|
||||||
}
|
}
|
||||||
|
|
||||||
xrfragment.parseModel = function(model){
|
xrfragment.parseModel = function(model,url){
|
||||||
|
let file = url.split("/").pop().replace(/#.*/,'')
|
||||||
|
xrfragment.model[file] = model
|
||||||
model.scene.traverse( (mesh) => {
|
model.scene.traverse( (mesh) => {
|
||||||
if( mesh.userData ){
|
if( mesh.userData ){
|
||||||
let frag = {}
|
let frag = {}
|
||||||
for( let k in mesh.userData ){
|
for( let k in mesh.userData ){
|
||||||
xrfragment.Parser.parse( k, mesh.userData[k], frag )
|
xrfragment.Parser.parse( k, mesh.userData[k], frag )
|
||||||
// call native function (xrf/env.js e.g.), or pass it to user decorator
|
// call native function (xrf/env.js e.g.), or pass it to user decorator
|
||||||
let func = xrfragment.three[k] || function(){}
|
let func = xrfragment.xrf[k] || function(){}
|
||||||
let opts = {mesh, model, camera:xrfragment.camera, scene: xrfragment.scene, renderer: xrfragment.renderer, THREE: xrfragment.THREE }
|
let opts = {mesh, model, camera:xrfragment.camera, scene: xrfragment.scene, renderer: xrfragment.renderer, THREE: xrfragment.THREE }
|
||||||
if( xrfragment[k] ) xrfragment[k]( func, frag[k], opts)
|
if( xrfragment[k] ) xrfragment[k]( func, frag[k], opts)
|
||||||
else func( frag[k], opts)
|
else func( frag[k], opts)
|
||||||
|
@ -629,7 +635,13 @@ xrfragment.parseModel = function(model){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
xrfragment.three.env = function(v, opts){
|
|
||||||
|
xrfragment.getLastModel = () => Object.values(xrfragment.model)[ Object.values(xrfragment.model).length-1 ]
|
||||||
|
|
||||||
|
xrfragment.eval = function( url, model ){
|
||||||
|
console.dir({url,model})
|
||||||
|
}
|
||||||
|
xrfragment.xrf.env = function(v, opts){
|
||||||
let { mesh, model, camera, scene, renderer, THREE} = opts
|
let { mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
let env = mesh.getObjectByName(v.string)
|
let env = mesh.getObjectByName(v.string)
|
||||||
env.material.map.mapping = THREE.EquirectangularReflectionMapping;
|
env.material.map.mapping = THREE.EquirectangularReflectionMapping;
|
||||||
|
@ -638,7 +650,7 @@ xrfragment.three.env = function(v, opts){
|
||||||
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
renderer.toneMapping = THREE.ACESFilmicToneMapping;
|
||||||
renderer.toneMappingExposure = 1;
|
renderer.toneMappingExposure = 1;
|
||||||
}
|
}
|
||||||
xrfragment.three.pos = function(v, opts){
|
xrfragment.xrf.pos = function(v, opts){
|
||||||
let { mesh, model, camera, scene, renderer, THREE} = opts
|
let { mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
camera.position.x = v.x
|
camera.position.x = v.x
|
||||||
camera.position.y = v.y
|
camera.position.y = v.y
|
||||||
|
|
|
@ -3,9 +3,9 @@ BEGIN{
|
||||||
ASSET="🔒"
|
ASSET="🔒"
|
||||||
OVERRIDE="🔓"
|
OVERRIDE="🔓"
|
||||||
PV_OVERRIDE="💥"
|
PV_OVERRIDE="💥"
|
||||||
BROWSER_OVERRIDE="👩"
|
NAVIGATOR="👩"
|
||||||
PROMPT="✋?"
|
PROMPT="✋?"
|
||||||
EMBED_OVERRIDE="🔗"
|
EMBEDDED="🔗"
|
||||||
print "| fragment | type | access | scope |"
|
print "| fragment | type | access | scope |"
|
||||||
print "|----------|------|--------------|-------|"
|
print "|----------|------|--------------|-------|"
|
||||||
}
|
}
|
||||||
|
@ -16,8 +16,8 @@ END{
|
||||||
print OVERRIDE" = value(s) can be overwritten in certain context<br>"
|
print OVERRIDE" = value(s) can be overwritten in certain context<br>"
|
||||||
print ROUNDROBIN" = multiple values will be roundrobin'ed (`#pos=0,0,0|1,0,0` e.g.)<br>"
|
print ROUNDROBIN" = multiple values will be roundrobin'ed (`#pos=0,0,0|1,0,0` e.g.)<br>"
|
||||||
print PV_OVERRIDE" = value(s) can be overwritten by [predefined_view](#predefined_view)<br>"
|
print PV_OVERRIDE" = value(s) can be overwritten by [predefined_view](#predefined_view)<br>"
|
||||||
print BROWSER_OVERRIDE" = value(s) can be overwritten when user clicks `href` (value) or top-level URL change(see [How it works](#How%20it%20works))<br>"
|
print NAVIGATOR" = value(s) can be overwritten when user clicks `href` (value) or top-level URL change(see [How it works](#How%20it%20works))<br>"
|
||||||
print EMBED_OVERRIDE" = value(s) can be overwritten when 3D asset is embedded/linked as `src` value<br>"
|
print EMBEDDED" = value(s) can be overwritten when 3D asset is embedded/linked as `src` value<br>"
|
||||||
print PROMPT" = value(s) can be overwritten by offering confirmation/undo to user<br><br>"
|
print PROMPT" = value(s) can be overwritten by offering confirmation/undo to user<br><br>"
|
||||||
print ""
|
print ""
|
||||||
print "for more info see [How it works](#How%20it%20works)"
|
print "for more info see [How it works](#How%20it%20works)"
|
||||||
|
@ -46,8 +46,8 @@ END{
|
||||||
if( $0 ~ /T_PREDEFINED_VIEW/ ) type="[predefined view](#predefined_view ) "
|
if( $0 ~ /T_PREDEFINED_VIEW/ ) type="[predefined view](#predefined_view ) "
|
||||||
if( $0 ~ /ROUNDROBIN/ ) perms=perms" "ROUNDROBIN
|
if( $0 ~ /ROUNDROBIN/ ) perms=perms" "ROUNDROBIN
|
||||||
if( $0 ~ /PV_OVERRIDE/ ) perms=perms" "PV_OVERRIDE
|
if( $0 ~ /PV_OVERRIDE/ ) perms=perms" "PV_OVERRIDE
|
||||||
if( $0 ~ /BROWSER_OVERRIDE/ ) perms=perms" "BROWSER_OVERRIDE
|
if( $0 ~ /NAVIGATOR/ ) perms=perms" "NAVIGATOR
|
||||||
if( $0 ~ /EMBED_OVERRIDE/ ) perms=perms" "EMBED_OVERRIDE
|
if( $0 ~ /EMBEDDED/ ) perms=perms" "EMBEDDED
|
||||||
if( $0 ~ /PROMPT/ ) perms=perms" "PROMPT
|
if( $0 ~ /PROMPT/ ) perms=perms" "PROMPT
|
||||||
print "| **"frag"** |" type "|" perms "|" scope "|"
|
print "| **"frag"** |" type "|" perms "|" scope "|"
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,14 +58,14 @@ input[type="submit"] {
|
||||||
top: 8px;
|
top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#overlay > input[type="text"]{
|
#overlay > #uri {
|
||||||
height: 29px;
|
height: 29px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 200px;
|
left: 200px;
|
||||||
top: 9px;
|
top: 9px;
|
||||||
max-width:550px;
|
max-width:550px;
|
||||||
padding: 5px 0px 5px 0px;
|
padding: 5px 0px 5px 5px;
|
||||||
width: calc( 63% - 200px);
|
width: calc( 63% - 200px);
|
||||||
background: #f0f0f0;
|
background: #f0f0f0;
|
||||||
border-color: #Ccc;
|
border-color: #Ccc;
|
||||||
|
@ -96,6 +96,14 @@ a#source{
|
||||||
bottom:0;
|
bottom:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#VRButton {
|
||||||
|
margin-bottom:20vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 450px) {
|
||||||
|
#uri{ display:none; }
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
@media (max-width: 640px) {
|
||||||
.lil-gui.root{
|
.lil-gui.root{
|
||||||
top:auto !important;
|
top:auto !important;
|
||||||
|
|
|
@ -98,7 +98,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" style="border=bottom:none;" class="small">
|
<td colspan="2" style="border=bottom:none;" class="small">
|
||||||
<br><br>
|
<br><br>
|
||||||
You can test 👩 BROWSER_OVERRIDE-enabled fragments (<i>#t=1,200</i> or <i>#fog=2m|FFAABB</i>) by updating the url.<br> For more info see <a href="https://coderofsalvation.github.io/xrfragment/#List%20of%20fragments" target="_blank">the docs</a><br><br>
|
You can test 👩 NAVIGATOR-enabled fragments (<i>#t=1,200</i> or <i>#fog=2m|FFAABB</i>) by updating the url.<br> For more info see <a href="https://coderofsalvation.github.io/xrfragment/#List%20of%20fragments" target="_blank">the docs</a><br><br>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
<link type="text/css" rel="stylesheet" href="./../../assets/style.css"/>
|
<link type="text/css" rel="stylesheet" href="./../../assets/style.css"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="overlay">
|
<div id="overlay" x-data="{ urls: ['example1.gltf#pos=0,2,3'] }">
|
||||||
<img src="./../../assets/logo.png" class="logo"/>
|
<img src="./../../assets/logo.png" class="logo"/>
|
||||||
<input type="submit" value="load 3D asset"></input>
|
<input type="submit" value="load 3D asset"></input>
|
||||||
<input type="text" list="urls" value="./example/asset/example1.gltf#pos=0,2,3"/>
|
<input type="text" id="uri" list="urls" value="example1.gltf#pos=0,2,3" x-on:change="XRF.eval( $('#uri').value, XRF.getLastModel() )"/>
|
||||||
<datalist id="urls" x-data="{ urls: ['./example/asset/example1.gltf#pos=0,2,3'], load: () => alert('load') }" x-on:input="load()">
|
<datalist id="urls" >
|
||||||
<template x-for="url in urls">
|
<template x-for="url in urls">
|
||||||
<option x-text="url"></option>
|
<option x-text="url"></option>
|
||||||
</template>
|
</template>
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
import { Reflector } from 'three/addons/objects/Reflector.js';
|
import { Reflector } from 'three/addons/objects/Reflector.js';
|
||||||
import { VRButton } from 'three/addons/webxr/VRButton.js';
|
import { VRButton } from 'three/addons/webxr/VRButton.js';
|
||||||
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
||||||
|
import { FBXLoader } from 'three/addons/loaders/FBXLoader.js';
|
||||||
import { HTMLMesh } from 'three/addons/interactive/HTMLMesh.js';
|
import { HTMLMesh } from 'three/addons/interactive/HTMLMesh.js';
|
||||||
import { InteractiveGroup } from 'three/addons/interactive/InteractiveGroup.js';
|
import { InteractiveGroup } from 'three/addons/interactive/InteractiveGroup.js';
|
||||||
import { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFactory.js';
|
import { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFactory.js';
|
||||||
|
@ -54,6 +55,8 @@
|
||||||
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
|
import { GUI } from 'three/addons/libs/lil-gui.module.min.js';
|
||||||
import Stats from 'three/addons/libs/stats.module.js';
|
import Stats from 'three/addons/libs/stats.module.js';
|
||||||
|
|
||||||
|
window.$ = (s) => document.querySelector(s)
|
||||||
|
|
||||||
let camera, scene, renderer, controls;
|
let camera, scene, renderer, controls;
|
||||||
let reflector;
|
let reflector;
|
||||||
let stats, statsMesh;
|
let stats, statsMesh;
|
||||||
|
@ -93,21 +96,30 @@
|
||||||
scene,
|
scene,
|
||||||
renderer,
|
renderer,
|
||||||
debug: true,
|
debug: true,
|
||||||
loaders: [ GLTFLoader ], // which assets to check for fragments?
|
loaders: [ GLTFLoader, FBXLoader ], // which 3D assets to check for fragments?
|
||||||
})
|
})
|
||||||
|
|
||||||
// optional: extend env fragment
|
// optional: react/extend/hook into XR fragment
|
||||||
XRF.env = (xrf,v,opts) => {
|
XRF.env = (xrf,v,opts) => {
|
||||||
let { mesh, model, camera, scene, renderer, THREE} = opts
|
let { mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
xrf(v,opts)
|
xrf(v,opts)
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional: extend non-xrfragment custom property
|
// optional: react/extend/hook into custom fragment (for non-standard custom framework logic e.g.)
|
||||||
XRF.name = (xrf,v,opts) => {
|
XRF.foobar = (xrf,v,opts) => {
|
||||||
let { mesh, model, camera, scene, renderer, THREE} = opts
|
let { mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
console.log("hello custom property 'name'")
|
console.log("hello custom property 'foobar'")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// *TODO* lowhanging fruit: during XR fragments-query milestone, repurpose XR fragment queries
|
||||||
|
// to provide jquery-ish interface for three.js)
|
||||||
|
//
|
||||||
|
// XRF('example1.gltf#q=.foo', (objs) => {
|
||||||
|
//
|
||||||
|
// })
|
||||||
|
|
||||||
|
window.XRF = XRF // expose to form
|
||||||
|
|
||||||
// load 3D asset
|
// load 3D asset
|
||||||
let model;
|
let model;
|
||||||
const loader = new GLTFLoader().setPath( './../../assets/')
|
const loader = new GLTFLoader().setPath( './../../assets/')
|
||||||
|
@ -136,7 +148,7 @@
|
||||||
render();
|
render();
|
||||||
|
|
||||||
};
|
};
|
||||||
loader.load( 'example1.gltf', loadGLTF );
|
loader.load( $('#uri').value, loadGLTF );
|
||||||
|
|
||||||
|
|
||||||
// setup mouse controls
|
// setup mouse controls
|
||||||
|
@ -177,7 +189,7 @@
|
||||||
controllerGrip2.add( controllerModelFactory.createControllerModel( controllerGrip2 ) );
|
controllerGrip2.add( controllerModelFactory.createControllerModel( controllerGrip2 ) );
|
||||||
scene.add( controllerGrip2 );
|
scene.add( controllerGrip2 );
|
||||||
|
|
||||||
setupConsole( document.querySelector('textarea') )
|
setupConsole( $('textarea') )
|
||||||
|
|
||||||
// GUI
|
// GUI
|
||||||
|
|
||||||
|
@ -223,7 +235,7 @@
|
||||||
".gltf": (file) => file.arrayBuffer().then( (data) => loader.parse( data, '', loadGLTF, console.error ) ),
|
".gltf": (file) => file.arrayBuffer().then( (data) => loader.parse( data, '', loadGLTF, console.error ) ),
|
||||||
".glb": (file) => file.arrayBuffer().then( (data) => loader.parse( data, '', loadGLTF, console.error ) )
|
".glb": (file) => file.arrayBuffer().then( (data) => loader.parse( data, '', loadGLTF, console.error ) )
|
||||||
})
|
})
|
||||||
document.querySelector("#overlay > input[type=submit]").addEventListener("click", fileLoaders )
|
$("#overlay > input[type=submit]").addEventListener("click", fileLoaders )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
54
index.html
54
index.html
File diff suppressed because one or more lines are too long
|
@ -37,8 +37,8 @@ class Test {
|
||||||
if( item.expect.fn == "testParsed" ) valid = item.expect.out == res.exists(item.expect.input);
|
if( item.expect.fn == "testParsed" ) valid = item.expect.out == res.exists(item.expect.input);
|
||||||
if( item.expect.fn == "testPredefinedView" ) valid = res.exists(item.expect.input) && item.expect.out == res.get(item.expect.input).is( XRF.PV_EXECUTE) ;
|
if( item.expect.fn == "testPredefinedView" ) valid = res.exists(item.expect.input) && item.expect.out == res.get(item.expect.input).is( XRF.PV_EXECUTE) ;
|
||||||
if( item.expect.fn == "testPropertyAssign" ) valid = res.exists(item.expect.input) && item.expect.out == res.get(item.expect.input).is( XRF.PROP_BIND) ;
|
if( item.expect.fn == "testPropertyAssign" ) valid = res.exists(item.expect.input) && item.expect.out == res.get(item.expect.input).is( XRF.PROP_BIND) ;
|
||||||
if( item.expect.fn == "testBrowserOverride" ) valid = item.expect.out == (URI.parse(item.data,XRF.BROWSER_OVERRIDE)).exists(item.expect.input);
|
if( item.expect.fn == "testBrowserOverride" ) valid = item.expect.out == (URI.parse(item.data,XRF.NAVIGATOR)).exists(item.expect.input);
|
||||||
if( item.expect.fn == "testEmbedOverride" ) valid = item.expect.out == (URI.parse(item.data,XRF.EMBED_OVERRIDE)).exists(item.expect.input);
|
if( item.expect.fn == "testEmbedOverride" ) valid = item.expect.out == (URI.parse(item.data,XRF.EMBEDDED)).exists(item.expect.input);
|
||||||
if( item.expect.fn == "equal.string" ) valid = res.get(item.expect.input) && item.expect.out == res.get(item.expect.input).string;
|
if( item.expect.fn == "equal.string" ) valid = res.get(item.expect.input) && item.expect.out == res.get(item.expect.input).string;
|
||||||
if( item.expect.fn == "equal.xy" ) valid = equalXY(res,item);
|
if( item.expect.fn == "equal.xy" ) valid = equalXY(res,item);
|
||||||
if( item.expect.fn == "equal.xyz" ) valid = equalXYZ(res,item);
|
if( item.expect.fn == "equal.xyz" ) valid = equalXYZ(res,item);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#pos=c|d|1,2,3", "expect":{ "fn":"equal.multi", "input":"pos","out":"c|d|1,2,3"},"label":"b equal.multi"},
|
{"fn":"url","data":"http://foo.com?foo=1#pos=c|d|1,2,3", "expect":{ "fn":"equal.multi", "input":"pos","out":"c|d|1,2,3"},"label":"b equal.multi"},
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#t=2,500", "expect":{ "fn":"testBrowserOverride", "input":"t","out":true},"label":"browser URI can override t (defined in asset)"},
|
{"fn":"url","data":"http://foo.com?foo=1#t=2,500", "expect":{ "fn":"testBrowserOverride", "input":"t","out":true},"label":"browser URI can override t (defined in asset)"},
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#q=-bar", "expect":{ "fn":"testBrowserOverride", "input":"q","out":false},"label":"browser URI cannot override q (defined in asset)"},
|
{"fn":"url","data":"http://foo.com?foo=1#q=-bar", "expect":{ "fn":"testBrowserOverride", "input":"q","out":false},"label":"browser URI cannot override q (defined in asset)"},
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#scale=2,2,2", "expect":{ "fn":"testBrowserOverride", "input":"scale","out":false},"label":"scale does not have BROWSER_OVERRIDE set"},
|
{"fn":"url","data":"http://foo.com?foo=1#scale=2,2,2", "expect":{ "fn":"testBrowserOverride", "input":"scale","out":false},"label":"scale does not have NAVIGATOR set"},
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#scale=2,2,2", "expect":{ "fn":"testEmbedOverride", "input":"scale","out":true},"label":"embedded (src) URI can override scale"},
|
{"fn":"url","data":"http://foo.com?foo=1#scale=2,2,2", "expect":{ "fn":"testEmbedOverride", "input":"scale","out":true},"label":"embedded (src) URI can override scale"},
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#mypredefinedview", "expect":{ "fn":"testPredefinedView", "input":"mypredefinedview","out":true},"label":"test predefined view executed"},
|
{"fn":"url","data":"http://foo.com?foo=1#mypredefinedview", "expect":{ "fn":"testPredefinedView", "input":"mypredefinedview","out":true},"label":"test predefined view executed"},
|
||||||
{"fn":"url","data":"http://foo.com?foo=1#mypredefinedview&another", "expect":{ "fn":"testPredefinedView", "input":"another","out":true},"label":"test predefined view executed (multiple)"},
|
{"fn":"url","data":"http://foo.com?foo=1#mypredefinedview&another", "expect":{ "fn":"testPredefinedView", "input":"another","out":true},"label":"test predefined view executed (multiple)"},
|
||||||
|
|
|
@ -1,32 +1,38 @@
|
||||||
xrfragment.three = {}
|
xrfragment.xrf = {}
|
||||||
|
xrfragment.model = {}
|
||||||
|
|
||||||
xrfragment.init = function(opts){
|
xrfragment.init = function(opts){
|
||||||
opts = opts || {}
|
opts = opts || {}
|
||||||
for ( let i in opts ) xrfragment[i] = opts[i]
|
let XRF = function(){
|
||||||
for ( let i in xrfragment.XRF ) xrfragment[i] = xrfragment.XRF[i] // shortcuts to constants (BROWSER_OVERRIDE e.g.)
|
alert("ja")
|
||||||
|
}
|
||||||
|
for ( let i in opts ) XRF[i] = xrfragment[i] = opts[i]
|
||||||
|
for ( let i in xrfragment.XRF ) XRF[i] = xrfragment.XRF[i] // shortcuts to constants (NAVIGATOR e.g.)
|
||||||
xrfragment.Parser.debug = xrfragment.debug
|
xrfragment.Parser.debug = xrfragment.debug
|
||||||
if( opts.loaders ) opts.loaders.map( xrfragment.patchLoader )
|
if( opts.loaders ) opts.loaders.map( xrfragment.patchLoader )
|
||||||
return xrfragment
|
return XRF
|
||||||
}
|
}
|
||||||
|
|
||||||
xrfragment.patchLoader = function(loader){
|
xrfragment.patchLoader = function(loader){
|
||||||
loader.prototype.load = ((load) => function(url, onLoad, onProgress, onError){
|
loader.prototype.load = ((load) => function(url, onLoad, onProgress, onError){
|
||||||
load.call( this,
|
load.call( this,
|
||||||
url,
|
url,
|
||||||
(model) => { onLoad(model); xrfragment.parseModel(model) },
|
(model) => { onLoad(model); xrfragment.parseModel(model,url) },
|
||||||
onProgress,
|
onProgress,
|
||||||
onError)
|
onError)
|
||||||
})(loader.prototype.load)
|
})(loader.prototype.load)
|
||||||
}
|
}
|
||||||
|
|
||||||
xrfragment.parseModel = function(model){
|
xrfragment.parseModel = function(model,url){
|
||||||
|
let file = url.split("/").pop().replace(/#.*/,'')
|
||||||
|
xrfragment.model[file] = model
|
||||||
model.scene.traverse( (mesh) => {
|
model.scene.traverse( (mesh) => {
|
||||||
if( mesh.userData ){
|
if( mesh.userData ){
|
||||||
let frag = {}
|
let frag = {}
|
||||||
for( let k in mesh.userData ){
|
for( let k in mesh.userData ){
|
||||||
xrfragment.Parser.parse( k, mesh.userData[k], frag )
|
xrfragment.Parser.parse( k, mesh.userData[k], frag )
|
||||||
// call native function (xrf/env.js e.g.), or pass it to user decorator
|
// call native function (xrf/env.js e.g.), or pass it to user decorator
|
||||||
let func = xrfragment.three[k] || function(){}
|
let func = xrfragment.xrf[k] || function(){}
|
||||||
let opts = {mesh, model, camera:xrfragment.camera, scene: xrfragment.scene, renderer: xrfragment.renderer, THREE: xrfragment.THREE }
|
let opts = {mesh, model, camera:xrfragment.camera, scene: xrfragment.scene, renderer: xrfragment.renderer, THREE: xrfragment.THREE }
|
||||||
if( xrfragment[k] ) xrfragment[k]( func, frag[k], opts)
|
if( xrfragment[k] ) xrfragment[k]( func, frag[k], opts)
|
||||||
else func( frag[k], opts)
|
else func( frag[k], opts)
|
||||||
|
@ -34,3 +40,9 @@ xrfragment.parseModel = function(model){
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
xrfragment.getLastModel = () => Object.values(xrfragment.model)[ Object.values(xrfragment.model).length-1 ]
|
||||||
|
|
||||||
|
xrfragment.eval = function( url, model ){
|
||||||
|
console.dir({url,model})
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
xrfragment.three.env = function(v, opts){
|
xrfragment.xrf.env = function(v, opts){
|
||||||
let { mesh, model, camera, scene, renderer, THREE} = opts
|
let { mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
let env = mesh.getObjectByName(v.string)
|
let env = mesh.getObjectByName(v.string)
|
||||||
env.material.map.mapping = THREE.EquirectangularReflectionMapping;
|
env.material.map.mapping = THREE.EquirectangularReflectionMapping;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
xrfragment.three.pos = function(v, opts){
|
xrfragment.xrf.pos = function(v, opts){
|
||||||
let { mesh, model, camera, scene, renderer, THREE} = opts
|
let { mesh, model, camera, scene, renderer, THREE} = opts
|
||||||
camera.position.x = v.x
|
camera.position.x = v.x
|
||||||
camera.position.y = v.y
|
camera.position.y = v.y
|
||||||
|
|
|
@ -21,26 +21,26 @@ class Parser {
|
||||||
Frag.set("src", XRF.ASSET | XRF.T_URL );
|
Frag.set("src", XRF.ASSET | XRF.T_URL );
|
||||||
|
|
||||||
// category: href navigation / portals / teleporting
|
// category: href navigation / portals / teleporting
|
||||||
Frag.set("pos", XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.T_STRING_OBJ | XRF.EMBED_OVERRIDE );
|
Frag.set("pos", XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.T_STRING_OBJ | XRF.EMBEDDED );
|
||||||
Frag.set("href", XRF.ASSET | XRF.T_URL | XRF.T_PREDEFINED_VIEW );
|
Frag.set("href", XRF.ASSET | XRF.T_URL | XRF.T_PREDEFINED_VIEW );
|
||||||
|
|
||||||
// category: query selector / object manipulation
|
// category: query selector / object manipulation
|
||||||
Frag.set("q", XRF.PV_OVERRIDE | XRF.T_STRING | XRF.EMBED_OVERRIDE );
|
Frag.set("q", XRF.PV_OVERRIDE | XRF.T_STRING | XRF.EMBEDDED );
|
||||||
Frag.set("scale", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.EMBED_OVERRIDE );
|
Frag.set("scale", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.EMBEDDED );
|
||||||
Frag.set("rot", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.EMBED_OVERRIDE );
|
Frag.set("rot", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.EMBEDDED );
|
||||||
Frag.set("translate", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.EMBED_OVERRIDE );
|
Frag.set("translate", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR3 | XRF.EMBEDDED );
|
||||||
Frag.set("visible", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_INT | XRF.EMBED_OVERRIDE );
|
Frag.set("visible", XRF.QUERY_OPERATOR | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_INT | XRF.EMBEDDED );
|
||||||
Frag.set("env", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_STRING | XRF.EMBED_OVERRIDE );
|
Frag.set("env", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_STRING | XRF.EMBEDDED );
|
||||||
|
|
||||||
// category: animation
|
// category: animation
|
||||||
Frag.set("t", XRF.ASSET | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR2 | XRF.BROWSER_OVERRIDE | XRF.EMBED_OVERRIDE);
|
Frag.set("t", XRF.ASSET | XRF.PV_OVERRIDE | XRF.ROUNDROBIN | XRF.T_VECTOR2 | XRF.NAVIGATOR | XRF.EMBEDDED);
|
||||||
Frag.set("gravity", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_VECTOR3 | XRF.EMBED_OVERRIDE );
|
Frag.set("gravity", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_VECTOR3 | XRF.EMBEDDED );
|
||||||
Frag.set("physics", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_VECTOR3 | XRF.EMBED_OVERRIDE );
|
Frag.set("physics", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_VECTOR3 | XRF.EMBEDDED );
|
||||||
|
|
||||||
// category: device / viewport settings
|
// category: device / viewport settings
|
||||||
Frag.set("fov", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_INT | XRF.BROWSER_OVERRIDE | XRF.EMBED_OVERRIDE );
|
Frag.set("fov", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_INT | XRF.NAVIGATOR | XRF.EMBEDDED );
|
||||||
Frag.set("clip", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_VECTOR2 | XRF.BROWSER_OVERRIDE | XRF.EMBED_OVERRIDE );
|
Frag.set("clip", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_VECTOR2 | XRF.NAVIGATOR | XRF.EMBEDDED );
|
||||||
Frag.set("fog", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_STRING | XRF.BROWSER_OVERRIDE | XRF.EMBED_OVERRIDE );
|
Frag.set("fog", XRF.ASSET | XRF.PV_OVERRIDE | XRF.T_STRING | XRF.NAVIGATOR | XRF.EMBEDDED );
|
||||||
|
|
||||||
// category: author / metadata
|
// category: author / metadata
|
||||||
Frag.set("namespace", XRF.ASSET | XRF.T_STRING );
|
Frag.set("namespace", XRF.ASSET | XRF.T_STRING );
|
||||||
|
@ -49,7 +49,7 @@ class Parser {
|
||||||
Frag.set("description", XRF.ASSET | XRF.T_STRING );
|
Frag.set("description", XRF.ASSET | XRF.T_STRING );
|
||||||
|
|
||||||
// category: multiparty
|
// category: multiparty
|
||||||
Frag.set("session", XRF.ASSET | XRF.T_URL | XRF.PV_OVERRIDE | XRF.BROWSER_OVERRIDE | XRF.EMBED_OVERRIDE | XRF.PROMPT );
|
Frag.set("session", XRF.ASSET | XRF.T_URL | XRF.PV_OVERRIDE | XRF.NAVIGATOR | XRF.EMBEDDED | XRF.PROMPT );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* # XR Fragments parser
|
* # XR Fragments parser
|
||||||
|
@ -60,7 +60,7 @@ class Parser {
|
||||||
|
|
||||||
// dynamic fragments cases: predefined views & assign/binds
|
// dynamic fragments cases: predefined views & assign/binds
|
||||||
if( value.length == 0 && !Frag.exists(key) ){
|
if( value.length == 0 && !Frag.exists(key) ){
|
||||||
resultMap.set(key, new XRF(key, XRF.PV_EXECUTE | XRF.BROWSER_OVERRIDE ) );
|
resultMap.set(key, new XRF(key, XRF.PV_EXECUTE | XRF.NAVIGATOR ) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if( key.split(".").length > 1 && value.split(".").length > 1 ){
|
if( key.split(".").length > 1 && value.split(".").length > 1 ){
|
||||||
|
|
|
@ -16,8 +16,8 @@ class XRF {
|
||||||
public static var QUERY_OPERATOR:Int = 4; // fragment will be applied to result of queryselecto
|
public static var QUERY_OPERATOR:Int = 4; // fragment will be applied to result of queryselecto
|
||||||
public static var PROMPT:Int = 8; // ask user whether this fragment value can be changed
|
public static var PROMPT:Int = 8; // ask user whether this fragment value can be changed
|
||||||
public static var ROUNDROBIN:Int = 16; // evaluation of this (multi) value can be roundrobined
|
public static var ROUNDROBIN:Int = 16; // evaluation of this (multi) value can be roundrobined
|
||||||
public static var BROWSER_OVERRIDE:Int = 32; // fragment can be overridden by (manual) browser URI change
|
public static var NAVIGATOR:Int = 32; // fragment can be overridden by (manual) browser URI change
|
||||||
public static var EMBED_OVERRIDE:Int = 64; // fragment can be overridden by an embedded URL
|
public static var EMBEDDED:Int = 64; // fragment can be overridden by an embedded URL
|
||||||
public static var PV_OVERRIDE:Int = 128; // fragment can be overridden when specified in predefined view value
|
public static var PV_OVERRIDE:Int = 128; // fragment can be overridden when specified in predefined view value
|
||||||
public static var PV_EXECUTE:Int = 256; // fragment can be overridden by (manual) browser URI change
|
public static var PV_EXECUTE:Int = 256; // fragment can be overridden by (manual) browser URI change
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ XRF.PV_OVERRIDE = 4
|
||||||
XRF.QUERY_OPERATOR = 8
|
XRF.QUERY_OPERATOR = 8
|
||||||
XRF.PROMPT = 16
|
XRF.PROMPT = 16
|
||||||
XRF.ROUNDROBIN = 32
|
XRF.ROUNDROBIN = 32
|
||||||
XRF.BROWSER_OVERRIDE = 64
|
XRF.NAVIGATOR = 64
|
||||||
XRF.T_COLOR = 128
|
XRF.T_COLOR = 128
|
||||||
XRF.T_INT = 256
|
XRF.T_INT = 256
|
||||||
XRF.T_FLOAT = 512
|
XRF.T_FLOAT = 512
|
||||||
|
|
|
@ -136,7 +136,7 @@ StringTools.replace = function(s,sub,by) {
|
||||||
var Test = function() { };
|
var Test = function() { };
|
||||||
Test.__name__ = true;
|
Test.__name__ = true;
|
||||||
Test.main = function() {
|
Test.main = function() {
|
||||||
Test.test([{ fn : "url", expect : { fn : "equal.xyz", input : "pos", out : false}, label : "equal.xyz: should trigger incompatible type)", data : "http://foo.com?foo=1#pos=1.2,2.2"},{ fn : "url", expect : { fn : "equal.xyz", input : "pos", out : "1.2,2.2,3"}, label : "equal.xyz", data : "http://foo.com?foo=1#pos=1.2,2.2,3"},{ fn : "url", expect : { fn : "equal.xy", input : "t", out : "1,100"}, label : "a equal.xy", data : "http://foo.com?foo=1#t=1,100"},{ fn : "url", expect : { fn : "testParsed", input : "prio", out : false}, label : "should trigger incompatible type", data : "http://foo.com?foo=1#prio=foo"},{ fn : "url", expect : { fn : "equal.multi", input : "pos", out : "c|d|1,2,3"}, label : "b equal.multi", data : "http://foo.com?foo=1#pos=c|d|1,2,3"},{ fn : "url", expect : { fn : "testBrowserOverride", input : "t", out : true}, label : "browser URI can override t (defined in asset)", data : "http://foo.com?foo=1#t=2,500"},{ fn : "url", expect : { fn : "testBrowserOverride", input : "q", out : false}, label : "browser URI cannot override q (defined in asset)", data : "http://foo.com?foo=1#q=-bar"},{ fn : "url", expect : { fn : "testBrowserOverride", input : "scale", out : false}, label : "scale does not have BROWSER_OVERRIDE set", data : "http://foo.com?foo=1#scale=2,2,2"},{ fn : "url", expect : { fn : "testEmbedOverride", input : "scale", out : true}, label : "embedded (src) URI can override scale", data : "http://foo.com?foo=1#scale=2,2,2"},{ fn : "url", expect : { fn : "testPredefinedView", input : "mypredefinedview", out : true}, label : "test predefined view executed", data : "http://foo.com?foo=1#mypredefinedview"},{ fn : "url", expect : { fn : "testPredefinedView", input : "another", out : true}, label : "test predefined view executed (multiple)", data : "http://foo.com?foo=1#mypredefinedview&another"},{ fn : "url", expect : { fn : "testPredefinedView", input : "mypredefinedview", out : true}, label : "test predefined view executed (multiple)", data : "http://foo.com?foo=1#mypredefinedview&another"},{ fn : "url", expect : { fn : "testPropertyAssign", input : "cube.position.x", out : true}, label : "test data assign", data : "#cube.position.x=music.position.x"},{ fn : "url", expect : { fn : "testPropertyAssign", input : "cube.position.x", out : true}, label : "test one-way data bind", data : "#cube.position.x=@music.position.x"}]);
|
Test.test([{ fn : "url", expect : { fn : "equal.xyz", input : "pos", out : false}, label : "equal.xyz: should trigger incompatible type)", data : "http://foo.com?foo=1#pos=1.2,2.2"},{ fn : "url", expect : { fn : "equal.xyz", input : "pos", out : "1.2,2.2,3"}, label : "equal.xyz", data : "http://foo.com?foo=1#pos=1.2,2.2,3"},{ fn : "url", expect : { fn : "equal.xy", input : "t", out : "1,100"}, label : "a equal.xy", data : "http://foo.com?foo=1#t=1,100"},{ fn : "url", expect : { fn : "testParsed", input : "prio", out : false}, label : "should trigger incompatible type", data : "http://foo.com?foo=1#prio=foo"},{ fn : "url", expect : { fn : "equal.multi", input : "pos", out : "c|d|1,2,3"}, label : "b equal.multi", data : "http://foo.com?foo=1#pos=c|d|1,2,3"},{ fn : "url", expect : { fn : "testBrowserOverride", input : "t", out : true}, label : "browser URI can override t (defined in asset)", data : "http://foo.com?foo=1#t=2,500"},{ fn : "url", expect : { fn : "testBrowserOverride", input : "q", out : false}, label : "browser URI cannot override q (defined in asset)", data : "http://foo.com?foo=1#q=-bar"},{ fn : "url", expect : { fn : "testBrowserOverride", input : "scale", out : false}, label : "scale does not have NAVIGATOR set", data : "http://foo.com?foo=1#scale=2,2,2"},{ fn : "url", expect : { fn : "testEmbedOverride", input : "scale", out : true}, label : "embedded (src) URI can override scale", data : "http://foo.com?foo=1#scale=2,2,2"},{ fn : "url", expect : { fn : "testPredefinedView", input : "mypredefinedview", out : true}, label : "test predefined view executed", data : "http://foo.com?foo=1#mypredefinedview"},{ fn : "url", expect : { fn : "testPredefinedView", input : "another", out : true}, label : "test predefined view executed (multiple)", data : "http://foo.com?foo=1#mypredefinedview&another"},{ fn : "url", expect : { fn : "testPredefinedView", input : "mypredefinedview", out : true}, label : "test predefined view executed (multiple)", data : "http://foo.com?foo=1#mypredefinedview&another"},{ fn : "url", expect : { fn : "testPropertyAssign", input : "cube.position.x", out : true}, label : "test data assign", data : "#cube.position.x=music.position.x"},{ fn : "url", expect : { fn : "testPropertyAssign", input : "cube.position.x", out : true}, label : "test one-way data bind", data : "#cube.position.x=@music.position.x"}]);
|
||||||
Test.test([{ fn : "query", expect : { fn : "testProperty", input : ["class","bar"], out : true}, data : "class:bar"},{ fn : "query", expect : { fn : "testProperty", input : ["class","bar"], out : true}, label : ".bar shorthand", data : ".bar"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : false}, data : ".bar -.foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, data : ".bar -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","bar"], out : true}, data : ".bar -.bar .bar"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo bar:5 .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo bar:>5 .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo bar:>5 .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["id","foo"], out : false}, label : "!id:foo", data : ".foo -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["id","foo"], out : true}, label : "id:foo?", data : "foo -foo foo"}]);
|
Test.test([{ fn : "query", expect : { fn : "testProperty", input : ["class","bar"], out : true}, data : "class:bar"},{ fn : "query", expect : { fn : "testProperty", input : ["class","bar"], out : true}, label : ".bar shorthand", data : ".bar"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : false}, data : ".bar -.foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, data : ".bar -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","bar"], out : true}, data : ".bar -.bar .bar"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo bar:5 .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo bar:>5 .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo bar:>5 .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["class","foo"], out : true}, label : "class:foo", data : ".foo -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["id","foo"], out : false}, label : "!id:foo", data : ".foo -.foo .foo"},{ fn : "query", expect : { fn : "testProperty", input : ["id","foo"], out : true}, label : "id:foo?", data : "foo -foo foo"}]);
|
||||||
Test.test([{ fn : "query", expect : { fn : "testProperty", input : ["price","10"], out : true}, data : "price:>=5"},{ fn : "query", expect : { fn : "testProperty", input : ["price","10"], out : false}, data : "price:>=15"},{ fn : "query", expect : { fn : "testProperty", input : ["price","4"], out : false}, data : "price:>=5"},{ fn : "query", expect : { fn : "testProperty", input : ["price","0"], out : false}, data : "price:>=5"},{ fn : "query", expect : { fn : "testProperty", input : ["price","1"], out : false}, label : "price=1", data : "price:>=5 price:0"},{ fn : "query", expect : { fn : "testProperty", input : ["price","0"], out : true}, label : "price=0", data : "price:>=5 price:0"},{ fn : "query", expect : { fn : "testProperty", input : ["price","6"], out : true}, label : "price=6", data : "price:>=5 price:0"},{ fn : "query", expect : { fn : "testProperty", input : ["tag","foo"], out : true}, data : "tag:foo"},{ fn : "query", expect : { fn : "testProperty", input : ["tag","foo"], out : false}, data : "-tag:foo"},{ fn : "query", expect : { fn : "testPropertyExclude", input : ["tag","foo"], out : true}, label : "testExclude", data : "-tag:foo"},{ fn : "query", expect : { fn : "test", input : [{ price : 5}], out : true}, data : ".foo price:5 -tag:foo"},{ fn : "query", expect : { fn : "test", input : [{ tag : "foo", price : 5}], out : false}, data : ".foo price:5 -tag:foo"}]);
|
Test.test([{ fn : "query", expect : { fn : "testProperty", input : ["price","10"], out : true}, data : "price:>=5"},{ fn : "query", expect : { fn : "testProperty", input : ["price","10"], out : false}, data : "price:>=15"},{ fn : "query", expect : { fn : "testProperty", input : ["price","4"], out : false}, data : "price:>=5"},{ fn : "query", expect : { fn : "testProperty", input : ["price","0"], out : false}, data : "price:>=5"},{ fn : "query", expect : { fn : "testProperty", input : ["price","1"], out : false}, label : "price=1", data : "price:>=5 price:0"},{ fn : "query", expect : { fn : "testProperty", input : ["price","0"], out : true}, label : "price=0", data : "price:>=5 price:0"},{ fn : "query", expect : { fn : "testProperty", input : ["price","6"], out : true}, label : "price=6", data : "price:>=5 price:0"},{ fn : "query", expect : { fn : "testProperty", input : ["tag","foo"], out : true}, data : "tag:foo"},{ fn : "query", expect : { fn : "testProperty", input : ["tag","foo"], out : false}, data : "-tag:foo"},{ fn : "query", expect : { fn : "testPropertyExclude", input : ["tag","foo"], out : true}, label : "testExclude", data : "-tag:foo"},{ fn : "query", expect : { fn : "test", input : [{ price : 5}], out : true}, data : ".foo price:5 -tag:foo"},{ fn : "query", expect : { fn : "test", input : [{ tag : "foo", price : 5}], out : false}, data : ".foo price:5 -tag:foo"}]);
|
||||||
if(Test.errors > 1) {
|
if(Test.errors > 1) {
|
||||||
|
@ -179,12 +179,12 @@ Test.test = function(spec) {
|
||||||
}
|
}
|
||||||
if(item.expect.fn == "testBrowserOverride") {
|
if(item.expect.fn == "testBrowserOverride") {
|
||||||
var item1 = item.expect.out;
|
var item1 = item.expect.out;
|
||||||
var this1 = xrfragment_URI.parse(item.data,xrfragment_XRF.BROWSER_OVERRIDE);
|
var this1 = xrfragment_URI.parse(item.data,xrfragment_XRF.NAVIGATOR);
|
||||||
valid = item1 == Object.prototype.hasOwnProperty.call(this1,item.expect.input);
|
valid = item1 == Object.prototype.hasOwnProperty.call(this1,item.expect.input);
|
||||||
}
|
}
|
||||||
if(item.expect.fn == "testEmbedOverride") {
|
if(item.expect.fn == "testEmbedOverride") {
|
||||||
var item2 = item.expect.out;
|
var item2 = item.expect.out;
|
||||||
var this2 = xrfragment_URI.parse(item.data,xrfragment_XRF.EMBED_OVERRIDE);
|
var this2 = xrfragment_URI.parse(item.data,xrfragment_XRF.EMBEDDED);
|
||||||
valid = item2 == Object.prototype.hasOwnProperty.call(this2,item.expect.input);
|
valid = item2 == Object.prototype.hasOwnProperty.call(this2,item.expect.input);
|
||||||
}
|
}
|
||||||
if(item.expect.fn == "equal.string") {
|
if(item.expect.fn == "equal.string") {
|
||||||
|
@ -330,27 +330,27 @@ xrfragment_Parser.parse = function(key,value,resultMap) {
|
||||||
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
|
||||||
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
|
||||||
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE;
|
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
|
||||||
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
|
||||||
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.BROWSER_OVERRIDE | xrfragment_XRF.EMBED_OVERRIDE | xrfragment_XRF.PROMPT;
|
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED | xrfragment_XRF.PROMPT;
|
||||||
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
|
||||||
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.BROWSER_OVERRIDE);
|
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
if(key.split(".").length > 1 && value.split(".").length > 1) {
|
||||||
|
@ -681,8 +681,8 @@ xrfragment_XRF.PROP_BIND = 2;
|
||||||
xrfragment_XRF.QUERY_OPERATOR = 4;
|
xrfragment_XRF.QUERY_OPERATOR = 4;
|
||||||
xrfragment_XRF.PROMPT = 8;
|
xrfragment_XRF.PROMPT = 8;
|
||||||
xrfragment_XRF.ROUNDROBIN = 16;
|
xrfragment_XRF.ROUNDROBIN = 16;
|
||||||
xrfragment_XRF.BROWSER_OVERRIDE = 32;
|
xrfragment_XRF.NAVIGATOR = 32;
|
||||||
xrfragment_XRF.EMBED_OVERRIDE = 64;
|
xrfragment_XRF.EMBEDDED = 64;
|
||||||
xrfragment_XRF.PV_OVERRIDE = 128;
|
xrfragment_XRF.PV_OVERRIDE = 128;
|
||||||
xrfragment_XRF.PV_EXECUTE = 256;
|
xrfragment_XRF.PV_EXECUTE = 256;
|
||||||
xrfragment_XRF.T_COLOR = 8192;
|
xrfragment_XRF.T_COLOR = 8192;
|
||||||
|
|
|
@ -390,7 +390,7 @@ class Test:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def main():
|
def main():
|
||||||
Test.test([_hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.xyz", 'input': "pos", 'out': False}), 'label': "equal.xyz: should trigger incompatible type)", 'data': "http://foo.com?foo=1#pos=1.2,2.2"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.xyz", 'input': "pos", 'out': "1.2,2.2,3"}), 'label': "equal.xyz", 'data': "http://foo.com?foo=1#pos=1.2,2.2,3"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.xy", 'input': "t", 'out': "1,100"}), 'label': "a equal.xy", 'data': "http://foo.com?foo=1#t=1,100"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testParsed", 'input': "prio", 'out': False}), 'label': "should trigger incompatible type", 'data': "http://foo.com?foo=1#prio=foo"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.multi", 'input': "pos", 'out': "c|d|1,2,3"}), 'label': "b equal.multi", 'data': "http://foo.com?foo=1#pos=c|d|1,2,3"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testBrowserOverride", 'input': "t", 'out': True}), 'label': "browser URI can override t (defined in asset)", 'data': "http://foo.com?foo=1#t=2,500"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testBrowserOverride", 'input': "q", 'out': False}), 'label': "browser URI cannot override q (defined in asset)", 'data': "http://foo.com?foo=1#q=-bar"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testBrowserOverride", 'input': "scale", 'out': False}), 'label': "scale does not have BROWSER_OVERRIDE set", 'data': "http://foo.com?foo=1#scale=2,2,2"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testEmbedOverride", 'input': "scale", 'out': True}), 'label': "embedded (src) URI can override scale", 'data': "http://foo.com?foo=1#scale=2,2,2"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPredefinedView", 'input': "mypredefinedview", 'out': True}), 'label': "test predefined view executed", 'data': "http://foo.com?foo=1#mypredefinedview"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPredefinedView", 'input': "another", 'out': True}), 'label': "test predefined view executed (multiple)", 'data': "http://foo.com?foo=1#mypredefinedview&another"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPredefinedView", 'input': "mypredefinedview", 'out': True}), 'label': "test predefined view executed (multiple)", 'data': "http://foo.com?foo=1#mypredefinedview&another"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPropertyAssign", 'input': "cube.position.x", 'out': True}), 'label': "test data assign", 'data': "#cube.position.x=music.position.x"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPropertyAssign", 'input': "cube.position.x", 'out': True}), 'label': "test one-way data bind", 'data': "#cube.position.x=@music.position.x"})])
|
Test.test([_hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.xyz", 'input': "pos", 'out': False}), 'label': "equal.xyz: should trigger incompatible type)", 'data': "http://foo.com?foo=1#pos=1.2,2.2"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.xyz", 'input': "pos", 'out': "1.2,2.2,3"}), 'label': "equal.xyz", 'data': "http://foo.com?foo=1#pos=1.2,2.2,3"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.xy", 'input': "t", 'out': "1,100"}), 'label': "a equal.xy", 'data': "http://foo.com?foo=1#t=1,100"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testParsed", 'input': "prio", 'out': False}), 'label': "should trigger incompatible type", 'data': "http://foo.com?foo=1#prio=foo"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "equal.multi", 'input': "pos", 'out': "c|d|1,2,3"}), 'label': "b equal.multi", 'data': "http://foo.com?foo=1#pos=c|d|1,2,3"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testBrowserOverride", 'input': "t", 'out': True}), 'label': "browser URI can override t (defined in asset)", 'data': "http://foo.com?foo=1#t=2,500"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testBrowserOverride", 'input': "q", 'out': False}), 'label': "browser URI cannot override q (defined in asset)", 'data': "http://foo.com?foo=1#q=-bar"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testBrowserOverride", 'input': "scale", 'out': False}), 'label': "scale does not have NAVIGATOR set", 'data': "http://foo.com?foo=1#scale=2,2,2"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testEmbedOverride", 'input': "scale", 'out': True}), 'label': "embedded (src) URI can override scale", 'data': "http://foo.com?foo=1#scale=2,2,2"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPredefinedView", 'input': "mypredefinedview", 'out': True}), 'label': "test predefined view executed", 'data': "http://foo.com?foo=1#mypredefinedview"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPredefinedView", 'input': "another", 'out': True}), 'label': "test predefined view executed (multiple)", 'data': "http://foo.com?foo=1#mypredefinedview&another"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPredefinedView", 'input': "mypredefinedview", 'out': True}), 'label': "test predefined view executed (multiple)", 'data': "http://foo.com?foo=1#mypredefinedview&another"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPropertyAssign", 'input': "cube.position.x", 'out': True}), 'label': "test data assign", 'data': "#cube.position.x=music.position.x"}), _hx_AnonObject({'fn': "url", 'expect': _hx_AnonObject({'fn': "testPropertyAssign", 'input': "cube.position.x", 'out': True}), 'label': "test one-way data bind", 'data': "#cube.position.x=@music.position.x"})])
|
||||||
Test.test([_hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "bar"], 'out': True}), 'data': "class:bar"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "bar"], 'out': True}), 'label': ".bar shorthand", 'data': ".bar"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': False}), 'data': ".bar -.foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'data': ".bar -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "bar"], 'out': True}), 'data': ".bar -.bar .bar"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo bar:5 .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo bar:>5 .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo bar:>5 .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["id", "foo"], 'out': False}), 'label': "!id:foo", 'data': ".foo -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["id", "foo"], 'out': True}), 'label': "id:foo?", 'data': "foo -foo foo"})])
|
Test.test([_hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "bar"], 'out': True}), 'data': "class:bar"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "bar"], 'out': True}), 'label': ".bar shorthand", 'data': ".bar"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': False}), 'data': ".bar -.foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'data': ".bar -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "bar"], 'out': True}), 'data': ".bar -.bar .bar"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo bar:5 .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo bar:>5 .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo bar:>5 .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["class", "foo"], 'out': True}), 'label': "class:foo", 'data': ".foo -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["id", "foo"], 'out': False}), 'label': "!id:foo", 'data': ".foo -.foo .foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["id", "foo"], 'out': True}), 'label': "id:foo?", 'data': "foo -foo foo"})])
|
||||||
Test.test([_hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "10"], 'out': True}), 'data': "price:>=5"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "10"], 'out': False}), 'data': "price:>=15"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "4"], 'out': False}), 'data': "price:>=5"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "0"], 'out': False}), 'data': "price:>=5"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "1"], 'out': False}), 'label': "price=1", 'data': "price:>=5 price:0"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "0"], 'out': True}), 'label': "price=0", 'data': "price:>=5 price:0"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "6"], 'out': True}), 'label': "price=6", 'data': "price:>=5 price:0"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["tag", "foo"], 'out': True}), 'data': "tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["tag", "foo"], 'out': False}), 'data': "-tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testPropertyExclude", 'input': ["tag", "foo"], 'out': True}), 'label': "testExclude", 'data': "-tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "test", 'input': [_hx_AnonObject({'price': 5})], 'out': True}), 'data': ".foo price:5 -tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "test", 'input': [_hx_AnonObject({'tag': "foo", 'price': 5})], 'out': False}), 'data': ".foo price:5 -tag:foo"})])
|
Test.test([_hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "10"], 'out': True}), 'data': "price:>=5"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "10"], 'out': False}), 'data': "price:>=15"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "4"], 'out': False}), 'data': "price:>=5"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "0"], 'out': False}), 'data': "price:>=5"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "1"], 'out': False}), 'label': "price=1", 'data': "price:>=5 price:0"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "0"], 'out': True}), 'label': "price=0", 'data': "price:>=5 price:0"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["price", "6"], 'out': True}), 'label': "price=6", 'data': "price:>=5 price:0"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["tag", "foo"], 'out': True}), 'data': "tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testProperty", 'input': ["tag", "foo"], 'out': False}), 'data': "-tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "testPropertyExclude", 'input': ["tag", "foo"], 'out': True}), 'label': "testExclude", 'data': "-tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "test", 'input': [_hx_AnonObject({'price': 5})], 'out': True}), 'data': ".foo price:5 -tag:foo"}), _hx_AnonObject({'fn': "query", 'expect': _hx_AnonObject({'fn': "test", 'input': [_hx_AnonObject({'tag': "foo", 'price': 5})], 'out': False}), 'data': ".foo price:5 -tag:foo"})])
|
||||||
if (Test.errors > 1):
|
if (Test.errors > 1):
|
||||||
|
@ -425,9 +425,9 @@ class Test:
|
||||||
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "testPropertyAssign"):
|
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "testPropertyAssign"):
|
||||||
valid = (python_Boot.hasField(res,Reflect.field(Reflect.field(item,"expect"),"input")) and (HxOverrides.eq(Reflect.field(Reflect.field(item,"expect"),"out"),Reflect.field(Reflect.field(res,Reflect.field(Reflect.field(item,"expect"),"input")),"is")(xrfragment_XRF.PROP_BIND))))
|
valid = (python_Boot.hasField(res,Reflect.field(Reflect.field(item,"expect"),"input")) and (HxOverrides.eq(Reflect.field(Reflect.field(item,"expect"),"out"),Reflect.field(Reflect.field(res,Reflect.field(Reflect.field(item,"expect"),"input")),"is")(xrfragment_XRF.PROP_BIND))))
|
||||||
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "testBrowserOverride"):
|
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "testBrowserOverride"):
|
||||||
valid = (Reflect.field(Reflect.field(item,"expect"),"out") == python_Boot.hasField(xrfragment_URI.parse(Reflect.field(item,"data"),xrfragment_XRF.BROWSER_OVERRIDE),Reflect.field(Reflect.field(item,"expect"),"input")))
|
valid = (Reflect.field(Reflect.field(item,"expect"),"out") == python_Boot.hasField(xrfragment_URI.parse(Reflect.field(item,"data"),xrfragment_XRF.NAVIGATOR),Reflect.field(Reflect.field(item,"expect"),"input")))
|
||||||
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "testEmbedOverride"):
|
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "testEmbedOverride"):
|
||||||
valid = (Reflect.field(Reflect.field(item,"expect"),"out") == python_Boot.hasField(xrfragment_URI.parse(Reflect.field(item,"data"),xrfragment_XRF.EMBED_OVERRIDE),Reflect.field(Reflect.field(item,"expect"),"input")))
|
valid = (Reflect.field(Reflect.field(item,"expect"),"out") == python_Boot.hasField(xrfragment_URI.parse(Reflect.field(item,"data"),xrfragment_XRF.EMBEDDED),Reflect.field(Reflect.field(item,"expect"),"input")))
|
||||||
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "equal.string"):
|
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "equal.string"):
|
||||||
valid = (Reflect.field(res,Reflect.field(Reflect.field(item,"expect"),"input")) and (HxOverrides.eq(Reflect.field(Reflect.field(item,"expect"),"out"),Reflect.field(Reflect.field(res,Reflect.field(Reflect.field(item,"expect"),"input")),"string"))))
|
valid = (Reflect.field(res,Reflect.field(Reflect.field(item,"expect"),"input")) and (HxOverrides.eq(Reflect.field(Reflect.field(item,"expect"),"out"),Reflect.field(Reflect.field(res,Reflect.field(Reflect.field(item,"expect"),"input")),"string"))))
|
||||||
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "equal.xy"):
|
if (Reflect.field(Reflect.field(item,"expect"),"fn") == "equal.xy"):
|
||||||
|
@ -1411,27 +1411,27 @@ class xrfragment_Parser:
|
||||||
Frag.h["#"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW)
|
Frag.h["#"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW)
|
||||||
Frag.h["class"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["class"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["src"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_URL)
|
Frag.h["src"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_URL)
|
||||||
Frag.h["pos"] = ((((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.T_STRING_OBJ) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["pos"] = ((((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.T_STRING_OBJ) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["href"] = ((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.T_PREDEFINED_VIEW)
|
Frag.h["href"] = ((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.T_PREDEFINED_VIEW)
|
||||||
Frag.h["q"] = ((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["q"] = ((xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["scale"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["scale"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["rot"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["rot"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["translate"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["translate"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["visible"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_INT) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["visible"] = ((((xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_INT) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["env"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["env"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["t"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["t"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.ROUNDROBIN) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["gravity"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["gravity"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["physics"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["physics"] = (((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR3) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["fov"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_INT) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["fov"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_INT) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["clip"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["clip"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_VECTOR2) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["fog"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE)
|
Frag.h["fog"] = ((((xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.T_STRING) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED)
|
||||||
Frag.h["namespace"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["namespace"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["SPDX"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["SPDX"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["unit"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["unit"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["description"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
Frag.h["description"] = (xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING)
|
||||||
Frag.h["session"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.BROWSER_OVERRIDE) | xrfragment_XRF.EMBED_OVERRIDE) | xrfragment_XRF.PROMPT)
|
Frag.h["session"] = (((((xrfragment_XRF.ASSET | xrfragment_XRF.T_URL) | xrfragment_XRF.PV_OVERRIDE) | xrfragment_XRF.NAVIGATOR) | xrfragment_XRF.EMBEDDED) | xrfragment_XRF.PROMPT)
|
||||||
if ((len(value) == 0) and (not (key in Frag.h))):
|
if ((len(value) == 0) and (not (key in Frag.h))):
|
||||||
value1 = xrfragment_XRF(key,(xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.BROWSER_OVERRIDE))
|
value1 = xrfragment_XRF(key,(xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR))
|
||||||
setattr(resultMap,(("_hx_" + key) if ((key in python_Boot.keywords)) else (("_hx_" + key) if (((((len(key) > 2) and ((ord(key[0]) == 95))) and ((ord(key[1]) == 95))) and ((ord(key[(len(key) - 1)]) != 95)))) else key)),value1)
|
setattr(resultMap,(("_hx_" + key) if ((key in python_Boot.keywords)) else (("_hx_" + key) if (((((len(key) > 2) and ((ord(key[0]) == 95))) and ((ord(key[1]) == 95))) and ((ord(key[(len(key) - 1)]) != 95)))) else key)),value1)
|
||||||
return True
|
return True
|
||||||
if ((len(key.split(".")) > 1) and ((len(value.split(".")) > 1))):
|
if ((len(key.split(".")) > 1) and ((len(value.split(".")) > 1))):
|
||||||
|
@ -1679,7 +1679,7 @@ class xrfragment_XRF:
|
||||||
__slots__ = ("fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query")
|
__slots__ = ("fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query")
|
||||||
_hx_fields = ["fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query"]
|
_hx_fields = ["fragment", "flags", "x", "y", "z", "color", "string", "int", "float", "args", "query"]
|
||||||
_hx_methods = ["is", "validate", "guessType"]
|
_hx_methods = ["is", "validate", "guessType"]
|
||||||
_hx_statics = ["ASSET", "PROP_BIND", "QUERY_OPERATOR", "PROMPT", "ROUNDROBIN", "BROWSER_OVERRIDE", "EMBED_OVERRIDE", "PV_OVERRIDE", "PV_EXECUTE", "T_COLOR", "T_INT", "T_FLOAT", "T_VECTOR2", "T_VECTOR3", "T_URL", "T_PREDEFINED_VIEW", "T_STRING", "T_STRING_OBJ", "T_STRING_OBJ_PROP", "isColor", "isInt", "isFloat", "isVector", "isUrl", "isUrlOrPretypedView", "isString", "set", "unset"]
|
_hx_statics = ["ASSET", "PROP_BIND", "QUERY_OPERATOR", "PROMPT", "ROUNDROBIN", "NAVIGATOR", "EMBEDDED", "PV_OVERRIDE", "PV_EXECUTE", "T_COLOR", "T_INT", "T_FLOAT", "T_VECTOR2", "T_VECTOR3", "T_URL", "T_PREDEFINED_VIEW", "T_STRING", "T_STRING_OBJ", "T_STRING_OBJ_PROP", "isColor", "isInt", "isFloat", "isVector", "isUrl", "isUrlOrPretypedView", "isString", "set", "unset"]
|
||||||
|
|
||||||
def __init__(self,_fragment,_flags):
|
def __init__(self,_fragment,_flags):
|
||||||
self.query = None
|
self.query = None
|
||||||
|
@ -1770,8 +1770,8 @@ xrfragment_XRF.PROP_BIND = 2
|
||||||
xrfragment_XRF.QUERY_OPERATOR = 4
|
xrfragment_XRF.QUERY_OPERATOR = 4
|
||||||
xrfragment_XRF.PROMPT = 8
|
xrfragment_XRF.PROMPT = 8
|
||||||
xrfragment_XRF.ROUNDROBIN = 16
|
xrfragment_XRF.ROUNDROBIN = 16
|
||||||
xrfragment_XRF.BROWSER_OVERRIDE = 32
|
xrfragment_XRF.NAVIGATOR = 32
|
||||||
xrfragment_XRF.EMBED_OVERRIDE = 64
|
xrfragment_XRF.EMBEDDED = 64
|
||||||
xrfragment_XRF.PV_OVERRIDE = 128
|
xrfragment_XRF.PV_OVERRIDE = 128
|
||||||
xrfragment_XRF.PV_EXECUTE = 256
|
xrfragment_XRF.PV_EXECUTE = 256
|
||||||
xrfragment_XRF.T_COLOR = 8192
|
xrfragment_XRF.T_COLOR = 8192
|
||||||
|
|
Loading…
Reference in New Issue