url
类型
索引
属性(properties)
_rawAssets
Object
The base url of raw assets._builtinRawAssets
Object
The base url of builtin raw assets.
方法
raw
Returns the url of raw assets, you will only need this if the raw asset is inside the "resources" folder.builtinRaw
Returns the url of builtin raw assets. This method can only used in editor.
Details
属性(properties)
_rawAssets
The base url of raw assets.
meta | description |
---|---|
类型 | Object |
定义于 | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/url.js:38 |
_builtinRawAssets
The base url of builtin raw assets.
meta | description |
---|---|
类型 | Object |
定义于 | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/url.js:46 |
方法
raw
Returns the url of raw assets, you will only need this if the raw asset is inside the "resources" folder.
meta | description |
---|---|
返回 | String |
定义于 | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/url.js:66 |
参数列表
url
String
示例
---
var url = cc.url.raw("textures/myTexture.png");
console.log(url); // "resources/raw/textures/myTexture.png"
builtinRaw
Returns the url of builtin raw assets. This method can only used in editor.
meta | description |
---|---|
返回 | String |
定义于 | https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/url.js:94 |
参数列表
url
String
示例
---
var url = cc.url.builtinRaw("textures/myTexture.png");
console.log(url); // "resources/default-raw/textures/myTexture.png"