Cocos Creator API

1.0.0

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

url

Module: cc

Properties

_rawAssets Object private readOnly

The base url of raw assets.

_builtinRawAssets Object private readOnly

The base url of builtin raw assets.

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Methods

raw
(
  • url
)
String

Returns the url of raw assets, you will only need this if the raw asset is inside the "resources" folder.

name type description
url String

returns:

type: String

examples:

---
var url = cc.url.raw("textures/myTexture.png");
console.log(url);   // "resources/raw/textures/myTexture.png"

builtinRaw
(
  • url
)
String

Returns the url of builtin raw assets. This method can only used in editor.

name type description
url String

returns:

type: String

examples:

---
var url = cc.url.builtinRaw("textures/myTexture.png");
console.log(url);   // "resources/default-raw/textures/myTexture.png"

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index