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

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

361. layair 两点之间的距离api在哪里 [ 86%]

...封装,laya并没有这样的api /** * * @param {坐标点} a 示例:{x:1,y:1} * @param {坐标点} b 示例:{x:1,y:100} */ function calcDistance(a,b){     return Math.sqrt(Math.pow(a.x-b.x,2)+Math.pow(a.y-b.y,2)); } 2018-08-27 1 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复...

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

362. 分享一个Graphics画圆角矩形的封装 [ 86%]

...  /**          * 绘制圆角矩形。          * @param x   开始绘制的 X 轴位置。          * @param y   开始绘制的 Y 轴位置。          * @param width  矩形宽度。          * @param height 矩形高度。          * @par...

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

363. laya.physics.ChainCollider_API3.0 [ 86%]

Search Preparing search index... The search index is not available layaair Options All Public Public/Protected All Inherited Externals Only exported Menu Globals "laya/physics/ChainCollider" ChainCollider Class ChainCollider 2D线形碰撞体 Hierarchy ColliderBase ChainCollider Index Constructors ...

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

364. 怎么计算两个点之间的距离 [ 86%]

...到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同来自: jinghuhuilai             var p1:Point = new Point(10,20);              var p2:Point = new Point(100,200);              var x:int = p1.x - p2.x;     ...

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

365. Slider控件的标签不居中 [ 86%]

Slider控件的标签不居中 protected function showValueText():void { if (showLabel) { var label:Label = Slider.label; addChild(label); label.textField.changeText(_value + ""); if (isVertical) { label.x = _bar._x + 20; label.y = (_bar.height - label.height) * 0.5 + _bar._y; } else { label.y = _b...

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

366. 相对屏幕坐标 [ 86%]

...到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: 189*****192 localToGlobal和globalToLocal是局部转全局和全局转局部,你可以用着两个方法,让豆或道具的坐标变成相对于屏幕的坐标! 2017-05-04 1 3 分享 微博 QZONE ...

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

367. laya.display.cmd.DrawRoundRectCmd_API3.0 [ 86%]

Search Preparing search index... The search index is not available layaair Options All Public Public/Protected All Inherited Externals Only exported Menu Globals "laya/display/cmd/DrawRoundRectCmd" DrawRoundRectCmd Class DrawRoundRectCmd Hierarchy DrawRoundRectCmd Index Properties fillColor height ...

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

368. 怎样获取鼠标/触摸当前坐标 [ 86%]

... 赞同来自: qwer535305054 function getMousePos(ev) {    var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;    var scrollY = document.documentElement.scrollTop || document.body.scrollTop;    var x = ev.pageX || ev.clientX + scrollX;    var...

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

369. shader 问题[关闭] [ 86%]

...展里面 类似      attribute vec2 position;     attribute vec2 texcoord;     attribute vec4 color;     uniform vec2 size;     uniform mat4 mmat;     varying vec2 v_texcoord;varying vec4 v_color;     void main(){       vec4 pos =mmat*vec4(position.x,position.y,0,1);       gl_P...

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

370. 3D中摄像机绕物体旋转该如何实现? [ 86%]

...ponent(ModelViewer); modelViewer.AroundPos = plane.transform.position; */ export default class ModelViewer extends Laya.Script { // Text m_debugTip; public canRotation_X: boolean = true; public canRotation_Y: boolean = true; public canScale: boolean = true; /// <summary> /// Around center. ///...

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