hiloteam / Hilo

A Cross-end HTML5 Game development solution
https://hiloteam.github.io/
MIT License
5.93k stars 863 forks source link

1.1.4版本,renderType为dom,框架报错了,原因为这一行代码有问题,望修复 #105

Closed hyr910331 closed 6 years ago

hyr910331 commented 6 years ago

源码如下: `import Stage from '../../../common/js/Hilo/view/Stage'; import Ticker from '../../../common/js/Hilo/util/Ticker'; import Bitmap from '../../../common/js/Hilo/view/Bitmap'; import style from '../../../common/css/common.css';

let width = document.body.clientWidth; let height = document.body.clientHeight; let containerElem = document.getElementById('container');

let stage = new Stage({ renderType:'dom', container: containerElem, width: width, height: height });

let ticker = new Ticker(60); ticker.addTick(stage); ticker.start();

let bird = new Bitmap({ image: '../../../assets/stage.jpg' }).addTo(stage); }).addTo(stage);`

image

报错的代码为 if(view === this.stage || view.clipChildren) style.overflow = "hidden";

这里的this是undefined

06wj commented 6 years ago

http://hiloteam.github.io/Hilo/examples/Bitmap.html?dom 有在线链接么 我试了下demo没有问题