• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 6 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0017 秒)

1. 输入设备-指南针 [ 100%]

...ate degreesText:Text; private directionIndicator:Sprite; private firstTime:Boolean = true; constructor() { Laya.init(700, 1024, WebGL); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.loader.load(this.compassImgPath, Ha...

来源: Laya_示例 发布时间: 20241119

2. Sprite-切换纹理 [ 91%]

...g"; private texture2: string = "../../res/apes/monkey3.png"; private flag: boolean = false; private ape: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.AL...

来源: Laya_示例 发布时间: 20241119

3. 其他引擎的Demo-Example_21 [ 88%]

...666", "#F6C84C", "#4C779A"]; private colorCount:number = 0; private isDown:Boolean = false; private path:Array = []; private color:String = this.colors[0]; private liveGraphics:Graphics; private canvasGraphics:Graphics; constructor() { Laya.init(Browser.width, Browser.height, WebGL); Laya.stage.bgCo...

来源: Laya_示例 发布时间: 20241119

4. 鼠标交互-Hold [ 82%]

..."; //触发hold事件时间为1秒 private ape: Sprite; private isApeHold: Boolean; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleM...

来源: Laya_示例 发布时间: 20241119

5. 加载-销毁Texture使用的图片资源 [ 77%]

...niFly:Animation; private btn:Sprite; private txt:Text; private isDestroyed:Boolean = false; private readonly PathBg:string = "../../res/bg2.png"; private readonly PathFly:string = "../../res/fighter/fighter.atlas"; constructor() { //初始化引擎 Laya.init(Browser.clientWidth, Browser.clientHeight...

来源: Laya_示例 发布时间: 20241119

6. 射线检测-碰撞器混合 [ 64%]

...new Laya.Vector3(0.1, 0, 0); private collider:Laya.Sprite3D; private debug:Boolean = true; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); //预加载所有资源 var resource:any = [ {url: "../....

来源: Laya_示例 发布时间: 20241119