Combining three.js and KineticJS - 3D cube

霸气de小男生 提交于 2019-12-06 01:57:43

So I have managed to fix my sample from the linked blog post, see the result here: http://tonicodes.net/sandbox/html5/kthree/index.htm.

Several things have changed from my last post.:

Kinetic initialization is done differently now:

stage = new Kinetic.Stage({
    container: "container",
    width: 700,
    height: 700
});

Also, you should supply canvas element provided by HTML5, not the one Kinetic wraps around it:

renderer = new THREE.CanvasRenderer({canvas: layer3D.getCanvas().getElement()});

I also fixed your jsFiddle: http://jsfiddle.net/hXw6D/3/, check it out. You forgot to add another div element with id container.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!