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

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

91. 在开启webgl模式下,每次运行texture类的getPixels方法内存都会增加 [ 87%]

...e: Laya.Texture init(){ let rect = this.img.getSelfBounds() this.img.pivot(Math.round(rect.width / 2), Math.round(rect.height / 2)) let bound = this.img.getBounds() this.cacheCanvas = this.img.drawToCanvas(Math.ceil(bound.width), Math.ceil(bound.height), Math.round(bound.width / 2), Math.round(bound...

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

92. laya.maths.Point [ 87%]

... | Frames No Frames PointProperties | Methods | Constants Packagelaya.mathsClasspublic class PointInheritancePoint Object Point 对象表示二维坐标系统中的某个位置,其中 x 表示水平轴,y 表示垂直轴。 Public Properties PropertyDefined By  x : Number该点的水平...

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

93. laya.d3.math.BoundSphere [ 87%]

...ndex | Frames No Frames BoundSphereProperties | Methods Packagelaya.d3.mathClasspublic class BoundSphereInheritanceBoundSphere ObjectImplements laya.d3.core.IClone BoundSphere 类用于创建包围球。 Public Properties PropertyDefined By  center : Vector3包围球的中心。BoundSphere ...

来源: laya_api 发布时间: 20170929

94. 关于Laya.Quaternion.createFromAxisAngle旋转角度不正确的问题 [ 86%]

...ernion();         Laya.Quaternion.createFromAxisAngle(normal,angle*Math.PI/180,Q)                  var newdir1=new Laya.Vector3()         Laya.Vector3.transformQuat(dir1,Q,newdir1)         Laya.Vector3.normalize(newdir1,newdir1)          Laya.Quaterni...

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

95. laya.d3.math.BoundSphere [ 86%]

...ndex | Frames No Frames BoundSphereProperties | Methods Packagelaya.d3.mathClasspublic class BoundSphereInheritanceBoundSphere ObjectImplements laya.d3.core.IClone BoundSphere 类用于创建包围球。 Public Properties PropertyDefined By  center : Vector3包围球的中心。BoundSphere ...

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

96. laya.d3.math.Viewport [ 86%]

... Index | Frames No Frames ViewportProperties | Methods Packagelaya.d3.mathClasspublic class ViewportInheritanceViewport Object Viewport 类用于创建视口。 Public Properties PropertyDefined By  height : Number高度Viewport  maxDepth : Number最大深度Viewport  minDepth : Number...

来源: laya_api 发布时间: 20170929

97. 如何启用摇一摇 [ 86%]

..._('y = acceleration.y'); __JS__('z = acceleration.z'); __JS__('var speed = Math.abs(x + y + z - last_x - last_y - last_z) / diffTime * 600'); __JS__('if (speed > SHAKE_THRESHOLD)_model.sendMoney = speed;//将得到的摇晃速度发送到 _model}}'); } } }    最后layabox会转换成如下  ...

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

98. laya.d3.math.Color [ 86%]

... Frames No Frames ColorProperties | Methods | Constants Packagelaya.d3.mathClasspublic class ColorInheritanceColor ObjectImplements laya.d3.core.IClone Color 类用于创建颜色实例。 Public Properties PropertyDefined By  a : Numberalpha分量Color  b : Numberblue分量Color  g : Num...

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

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

...y:int = p1.y = p2.y;              var length:Number = Math.sqrt(Math.pow(x,2)+Math.pow(y,2));              trace(length);  2017-05-11 1 0 分享 微博 QZONE 微信 ippon 赞同来自: var point = new laya.maths.Point(100,100); var distance = point.distance(200,200)...

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

100. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 86%]

...ackage { import laya.display.Node; import laya.display.Sprite; import laya.maths.Rectangle; import laya.ui.Dialog; import laya.ui.Image; import laya.utils.Handler; import ui.TestDialogUI; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private va...

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