大约有 234 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0092 秒)
... import GameConfig from "./GameConfig"; class Main { //private scene:Laya.Scene3D; private text:Laya.Text; private _upVector3:Laya.Vector3 = new Laya.Vector3(0, 1, 0); constructor() { this._upVector3 = new Laya.Vector3(0, 1, 0); Laya3...
来源: Laya_社区 发布时间: 20190531
...法 */ export default class LoadPage { constructor(url = null) { this._loadScene = null if (url) this.preload(url) } /** * 预加载loading页面 * @param {String} url loading页面url */ async preload(url = 'loadingpage.scene') { if (this._loadScene && url === this._loadScene.url) return le...
来源: Laya_社区 发布时间: 20181124
... //预加载所有资源 var resource = [{url: "Box/LayaScene_JJF/Conventional/JJF.lh"}]; Laya.loader.create(resource, Laya.Handler.create(this, this.onComplete)); } onComplete(){ //创建场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); ...
来源: Laya_社区 发布时间: 20190605
...,内存中场景及引用其的对象无法销毁 this.scene = Laya.stage.addChild(new Laya.Scene3D()) as Laya.Scene3D; this.camera = new Laya.Camera(); this.camera.transform.translate(new Laya.Vector3(0, 2, 5)); this.cam...
来源: Laya_社区 发布时间: 20191102
微信小游戏运行导出项目的时候报错:Scene: the .lh file root type must be Scene 引擎使用的是1.7.17beta版本,下面是报错堆栈,附件是工程项目以及导出的小游戏项目。 Scene: the .lh file root type must be Scene,please use other function to load this fil...
来源: Laya_社区 发布时间: 20180317
...小游戏中加载unity导出的场景报错the .lh file root type must be Scene 报错:the .lh file root type must be Scene。 看了下代码,是读取的.ls文件并不是按照数组方式读取的,而是安装字符串读取进来的,所以导致判断type失败: /** ...
来源: Laya_社区 发布时间: 20180101
...动也不动的 export default class GameUI { //宣告場景 private scene: Laya.Scene3D; private camera: Laya.Camera; private directionlight: Laya.DirectionLight; private character: Laya.Sprite3D; private monster_character: Laya.Sprite3D; private translateW: Laya.Vector3 = new Laya.Vector3(0, 0...
来源: Laya_社区 发布时间: 20200917
...er = 0.00006; protected camera: Laya.BaseCamera; protected scene: Laya.Scene3D; constructor() { super(); } /** * @private */ protected _updateRotation(): void { if (Math.abs(this.yawPitchRoll.y) &...
来源: Laya_社区 发布时间: 20200707
...anager.instance.mainCamera.viewportPointToRay(this._rayPt, this._ray); let scene = this.owner.scene as Laya.Scene3D; scene.physicsSimulation.rayCast(this._ray, this._raycastHit); console.log(this._raycastHit.succeeded); if(this._raycastHit.succeeded) console.log(this._raycastHit.collider.owner.name)...
来源: Laya_社区 发布时间: 20190319
... 0 0 分享 微博 QZONE 微信 watsonsong 赞同来自: 我添加了一个SceneScript来绘制Ray的射线,发现确实位置不正确: import Camera = Laya.Camera; import PhasorSpriter3D = Laya.PhasorSpriter3D; import Ray = Laya.Ray; import RenderState = Laya.RenderState; import Script = Laya....
来源: Laya_社区 发布时间: 20180201