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

大约有 3,084 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0185 秒)

1601. Laya.Handler.create 回调参数问题 [ 68%]

...问题 var ape ; function Init() { Laya.init(400, 800, Laya.WebGL); Laya.stage.bgColor = "#999911";  ape = new Laya.Sprite();     Laya.stage.addChild(ape); var ag = ["lsd",ape,1,"str"]; ape.loadImage("../laya/assets/res/to1.png",0,0,0,0,Laya.Handler.create(this,graphicsImg,ag));   graphicsImg(...

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

1602. [LayaAir3]3.3.0.beta.2 2d刚体position问题 [ 68%]

...更像是相对于屏幕坐标。 假设父物体a的坐标是(0,Laya.stage.height/2),挂载了刚体的物体b是a的子物体,设置b的坐标为(0,0),若将b上刚体的position设置成(1,0),此时b会出现在屏幕坐标(1,0)的位置,b的x,y是(1,-Laya.stage.he...

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

1603. 文本对齐与自动换行(JavaScript-LayaAir基础篇(JS)-文本) [ 68%]

...t.align = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); ``` ![5](img/5.png) 在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式。 如果文本内容超...

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

1604. 微信小游戏,开放域(排行榜)关闭后再开始游戏与直接开始游戏相比较,掉帧严重! [ 67%]

...o.closeCloudStorage = function () { if (LayaSample.refract && Laya.stage.contains(LayaSample.refract)) LayaSample.refract.removeSelf();//折射层移除舞台 if (Laya.stage.contains(LayaSample.spriteLeaderboard)) {//从舞台移除 LayaSample.textureLeaderboard.bitmap.alwaysChange = false;/...

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

1605. laya.display.FrameAnimation_API3.0 [ 67%]

...s count customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize filters globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea index interval is3D isPlaying mask mouseEnabled mouseX mouseY numChildren parent pivotX pivotY rotation scaleX scaleY s...

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

1606. 3d坐标转屏幕坐标的问题 [ 67%]

...rojectionViewMatrix, this._outPos); let tx: number = this._outPos.x / Laya.stage.clientScaleX; let ty: number = this._outPos.y / Laya.stage.clientScaleY; 在相机视野外比较远的对象 转换出来ty是负数 icecia • 2020-04-08 14:10 @jacc:视野外的转换肯定不可能是正常值,这...

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

1607. ViewStack属性详解(JavaScript-IDE篇(JS)-IDE组件属性详解) [ 67%]

...编写代码如下: ```javascript Laya.init(1334, 750,Laya.WebGL); Laya.stage.scaleMode = "full"; Laya.stage.bgColor = "#ffffff"; //加载图集成功后,执行onLoaded回调方法 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //创建一个UI...

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

1608. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 67%]

...到舞台 var sp:Laya.Sprite = new Laya.Sprite(); sp.loadImage(url); Laya.stage.addChild(sp);//添加到舞台 } private errorHandler(e:Object):void{ } } new GameMain(); ``` 第二种我们可以绘制一个纹理来显示: ```typescript private completeHandler(data:Object):void{ //加载完成返...

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

1609. ios15遮罩引起的黑屏在1.x的版本上如何解决 [ 67%]

... = new Sprite(); maskArea.alpha = 0; maskArea.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); maskArea.setName("maskArea") mask.addChild(maskArea);   //绘制一个圆形区域,利用叠加模式,从遮罩区域抠出可交互区 highLightArea = new Sprite(); highLightA...

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

1610. laya.spine.SpineSkeleton_API3.0 [ 67%]

...entTime customRenderEnable destroyed displayHeight displayWidth displayedInStage drawCallOptimize externalSkins filters globalRotation globalScaleX globalScaleY graphics height hideFlags hitArea is3D loop mask mouseEnabled mouseX mouseY numChildren parent pivotX pivotY playState rotation scaleX scal...

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