Commit 2523b4d3 authored by wangjianfeng.yz's avatar wangjianfeng.yz

2.0.46

parent 9cd4374e
declare namespace FYGE{export const VERSION = "2.0.45";
declare namespace FYGE{export const VERSION = "2.0.46";
export function cos(angle: number): number;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
export const VERSION = "2.0.45";
export const VERSION = "2.0.46";
export function cos(angle: number): number;
......
{
"name": "fyge",
"version": "2.0.45",
"version": "2.0.46",
"description": "canvas渲染引擎",
"main": "./build/fyge.min.js",
"module": "./build/fyge.esm.js",
......
......@@ -468,7 +468,9 @@
utile的index里去掉toDisplayDataURL导出,isWebGLSupported方法移到tbminAdpate里
tbminAdpate里新增tt,改动较大,待测试,且新增getDevicePixelRatio,getOsType,预留initedByTtEnv方法
2.0.45 使用rollup打包,(待测试,包括web和淘宝环境)
2.0.45 使用rollup打包,(待测试,包括web和淘宝环境),esm模式待测试
2.0.46 Loader的loadRawWeb方法修改,去掉原先的onerror,onreadystatechange里判断改成readyState为4下,2XX或304为成功,其余状态失败
......
......@@ -7,7 +7,7 @@
* @name VERSION
* @type {string}
*/
export const VERSION = "2.0.45";
export const VERSION = "2.0.46";
/**
......
......@@ -158,13 +158,23 @@ export class Loader extends EventDispatcher {
_req.responseType = type;
_req.send();
_req.onreadystatechange = () => {
if (_req.readyState == 4 && _req.status == 200) {
callback(true, _req.response)
// if (_req.readyState == 4 && _req.status == 200) {
// callback(true, _req.response)
// }
if (_req.readyState == 4) {
var status = _req.status;
if ((status >= 200 && status < 300) ||//2XX表示有效响应
status == 304//304意味着是从缓存读取
) {
callback(true, _req.response)
} else {
callback(false, "request.status:" + status)
}
}
};
_req.onerror = (reason): void => {
callback(false, reason)
}
// _req.onerror = (reason): void => {
// callback(false, reason)
// }
}
}
/**
......
......@@ -67,7 +67,9 @@
// }
// })
// })
FYGE.GlobalLoader.loadRawWeb((s,res)=>{
console.log(s,res)
},"//yun.asd.com.cn/asd.spi")
var sysInfo;
//@ts-ignore 存在my就初始化
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment