大约有 350 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0040 秒)
Laya_社区(97) Laya_示例(78) Laya2.0_示例(68) Laya3.0_api(55) Laya2.0_文档(35) Laya3.0_文档(6) laya_api(6) Laya2.0_api(5)
...=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
... private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.sta...
来源: Laya_社区 发布时间: 20201203
...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
...= "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
...报错了 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
...。 **setSpaceWidth () 方法 ** public function setSpaceWidth(spaceWidth:Number):void 设置空格的宽(如果字体库有空格,这里就可以不用设置了)。 参数 spaceWidth:Number — 宽度,单位为像素。 ### 在LayaAir IDE中使用位图字体 1.将字体文件放到 Lay...
来源: Laya2.0_文档 发布时间: 20201114
...} 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
...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
...(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
...} 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