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

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

101. 在一个矩形之上画另一个矩形,只显示一个矩形 [ 88%]

...00, WebGL); //串盒子的宽 var boxWidth = 440; //串盒子的高 var boxHeight = 500; //串盒子 this.chuanBox = new Laya.Rectangle(Laya.stage.width - boxWidth >> 1, Laya.stage.height - boxHeight - 10, boxWidth, boxHeight); //画出盒子 Laya.stage.graphics.drawRect( this.chuanBox.x, this...

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

102. 屏幕适配-自动横屏 [ 88%]

...ize = 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_Landscape { constructor() { // 不支持WebGL...

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

103. 屏幕适配-自动竖屏 [ 88%]

...ize = 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_Portrait { constructor() { // 不支持WebGL时...

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

104. 输入设备-摇一摇 [ 88%]

...console); console.y = picH + 10; console.width = Laya.stage.width; console.height = Laya.stage.height - console.y; console.color = "#FFFFFF"; console.fontSize = 50; console.align = "center"; console.valign = 'middle'; console.leading = 10; } startShake() { const Shake = Laya.Shake; Shake.instance.st...

来源: Laya2.0_示例 发布时间: 20251209

105. laya.d3.physics.shape.CylinderColliderShape [ 88%]

... Public Properties Show Inherited Public Properties PropertyDefined By  height : Number[read-only] 获取高度。 CylinderColliderShape localOffset : Vector3 获取Shape的本地偏移。 ColliderShape localRotation : Quaternion 获取Shape的本地旋转。 ColliderShape needsCustomCollision...

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

106. laya.d3.physics.shape.ConeColliderShape [ 88%]

... Public Properties Show Inherited Public Properties PropertyDefined By  height : Number[read-only] 获取高度。 ConeColliderShape localOffset : Vector3 获取Shape的本地偏移。 ColliderShape localRotation : Quaternion 获取Shape的本地旋转。 ColliderShape needsCustomCollisionCall...

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

107. matter.js的长度宽度什么的和laya的x,y,width,height就不在一个体系,怎么玩? [ 88%]

matter.js的长度宽度什么的和laya的x,y,width,height就不在一个体系,怎么玩? 我用 render: { sprite: { texture: "../src/view/0.png", } }, 位置都不一样 2018-01-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关...

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

108. Error: 代码包大小为 5533 kb,上限为 4096 kb,请删除文件后重试? [ 88%]

... class Main { constructor() { console.log(Laya.Browser.width, Laya.Browser.height); this.current = { x: 0, y: Laya.Browser.height }; // Laya.stage.bgColor = "#3F51B5"; this.sp = new Laya.Sprite(); Laya.stage.addChild(this.sp); } render() { console.log("render"); var l = [ 0, 0, 0, -(Laya.Browser.hei...

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

109. 关于创建Sprite获取大小 [ 88%]

...真实的大小?    这个建议官方改下接口,理论上width和height用来检测碰撞,那你看到的就应该是碰撞的边缘,按照官方的注释显然不太合理。   谢谢。 2018-05-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀...

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

110. 文本-字数限制 [ 88%]

...WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createInput(); })(); function createInput() { var inp...

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