cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

[v3.0]some issues when upgrading from v2.2 #1708

Closed btspoony closed 10 years ago

btspoony commented 10 years ago

https://github.com/cocos2d/cocos2d-html5/blob/8842c38c3fe975c710d885a360e293e223f5541c/extensions/gui/scrollview/CCTableView.js#L615-L616 are these two lines useless?

https://github.com/cocos2d/cocos2d-html5/blob/8842c38c3fe975c710d885a360e293e223f5541c/extensions/gui/scrollview/CCScrollView.js#L297 using deprecated api cause warning

and an error in webgl mode ( renderMode:1 ), canvas mode is ok. related file: https://github.com/cocos2d/cocos2d-html5/blob/8842c38c3fe975c710d885a360e293e223f5541c/cocos2d/effects/CCGrabber.js#L40 here is the stack trace

Uncaught TypeError: Object #<CanvasRenderingContext2D> has no method 'createFramebuffer' CCGrabber.js:40
cc.Grabber.cc.Class.extend.ctor CCGrabber.js:40
Class CCClass.js:129
cc.GridBase.cc.Class.extend.initWithSize CCGrid.js:189
cc.TiledGrid3D.create CCGrid.js:703
cc.TiledGrid3DAction.cc.GridAction.extend.getGrid CCActionGrid.js:198
cc.GridAction.cc.ActionInterval.extend.startWithTarget CCActionGrid.js:49
cc.Sequence.cc.ActionInterval.extend.update CCActionInterval.js:266
cc.Sequence.cc.ActionInterval.extend.update CCActionInterval.js:268
cc.ActionInterval.cc.FiniteTimeAction.extend.step CCActionInterval.js:108
cc.ActionManager.cc.Class.extend.update CCActionManager.js:348
cc.Scheduler.cc.Class.extend.update CCScheduler.js:415
cc.Director.cc.Class.extend.drawScene CCDirector.js:327
cc.DisplayLinkDirector.cc.Director.extend.mainLoop CCDirector.js:1137
callback CCBoot.js:1565
dingpinglv commented 10 years ago

Thank you for your feedback. We'll fix them soon

dingpinglv commented 10 years ago

Hi, @btspoony

https://github.com/cocos2d/cocos2d-html5/blob/8842c38c3fe975c710d885a360e293e223f5541c/extensions/gui/scrollview/CCTableView.js#L615-L616

Why are these two lines useless?

dingpinglv commented 10 years ago

And about this error "Uncaught TypeError: Object # has no method 'createFramebuffer' CCGrabber.js:40"

The tip information "CanvasRenderingContext2D" means that the render mode in on Canvas mode.

I don't know why does change the cc._renderContext reference, Could you please send a demo to me(dingping.lv@cocos2d-x.org)?

btspoony commented 10 years ago

about https://github.com/cocos2d/cocos2d-html5/blob/8842c38c3fe975c710d885a360e293e223f5541c/extensions/gui/scrollview/CCTableView.js#L615-L616

  1. this.getBoundingBox() return cc.Rect, without the property "_origin" (cause undefined error...)
  2. only this setter, no anywhere to use it
btspoony commented 10 years ago

sorry for issue this error "Uncaught TypeError: Object # has no method 'createFramebuffer' CCGrabber.js:40"

renderMode: 0 means webgl, 1 means canvas. i am confused with "cc._RENDER_TYPE_WEBGL = 1;"

so, this error should be occured in canvas mode, webgl mode is OK

dingpinglv commented 10 years ago

cc.TiledGrid3DAction supports WebGL mode only. I'll add some error information in these actions when the render mode doesn't equal WebGL

Thanks for feedback.

dingpinglv commented 10 years ago

@btspoony Yes, cc.Rect's "_origin" has been deleted. Thanks for reminding.