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

大约有 2,033 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0059 秒)

341. 分享 修复webaudiosound 循环播放的声音 俩个失声问题 [ 87%]

...Channel.prototype; /** *播放声音 */ _proto.play = function () { // if (this.url.indexOf("music.d") != -1) { // console.log("play", this.url) // console.trace("play", this.url) // } Laya.SoundManager.addChannel(this); this.isStopped = false; this._clearBufferSource(); if (!this.audioBuffer) { // ...

来源: Laya_社区 发布时间: 20201014

342. CommandBuffer使用文档(TypeScript-3D基础(TS)-LayaAir3D之高级应用) [ 87%]

...后 ``` 添加CommandBuffer到相机事件的接口如下: ```typescript this.camera.addCommandBuffer(this.cameraEventFlag,this.commandBuffer); ``` 删除CommandBuffer的接口如下: ```typescript this.camera.removeCommandBuffer(this.cameraEventFlag,this.commandBuffer); ``` CommandBuffer是一...

来源: Laya2.0_文档 发布时间: 20210715

343. 文本-Overflow [ 87%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInput() { const Text = Laya.Text; let t1 = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); let t2 = this.createText(); t2.overflow = Text.SCROLL; t2.pos(10, 110); let t3 = this.creat...

来源: Laya2.0_示例 发布时间: 20251130

344. Sprite-轴心点 [ 87%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; let gap = 150; this.ape1 = new Sprite(); Laya.stage.addChild(this.ape1); this.ape1.loadImage(monkey2Path); // 设置轴...

来源: Laya2.0_示例 发布时间: 20251130

345. 动画-SWF动画 [ 87%]

..._CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; this.createMovieClip(); } private createMovieClip(): void { var mc: MovieClip = new MovieClip(); mc.load(this.SWFPath); mc.x = (Laya.stage.width - this.MCWidth) / 2; mc.y = (Laya.stage.height - this.MCHeight) / 2; Laya.stage....

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

346. 代码创建精灵监听不到事件? [ 87%]

...data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUILayer.prototype;   _proto.onclick = function(params){ console.log("--------------------------------hhhhhhhhhhh- "); }   ----------------------------------------------------...

来源: Laya_社区 发布时间: 20171113

347. 滤镜-模糊滤镜 [ 87%]

...a.stage.bgColor = "#232628"; Laya.loader.load(apePath, Laya.Handler.create(this, this.setup)); } setup() { this.createApe(); this.applayFilter(); } createApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.gr...

来源: Laya2.0_示例 发布时间: 20251130

348. 请问老师为什么我按照官网的实例播放音频没反应呢? [ 87%]

...undButton.y; Laya.stage.addChild(musicButton); soundButton.on(Event.CLICK, this, onPlaySound); musicButton.on(Event.CLICK, this, onPlayMusic); } function createButton(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); butt...

来源: Laya_社区 发布时间: 20170527

349. 屏幕适配-缩放-No Scale [ 87%]

...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_示例 发布时间: 20251130

350. 屏幕适配-缩放-No Border [ 87%]

...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_示例 发布时间: 20251130