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

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

331. Invalid character: '`' Stack:[native code]异常 [ 87%]

...12850行有2个`符号,不知道是不是这个引起的异常? if (!this._data){                     this._data=data;                     if (data.meta && data.meta.image){                         var toloadPics=data.meta.i...

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

332. LayaAir和原生DOM交互(JavaScript-2D进阶篇(JS)-扩展模块) [ 87%]

...bgColor = "#ffcccc"; var div = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); this.qrcodeSp = new Laya.Sprite(); Laya.stag...

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

333. CommandBuffer · LayaAir3.3 · 引擎文档 · LAYABOX [ 87%]

...,//所有渲染之后 添加CommandBuffer到相机事件的接口如下: this.camera.addCommandBuffer(this.cameraEventFlag,this.commandBuffer); 删除CommandBuffer的接口如下: this.camera.removeCommandBuffer(this.cameraEventFlag,this.commandBuffer); CommandBuffer是一个渲染指令集,...

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

334. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 87%]

...", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除释放; }; img.src = window...

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

335. 一个简单的跑酷曲面shader分享 [ 87%]

... = Laya.Shader3D.propertyNameToID("u_ZDistance"); constructor() { super(); this.setShaderName("CustomCurveShader"); this.enableVertexColor = false; this.albedoColor = new Laya.Vector4(0.0, 0.0, 0.0, 0.0); this.xoffset = 15.0; this.yoffset = -15.0; this.zdistance = 200.0; } public static initShader()...

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

336. 显示与切换图片(JavaScript-LayaAir基础篇(JS)-位图) [ 87%]

...bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55, 72); ape.pos(200, 200); // 显示默认纹理 switchTexture(); ape.on("click", this, switchTexture); } func...

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

337. Text的中划线(删除线) [ 87%]

...,但是不支持中划线,underline = true; 可以修改 laya.core.js this.underline && this.drawUnderline(textAlgin,x,y,i); __proto.drawUnderline=function(align,x,y,lineIndex){             var lineWidth=this._lineWidths[lineIndex];             switch (align){  ...

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

338. Sprite-显示图片 [ 87%]

...drawTexture Laya.loader.load("../../res/apes/monkey2.png", Handler.create(this, function() { var t = Laya.loader.getRes("../../res/apes/monkey2.png"); var ape = new Sprite(); ape.graphics.drawTexture(t, 0, 0); Laya.stage.addChild(ape); ape.pos(200, 0); })); } })();module laya { import Sprite = Laya....

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

339. 有震屏的算法吗 [ 87%]

...= 0;    var offsetArr:Array = [0, 0];    var point:Point = new Point(this.x, this.y);    Laya.stage.timerLoop(speed, this, shakeObject);        function shakeObject(args:Array=null, frameNum:uint=1, frameTime:uint=0):void{     var count:int = (num++) % 4;     offsetArr[num % 2...

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

340. 射线形状检测shapeCastAll返回的检测结果只第一次有效 [ 87%]

...ration = 0.0) { var bt = ILaya3D.Physics3D._bullet; var convexResultCall = this._btAllConvexResultCallback; var convexPosFrom = PhysicsSimulation._btTempVector30; var convexPosTo = PhysicsSimulation._btTempVector31; var convexRotFrom = PhysicsSimulation._btTempQuaternion0; var convexRotTo = PhysicsS...

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