axmol/scripting/javascript/bindings/js/jsb_sys.js

48 lines
836 B
JavaScript
Raw Normal View History

//
// sys properties
//
var sys = sys || {};
Object.defineProperties(sys,
{
"capabilities" : {
get : function(){
var capabilities = {"opengl":true};
if( sys.platform == 'mobile' ) {
capabilities["accelerometer"] = true;
capabilities["touches"] = true;
} else {
// desktop
capabilities["keyboard"] = true;
capabilities["mouse"] = true;
}
return capabilities;
},
enumerable : true,
configurable : true
},
"os" : {
get : function(){
return __getOS();
},
enumerable : true,
configurable : true
},
"platform" : {
get : function(){
return __getPlatform();
},
enumerable : true,
configurable : true
},
"version" : {
get : function(){
return __getVersion();
},
enumerable : true,
configurable : true
}
});