[]LayaAir2在编辑器里面新建默认的3D项目(TS语言),无法完成编译和运行。
输出如下:
打开 LayaAir3D.ts 文件,发现报了5条错误:
是不是新建3D项目的模板还没换号啊?
开始编译
--------------------------------------
[19:13:20] Working directory changed to C:\GreenSoft\LayaAirIDE_beta\resources\app
[19:13:20] Using gulpfile ~\Documents\LayaBox2\Demo_MyLaya3DWithWechat2\.laya\gulpfile.js
[19:13:20] Starting 'default'...
[19:13:20] Finished 'default' after 434 ms
--------------------------------------
编译结束,耗时1.469s
出错了:
TypeScript error: src/layaair3d.ts(26,24): Error TS2339: Property 'direction' does not exist on type 'DirectionLight'.
打开 LayaAir3D.ts 文件,发现报了5条错误:
是不是新建3D项目的模板还没换号啊?
没有找到相关结果
已邀请:
3 个回复
hj
赞同来自:
虎翼
赞同来自:
hj
赞同来自:
请看一下文档,你的方法用错了,当然会报错