{"action":"created","issue":{"url":"https://api.github.com/repos/fireball-x/fireball/issues/140","labels_url":"https://api.github.com/repos/fireball-x/fireball/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/fireball-x/fireball/issues/140/comments","events_url":"https://api.github.com/repos/fireball-x/fireball/issues/140/events","html_url":"https://github.com/fireball-x/fireball/issues/140","id":96466654,"number":140,"title":"Support loading from raw assets in engine-framework","user":{"login":"jareguo","id":1503156,"avatar_url":"https://avatars.githubusercontent.com/u/1503156?v=3","gravatar_id":"","url":"https://api.github.com/users/jareguo","html_url":"https://github.com/jareguo","followers_url":"https://api.github.com/users/jareguo/followers","following_url":"https://api.github.com/users/jareguo/following{/other_user}","gists_url":"https://api.github.com/users/jareguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jareguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jareguo/subscriptions","organizations_url":"https://api.github.com/users/jareguo/orgs","repos_url":"https://api.github.com/users/jareguo/repos","events_url":"https://api.github.com/users/jareguo/events{/privacy}","received_events_url":"https://api.github.com/users/jareguo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"jareguo","id":1503156,"avatar_url":"https://avatars.githubusercontent.com/u/1503156?v=3","gravatar_id":"","url":"https://api.github.com/users/jareguo","html_url":"https://github.com/jareguo","followers_url":"https://api.github.com/users/jareguo/followers","following_url":"https://api.github.com/users/jareguo/following{/other_user}","gists_url":"https://api.github.com/users/jareguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jareguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jareguo/subscriptions","organizations_url":"https://api.github.com/users/jareguo/orgs","repos_url":"https://api.github.com/users/jareguo/repos","events_url":"https://api.github.com/users/jareguo/events{/privacy}","received_events_url":"https://api.github.com/users/jareguo/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/fireball-x/fireball/milestones/9","html_url":"https://github.com/fireball-x/fireball/milestones/Fireball%200.5%20beta","labels_url":"https://api.github.com/repos/fireball-x/fireball/milestones/9/labels","id":1208530,"number":9,"title":"Fireball 0.5 beta","description":" - Building Pipeline ( scene list, test ) @jare\r\n - Mixin Behavior @jare\r\n - Screen Resolution Policy @jwu\r\n - Improve the reloading time of the scene-view @2you\r\n - Restore the collapse state in hierarchy panel when game stop playing @jwu\r\n - loadScene by name ( this need core-leve maintain a scene table) @jwu\r\n - Support plist atlas @2you\r\n - Custom Asset @jwu\r\n - First time open needs check reimport and re-compile script @jwu\r\n - Help (check nantas' whishlist) @kami\r\n - Duplicate Node\r\n - make a node child of another node will change it's world position\r\n - About Window @kami\r\n - Add slidable in editor-prop @kami\r\n - robust AssetDB watch method @jwu","creator":{"login":"jwu","id":174891,"avatar_url":"https://avatars.githubusercontent.com/u/174891?v=3","gravatar_id":"","url":"https://api.github.com/users/jwu","html_url":"https://github.com/jwu","followers_url":"https://api.github.com/users/jwu/followers","following_url":"https://api.github.com/users/jwu/following{/other_user}","gists_url":"https://api.github.com/users/jwu/gists{/gist_id}","starred_url":"https://api.github.com/users/jwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwu/subscriptions","organizations_url":"https://api.github.com/users/jwu/orgs","repos_url":"https://api.github.com/users/jwu/repos","events_url":"https://api.github.com/users/jwu/events{/privacy}","received_events_url":"https://api.github.com/users/jwu/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":32,"state":"open","created_at":"2015-07-15T04:52:43Z","updated_at":"2015-08-04T04:00:52Z","due_on":"2015-08-08T16:00:00Z","closed_at":null},"comments":8,"created_at":"2015-07-22T03:25:31Z","updated_at":"2015-08-04T04:00:53Z","closed_at":"2015-08-04T04:00:52Z","body":"提供一个接口，用来让用户获得 raw file 的实际加载路径。\r\n接口形如：\r\n```\r\nFire.url('raw://foo');\r\nFire.raw('foo/bar.atlas');\r\nFire.raw + 'foo/bar.atlas';\r\n```\r\n\r\n`Fire.url('raw://foo');` 看起来很优雅，好处是将来可以加入其它 protocol，这样用户可以用一种方式处理所有 protocol。但如果我们不能提供给用户更多的 protocol，这个接口就是用户的负担，用户必须写很多协议的拼装代码才行（`\"raw://\" + path`）。\r\n```\r\nvar preloadAssets = ...;    // read from anywhere\r\nvar paths = preloadAssets.map(function (path) {\r\n    return Fire.url('raw://' + path);\r\n});\r\n```\r\n\r\n`Fire.raw('foo/bar.atlas');` 能帮用户省去协议拼装操作，看起来一样很清爽。但用户如果不看文档，可能不能理解这个接口做了什么。他有可能认为我们会将路径神奇的处理成 `.../raw/00/45423154646.atlas`，一定要用这个接口 cocos 才能加载得到东西，那么那些 cocos 内部需要关联加载的文件怎么办？\r\n\r\n`Fire.raw + 'foo/bar.atlas';` 是最直白的，避免了以上所有问题，也是我觉得用得最爽的接口。"},"comment":{"url":"https://api.github.com/repos/fireball-x/fireball/issues/comments/127471175","html_url":"https://github.com/fireball-x/fireball/issues/140#issuecomment-127471175","issue_url":"https://api.github.com/repos/fireball-x/fireball/issues/140","id":127471175,"user":{"login":"jareguo","id":1503156,"avatar_url":"https://avatars.githubusercontent.com/u/1503156?v=3","gravatar_id":"","url":"https://api.github.com/users/jareguo","html_url":"https://github.com/jareguo","followers_url":"https://api.github.com/users/jareguo/followers","following_url":"https://api.github.com/users/jareguo/following{/other_user}","gists_url":"https://api.github.com/users/jareguo/gists{/gist_id}","starred_url":"https://api.github.com/users/jareguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jareguo/subscriptions","organizations_url":"https://api.github.com/users/jareguo/orgs","repos_url":"https://api.github.com/users/jareguo/repos","events_url":"https://api.github.com/users/jareguo/events{/privacy}","received_events_url":"https://api.github.com/users/jareguo/received_events","type":"User","site_admin":false},"created_at":"2015-08-04T04:00:52Z","updated_at":"2015-08-04T04:00:52Z","body":"raw 方案暂时不加"}}