大约有 1,106 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0051 秒)
Laya_社区(447) Laya3.0_api(292) Laya_示例(112) Laya2.0_示例(80) Laya2.0_文档(61) Laya3.0_文档(52) Laya2.0_api(35) laya_api(27)
...TS项目,代码如下: ```typescript // 程序入口 class GameMain{ constructor() { //初始化引擎 Laya.init(1136,640); var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,this.completeHandler); xhr.once(Laya.Event.ERROR,this,this.errorHandler); xh...
来源: Laya2.0_文档 发布时间: 20210714
...ort Texture = Laya.Texture; import Handler = Laya.Handler; class GameMain{ constructor() { Laya.init(600,400); this.hahaha(); } private hahaha(): void { var assets: Array<any> = []; assets.push({ url: "res/start.json", type: Loader.ATLAS}); Laya.loader.load(assets, Handler.create(this, this.on...
来源: Laya_社区 发布时间: 20170329
...提示rayCast未定义 export default class click3d extends Laya.Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(new Laya.Vector3(...
来源: Laya_社区 发布时间: 20200801
...果class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:laya.physics.BoxCollider = this._boll1.addComponent(l...
来源: Laya_社区 发布时间: 20190428
... // 程序入口 import UIButton = laya.ui.Button; class GameMain{ constructor() { Laya.init(600,400); let body = laya.utils.Browser.document.body; let input = laya.utils.Browser.createElement("input"); input.type = "file"; ...
来源: Laya_社区 发布时间: 20161114
...st 。 private n:number = 0; private x0:number = 0; private y0:number = 0; constructor(){super();} onEnable():void{ this.x = this.x0; this.y = this.y0; Laya.timer.loop(20, this, this.frameWork); // 每 20 ms 执行一次 } private frameWork():void{ this.y = this.y0 + 10 * (this.n % 3); alert("move "...
来源: Laya_社区 发布时间: 20200203
workerLoader问题 版本:2.2.0beta1,ts_new 看代码 constructor(){ super(); this.worker = new Worker(WorkerLoader.workerPath); this.worker.onmessage = function(evt:any):void { //接收worker传过来的数据函数 (this as any as WorkerLoader).workerMessage(evt.data); } } 回...
来源: Laya_社区 发布时间: 20190802
...项目,在as开发模式下,运行报错 TypeError: Vector3 is not a constructor ide导出ui时,UI代码显示不正常在小游戏中会报错:gameThirdScriptErrorn.sort is not a function 问题状态 最新活动: 2018-01-17 14:46 浏览: 1065 关注: 2 人 qian • 2018-01-17 14:49 你弄...
来源: Laya_社区 发布时间: 20180117
... 2017-04-21 10:42 还是报错啊~ TypeError: window.Background is not a constructor
来源: Laya_社区 发布时间: 20170420
...urce:* [read-only] Implementation public function get source():*Constructor DetailHTMLCanvas()Constructorpublic function HTMLCanvas(createCanvas:Boolean = false) 根据指定的类型,创建一个 HTMLCanvas 实例。 Parameters createCanvas:Boolean (default = false)Method Detail_getSou...
来源: Laya2.0_api 发布时间: 20190513