Giter VIP home page Giter VIP logo

ccc-devtools's Introduction

ccc-devtools's People

Contributors

lihuilai avatar potato47 avatar wheatup avatar z503722728 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ccc-devtools's Issues

2.0.9 版本的Creator 安装后报如下错误

Error: E:\devSoftWare\Creator209\CocosCreator\resources\static\preview-templates\index.jade:38
36| div#recompiling
37| span Recompiling scripts, please wait for refresh...

38| include ./ccc-devtools/index.html
39| script(type='text/javascript' charset='utf-8' src='settings.js')
40| script(type='text/javascript' charset='utf-8' src='app/editor/static/preview-templates/modular.js')
41| script(type='text/javascript' charset='utf-8' src='app/editor/static/preview-templates/boot.js')

Invalid indentation, you can use tabs or spaces but not both
at Lexer.indent (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\lexer.js:790:15)
at Lexer.next (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\lexer.js:941:15)
at Lexer.lookahead (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\lexer.js:113:46)
at Parser.lookahead (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:102:23)
at Parser.peek (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:79:17)
at Parser.tag (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:832:30)
at Parser.parseTag (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:759:17)
at Parser.parseExpr (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:211:21)
at Parser.block (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:729:25)
at Parser.tag (E:\devSoftWare\Creator209\CocosCreator\resources\app.asar\node_modules\jade\lib\parser.js:838:24)

啥时候支持下3.6,貌似报错了

Error: UI element #error .error-stack doesn't exist.
at e._queryChecked (http://localhost:7456/preview-app/ui.js:1:7508)
at new e (http://localhost:7456/preview-app/ui.js:1:1250)
at http://localhost:7456/preview-app/index.js:1:2404
at http://localhost:7456/preview-app/index.js:1:1380
at Object.next (http://localhost:7456/preview-app/index.js:1:1485)
at c (http://localhost:7456/preview-app/index.js:1:202) {stack: 'Error: UI element #error .error-stack doesn't…://localhost:7456/preview-app/index.js:1:202)', message: 'UI element #error .error-stack doesn't exist.'}

DevTools failed to parse SourceMap

升级到2.3.3后,在浏览器预览时所有代码会预先合成一个文件再加载。虽然提高了加载速度,但是抛异常的话无法清晰地定位。
关闭这一特性的方法时在~/.CocosCreator/profiles/features.json文件中加入如下配置:
"bundle-quick-compiler-project": false
但是浏览器却会报错:

DevTools failed to parse SourceMap

升级到2.3.3后,在浏览器预览时所有代码会预先合成一个文件再加载。虽然提高了加载速度,但是抛异常的话无法清晰地定位。
关闭这一特性的方法时在~/.CocosCreator/profiles/features.json文件中加入如下配置:
"bundle-quick-compiler-project": false

DevTools failed to parse SourceMap

升级到2.3.3后,在浏览器预览时所有代码会预先合成一个文件再加载。虽然提高了加载速度,但是抛异常的话无法清晰地定位。
关闭这一特性的方法时在~/.CocosCreator/profiles/features.json文件中加入如下配置:
"bundle-quick-compiler-project": false
但是浏览器却会报警告:
DevTools failed to parse SourceMap
Screen Shot 2020-04-17 at 1 02 52 PM
希望能解决下,谢谢!

Can't open button menu

When i click button and brower log error like bollow image. What can i do to fix this. Thank you!
image
image

引擎键盘按键事件失效

目前处理方式: 在canvas标签里面加了tabindex属性。
如果有更好的方式解决后麻烦告知一下哈,谢谢 ^-^

在调试信息里的信息怎么不能实时更新?

cocos creator v2.2.2 版本, chrome 版本 74.0.3729.108(正式版本) (64 位)。
在creator里点击运行按钮在浏览器里运行demo,然后打开插件的调试信息面板,demo里的node 在移动,但是调试信息面板里node的位置信息不变,只有重新鼠标点击相应的node节点,位置信息才会刷新。 调试面板的自动刷新开发打开/关闭都试了,也不行。

请问这个问题怎么解决?

CocosCreator 2.4.2 获取纹理缓存时报错

问题描述

点击查看纹理缓存按钮之后报错

vue.min.js:6 TypeError: Cannot read property 'name' of undefined
at Object.cc.cache (cc-console-utils.js:137)
at wn.openCacheDialog (preview.js:152)
at He (vue.min.js:6)
at HTMLButtonElement.n (vue.min.js:6)
at HTMLButtonElement.Yr.o._wrapper (vue.min.js:6)  

原因

cocosCreator2.4.2 缓存的数据结构变动导致获取数据报错。

举例

比如下面是在版本2.4.2,获取的单个纹理的数据结构:

item: cc_EffectAsset
    isValid: true
    loaded: true
    name: "builtin-2d-graphics"
    nativeUrl: ""
    properties: null
    refCount: 2
    shaders: [{…}]
    techniques: [{…}]
    __asyncLoadAssets__: undefined
    __depends__: undefined
    _effect: Effect {_dirty: true, _name: "builtin-2d-graphics", _technique: Technique, _techniques: Array(1), _asset: cc_EffectAsset}
    _name: "builtin-2d-graphics"
    _native: ""
    _nativeAsset: undefined
    _nativeDep: undefined
    _nativeUrl: ""
    _objFlags: 0
    _ref: 2
    url: ""
    _uuid: "30682f87-9f0d-4f17-8a44-72863791461b"
    __proto__: cc_Asset
  

cc.cache = function () {
let rawCacheData = cc.loader._cache;
let cacheData = [];
let totalTextureSize = 0;
for (let k in rawCacheData) {
let item = rawCacheData[k];
if (item.type !== 'js' && item.type !== 'json') {
let itemName = '_';
let preview = '';
let content = (item.content && item.content.__classname__) ? item.content.__classname__ : item.type;
let formatSize = -1;
if (item.type === 'png' || item.type === 'jpg') {
let texture = rawCacheData[k.replace('.' + item.type, '.json')];
if (texture && texture._owner && texture._owner._name) {
itemName = texture._owner._name;
preview = texture.content.url;
}
} else {
if (item.content.name && item.content.name.length > 0) {
itemName = item.content.name;
} else if (item._owner) {
itemName = (item._owner && item._owner.name) || '_';
}
if (content === 'cc.Texture2D') {
let texture = item.content;
preview = texture.url;
let textureSize = texture.width * texture.height * ((texture._native === '.jpg' ? 3 : 4) / 1024 / 1024);
totalTextureSize += textureSize;
// sizeStr = textureSize.toFixed(3) + 'M';
formatSize = Math.round(textureSize * 1000) / 1000;
} else if (content === 'cc.SpriteFrame') {
preview = item.content._texture.url;
}

cc-console-utils.js 中的cach方法中获取的item对象:

  • content 节点
  • type 节点
    通通都都不见了 😂

测试附件📎

说明:附件是2.4.2编辑器自带的 helloworld-typescript项目
test-ccc-devtools.zip

✅ 解决方法

在这段代码后添加: if(!item.content) item.content=item;

let item = rawCacheData[k];

方法来自论坛回复

API 升级建议

let rawCacheData = cc.loader._cache;

官方文档 v2.4 资源管理模块升级指南

// 由于v2.4资源管理模块,所以获取缓存的代码,可替换成cc.assetManager来获取。

let rawCacheData = cc.assetManager.assets._map;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.