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

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

1. 其他引擎的Demo-Example_04 [ 100%]

... Browser.width; private h:number = Browser.height; private slideX:number = this.w / 2; private slideY:number = this.h / 2; private speedInfo:Text; constructor() { Laya.init(this.w, this.h, WebGL); this.createText(); this.start(); } private start():void { for (var i:number = 0; i this.w) { this.stars...

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

2. 性能测试-骨骼 [ 99%]

...e: Loader.IMAGE }, { url: mAniPath, type: Loader.BUFFER }], Handler.create(this, onAssetsLoaded)); } init(); function onAssetsLoaded() { var tTexture = Loader.getRes(mTexturePath); var arraybuffer = Loader.getRes(mAniPath); mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); ...

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

3. 屏幕适配-缩放-No Scale [ 96%]

...aya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

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

4. 屏幕适配-缩放-No Border [ 96%]

...ya.stage.scaleMode = Stage.SCALE_NOBORDER; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

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

5. 屏幕适配-缩放-Show All [ 96%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

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

6. 屏幕适配-缩放-Extract Fit [ 96%]

...ya.stage.scaleMode = Stage.SCALE_EXACTFIT; Laya.stage.bgColor = "#232628"; this.createCantralRect(); } private createCantralRect(): void { this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } private updateRectPo...

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

7. 加载-错误处理和进度 [ 96%]

...r.png", "../../res/legend/map.jpg"]; Laya.loader.load(urls, Handler.create(this, onAssetLoaded), Handler.create(this, onLoading, null, false), Loader.TEXT); // 侦听加载失败 Laya.loader.on(Event.ERROR, this, onError); })(); function onAssetLoaded(texture) { // 使用texture console.log("加载...

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

8. 加载-加载序列 [ 95%]

...xLoader = 1; Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, onAssetLoaded), null, null, 0, false); Laya.loader.load("../../res/apes/monkey1.png", Handler.create(this, onAssetLoaded), null, null, 1, false); Laya.loader.load("../../res/apes/monkey0.png", Handler.create(this, onAss...

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

9. 加载-多种类型资源加载 [ 94%]

...XTURE_PATH, type: Loader.IMAGE }); Laya.loader.load(assets, Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { var robotData = Loader.getRes(ROBOT_DATA_PATH); var robotTexture = Loader.getRes(ROBOT_TEXTURE_PATH); // 使用资源 } })();module laya { import Loader = Laya.Loader;...

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

10. 网络和格式-Socket [ 94%]

...s://echo.websocket.org:80"); output = socket.output; socket.on(Event.OPEN, this, onSocketOpen); socket.on(Event.CLOSE, this, onSocketClose); socket.on(Event.MESSAGE, this, onMessageReveived); socket.on(Event.ERROR, this, onConnectError); } function onSocketOpen() { console.log("Connected"); // 发...

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