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

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

41. 【官网代码】加载dom音频报错,怎么回事? [ 69%]

...vate function drawHandler():void{Laya.stage.graphics.clear();var dataArray:Uint8Array = new Uint8Array(analyser.frequencyBinCount);analyser.getByteFrequencyData(dataArray);var step:int = Math.round(dataArray.length / 60);for (var i:int = 0; i < 40; i++) {var energy:int = (dataArray[step * i] / 25...

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

42. socket大型项目回调 [ 69%]

...urn buffer; } public decode(buffer:Laya.Byte){ var type:number = buffer.getUint8(); var len:number = (buffer.getUint8() << 16 | buffer.getUint8() << 8 | buffer.getUint8()) >>> 0; var body:Laya.Byte; if (buffer.bytesAvailable >= len) { // body = new Laya.Byte(); // if (len) bu...

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

43. 微信小游戏想使用截图功能是使用canvasToTempFilePath()吗 [ 69%]

...需重写,记得赋值到window */ export class ImageData { public data: Uint8ClampedArray; public width: number; public height: number; public constructor(width: number, height: number) { this.width = width; this.height = height; this.data = new Uint8ClampedArray(width * height * 4); } } window.I...

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

44. 在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas [ 69%]

...D if (tex) { let u8 = tex.getData(0, 0, tex.width, tex.height) let u = new Uint8Array(u8.length) let len = u8.length / 4 let i = 0 for (let x = len; x >= 0; x--) { for (let y = 0; y < 4; y++) { u[i * 4 + y] = u8[x * 4 + y] } i++ } u8 = u u = new Uint8Array(u8.length) len = u8.length / s.height...

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

45. oppo CanvasRenderingContext2D 并没有实现 drawImage;报错; [ 69%]

...height *4); } if (this._canRead){ if (Render.isConchApp){ this._pixels=new Uint8Array(source._nativeObj.getImageData(0,0,width,height)); }else { Browser.canvas.size(width,height); Browser.canvas.clear(); Browser.context.drawImage(source,0,0,width,height); this._pixels=new Uint8Array(Browser.context....

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

46. laya.d3.resource.DataTexture2D [ 68%]

... mipmap:Boolean = true):DataTexture2D[static] DataTexture2D  getPixels():Uint8Array 返回图片像素。 DataTexture2D  load(url:String, w:int = 0, h:int = 0, magfilter:int, minfilter:int):DataTexture2D[static] 加载Texture2D。 DataTexture2D  onAsynLoaded(url:String, data:*, params:Array):v...

来源: laya_api 发布时间: 20170929

47. layaAir TS项目如何引用protoBuf库? [ 66%]

...    throw Error(errMsg);             // Encode a message to an Uint8Array (browser) or Buffer (node)             var buffer = AwesomeMessage.encode(message).finish();             // ... do something with buffer             // Or, encode a plain object  也可...

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

48. 网络通信 · LayaAir3.0文档 · LAYABOX [ 66%]

... byte:Laya.Byte = new Laya.Byte(); //或者传入一个类型化数组 var uint8Byte:Uint8Array = new Uint8Array(10); var byte:Laya.Byte = new Laya.Byte(uint8Byte); //或者传入一个ArrayBuffer类型 var buffer:ArrayBuffer = new ArrayBuffer(20); var byte:Laya.Byte = new Laya.Byte(buffer); writeAr...

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

49. laya.d3.physics.shape.HeightfieldTerrainShape_API3.0 [ 65%]

... new HeightfieldTerrainShape(heightfieldData: Uint16Array | Float32Array | Uint8Array, heightStickWidth: number, heightStickLength: number, minHeight: number, maxHeight: number, heightScale: number): HeightfieldTerrainShape Overrides ColliderShape.constructor Defined in laya/d3/physics/shape/Heightf...

来源: Laya3.0_api 发布时间: 20231115

50. [2.0beta5]引入场景报错 [ 65%]

...下什么原因,十分感谢。RangeError: Source is too large     at Uint8Array.set (native)     at Pv (file:///D:/UserSoft/layaAir2.5/workSpace/LayaTest2_5/LayaTest2_5/bin/libs/laya.physics3D.js:304:397)     at Object.window.Physics3D (file:///D:/UserSoft/layaAir2.5/workSpace/LayaTest2_5/L...

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