我正在尝试将一个3D立方体添加到Kinetic JS画布中,以显示x、y、z旋转。我找到了这篇文章http://www.tonicodes.net/blog/combining-three-js-and-kineticjs。我使用版本3.8进行了操作,当我尝试使用版本4的Kinetic JS跟随示例时,出现了以下错误:
Unable to get property 'appendChild'
任何建议,解决它或在canvas中包含3D立方体的更好方法。
完整项目http://jsfiddle.net/user373721/hXw6D/1/。
我找到了这个完美的例子http://html5example.net/entry/html5-canvas/html5-canvas-pre3d-rotating-cube,不幸的是它是基于pre3d.js编写的,而我不知道如何与Kinetic JS canvas集成。