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

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

111. Error: asBitmap no size! [ 84%]

...2 个回复 kylin 赞同来自: 果粒儿 怀疑是传参的时候canvas的width或height没设置,或者canvas的宽高为0 可以在这个方向上排查一下   或者提供一个简单可复现的demo,我们看一下 2020-07-31 1 1 分享 微博 QZONE 微信 明森 赞同来自: 原因是, ...

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

112. laya.display.cmd.DrawTextureCmd [ 84%]

...信息。 DrawTextureCmd  texture : Texture 纹理。 DrawTextureCmd  width : Number (可选)宽度。 DrawTextureCmd  x : Number (可选)X轴偏移量。 DrawTextureCmd  y : Number (可选)Y轴偏移量。 DrawTextureCmdPublic Methods  MethodDefined By  recover():void 回收...

来源: Laya2.0_api 发布时间: 20190513

113. 关于缓动函数from的一些问题记录 [ 83%]

...r letterText = new Laya.Text(); letterText.text ="hello world"; letterText.width = 400; letterText.height = 200; letterText.fontSize = 36; letterText.align = "center"; letterText.valign = "middle"; var offsetPos={offsetX:100,offsetY:100}; letterText.x = Laya.stage.width - letterText.width>>1 +...

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

114. 请大家帮助优化一下这个抛物线的代码 [ 83%]

...all = new Ball(); Laya.stage.addChild(this.ball); this.ball.x = Laya.stage.width / 2; this.ball.y = Laya.stage.height / 2; Laya.stage.on(Laya.Event.CLICK,this,this.onClick); Laya.timer.frameLoop(1,this,this.onEnterFrame); } private onEnterFrame():void{ if(this.points.length>0){ if(this.i<this....

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

115. 关于适配noborder模式(个人适配分享及建议) [ 83%]

...我自己谢了一个方法来实现 如下 AppConfig.viewRect = {};var divWidth = window.innerWidth; var divHeight = window.innerHeight; var devicePixelRatio = Laya.Browser.pixelRatio; var divH = divHeight * devicePixelRatio; var divW = divWidth * devicePixelRatio; var desH = Laya.stage.height; var...

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

116. laya.display.Sprite [ 83%]

...mouseThrough属性。 影响对象鼠标事件响应区域的属性为:width、height、hitArea,优先级顺序为:hitArea(type:HitArea)>hitArea(type:Rectangle)>width/height。 Sprite  mouseX : Number[read-only] 返回鼠标在此对象坐标系上的 X 轴坐标信息。 Sprite  mou...

来源: laya_api 发布时间: 20170929

117. 屏幕适配-自动横屏 [ 83%]

...or = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_La...

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

118. 屏幕适配-自动竖屏 [ 83%]

...or = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.height - text.height >> 1; Laya.stage.addChild(text); } })();module laya { import Stage = Laya.Stage; import Text = Laya.Text; import WebGL = Laya.WebGL; export class SmartScale_Po...

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

119. laya.d3.core.render.RenderContext3D_API3.0 [ 83%]

... Constructors constructor Properties configPipeLineMode clientHeight clientWidth Accessors cameraShaderValue Methods changeScissor changeViewport drawRenderElement Constructors constructor new RenderContext3D(): RenderContext3D Defined in laya/d3/core/render/RenderContext3D.ts:171 创建一个 Rende...

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

120. 引擎示例中的新手引导自己写了一次,不知道为什么无法实现点击。 [ 83%]

...e/crazy_snowball.png", Handler.create(this, init)); function init(e) { var width = stage.width; var height = stage.height; var bg = new Sprite(); stage.addChild(bg); bg.texture = e; bg.on("click", this, onClick); var guideContainer = new Sprite(); stage.addChild(guideContainer); guideContainer.mouse...

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