大约有 1,443 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0045 秒)
Laya3.0_api(470) Laya_社区(443) Laya_示例(152) Laya2.0_示例(119) Laya2.0_api(71) Laya2.0_文档(71) Laya3.0_文档(59) laya_api(58)
...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
...果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
...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
...提示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
... // 程序入口 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
...弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { constructor(){ super(); //加载场景 Laya.Scene3D.load('LayaScene_test/Conventional/test.ls',Laya.Handler.create(this,this.onComplete)); } /** * 加载完成 */ private onComplete(scene:Laya.Scene3D):void{ // 将场景加到...
来源: Laya2.0_文档 发布时间: 20210714
...ort Image = Laya.Image; import WebGL = Laya.WebGL; export class UI_Image { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgCo...
来源: Laya2.0_文档 发布时间: 20210714