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

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

201. Protobuf decode报错 [ 66%]

...=Socket.BIG_ENDIAN; //拆包开始 :依旧是length id buffer var length:number=byte.getUinit32(); var id:number=byte.getUint32(); //已经读完了length id,剩下的字节就是需要protobuf来decode成一个message了,怎么写?我写的都报错了 this._protoMsg.decode(xxxxxx);//xxxxx...

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

202. sound manager在MOUSE_OVER事件中无法播放 [ 66%]

...      private setup(): void {             var gap: number = 10;              //创建一个Sprite充当音效播放按钮             var soundButton: Sprite = this.createButton("播放音效");             soundButton.x = (Laya.sta...

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

203. 物理引擎-牛顿摆 [ 66%]

...er = Laya.Render; export class Physics_NewtonsCradle { private stageWidth: number = 800; private stageHeight: number = 600; private Matter: any = Browser.window.Matter; private LayaRender: any = Browser.window.LayaRender; private mouseConstraint: any; private engine: any; constructor() { // 不支...

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

204. 横竖屏切换,此引擎渲染有BUG [ 66%]

...= "middle";//"top";  Laya.stage.screenAdaptationEnabled=true;   oldWith: number = 0; oldheight: number = 0; HengPing(isFirst: boolean): void { if (Laya.stage != null) { this.oldWith = Laya.Browser.clientWidth; this.oldheight= Laya.Browser.clientHeight; }  console.log("设置横屏" + isFirst); if...

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

205. 在一个页面多放几个iframe,里面使用引擎,一般3-4个就报错了 [ 66%]

...报错了 Uncaught DOMException: Failed to construct 'AudioContext': The number of hardware contexts provided (6) is greater than or equal to the maximum bound (6). at Function.<anonymous> (<anonymous>:10787:310) at Function.get (<anonymous>:168:66) at Function.WebAudioSound.initWe...

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

206. 位图字体的制作与使用(ActionScript-LayaAir基础篇(AS3)-文本) [ 66%]

...。 **setSpaceWidth () 方法 ** public function setSpaceWidth(spaceWidth:Number):void 设置空格的宽(如果字体库有空格,这里就可以不用设置了)。 参数 ​ spaceWidth:Number — 宽度,单位为像素。 ### 在LayaAir IDE中使用位图字体 1.将字体文件放到 Lay...

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

207. 性能测试-卡通人物 [ 66%]

...} private createCharacters(): void { this.characterGroup = []; for (var i: number = 0; i = 0; --i) { this.animateCharactor(this.characterGroup[i]); } } private animateCharactor(charactor: Sprite): void { charactor.x += this.moveSpeed; charactor.rotation += this.rotateSpeed; if (charactor.x > Laya.st...

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

208. 和原生Dom交互 · LayaAir3.0文档 · LAYABOX [ 65%]

...ntext || Laya.Browser.window.webkitAudioContext)(); //Stereo var channels: number = 2; // Create an empty two-second stereo buffer at the // sample rate of the AudioContext var frameCount: number = audioCtx.sampleRate * 2.0; var myArrayBuffer: any = audioCtx.createBuffer(2, frameCount, audioCtx.samp...

来源: Laya3.0_文档 发布时间: 20230629

209. 监听不到Laya.Event.RESIZE事件 [ 65%]

...(event:Event):void { this.bg.y = 180; alert("11111111111111") var desWidth:Number; var desHeight:Number; //获取窗口显示区的宽度。 desWidth=window.innerWidth; //获取窗口显示区的高度。 desHeight=window.innerHeight if(desHeight!=this.sourceHeight) { this.bg.y = 180; } else { this....

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

210. 性能测试-卡通人物 [ 65%]

...} private createCharacters(): void { this.characterGroup = []; for (var i: number = 0; i = 0; --i) { this.animateCharactor(this.characterGroup[i]); } } private animateCharactor(charactor: Sprite): void { charactor.x += this.moveSpeed; charactor.rotation += this.rotateSpeed; if (charactor.x > Laya.st...

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