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

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

11. 怎么才能像HTML5中那样直接操作Canvas [ 66%]

...layaAir的canvas进行矢量图绘制即可,可以chrome下F12,查看Elements,可以看到layaAir的canvas标签! 2017-05-02 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 cuixu_xucui 相关问题 关于微信7.0.3版本之后的...

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

12. 移动端Laya.VideoTexture播放视频纹理会出现卡顿情况~如何解决? [ 66%]

... if (this.VideoTexture != null)                 this.VideoTexture.element.requestVideoFrameCallback(fun);         }         this.VideoTexture.element.requestVideoFrameCallback(fun); 用此方法输出每帧渲染的时间间隔1、PC模式下VideoTexture播放视频纹理基本稳定...

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

13. 如何加载一个HTML页面 [ 66%]

...g errors:error on line 1 at column 7: internal error: detected an error in element contentBelow is a rendering of the page up to the first error." (function() { var Stage = Laya.Stage; var Text  = Laya.Text; var WebGL = Laya.WebGL; (function() {   // 不支持WebGL时自动切换至Canvas   Laya....

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

14. 射线检测-放置物体 [ 65%]

...ya.RaycastHit(); function checkHit() { //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCast(ray, _outH...

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

15. CameraMoveScript.as在哪儿下载群里的有错 [ 64%]

... = Laya.stage.mouseY - lastMouseY; var yprElem:Float32Array = yawPitchRoll.elements; yprElem[0] -= offsetX * rotaionSpeed * elapsedTime; yprElem[1] -= offsetY * rotaionSpeed * elapsedTime; updateRotation(); } } lastMouseX = Laya.stage.mouseX; lastMouseY = Laya.stage.mouseY; } protected function upda...

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

16. 物理引擎-牛顿摆 [ 64%]

...der.run(render); mouseConstraint = Matter.MouseConstraint.create(engine, { element: Render.canvas }); Matter.World.add(engine.world, mouseConstraint); render.mouse = mouseConstraint.mouse; } function initWorld() { var cradle = Matter.Composites.newtonsCradle(280, 100, 5, 30, 200); Matter.World.add(e...

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

17. 射线检测-点击行走 [ 63%]

... box.transform.rotation = _quaternion; //从屏幕空间生成射线 point.elements[0] = Laya.MouseManager.instance.mouseX; point.elements[1] = Laya.MouseManager.instance.mouseY; camera.viewportPointToRay(point, ray); //射线检测获取所有检测碰撞到的物体 Laya.Physics.rayCast(ray, _outH...

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

18. 物理引擎-布 [ 62%]

...der.run(render); mouseConstraint = Matter.MouseConstraint.create(engine, { element: Render.canvas }); Matter.World.add(engine.world, mouseConstraint); render.mouse = mouseConstraint.mouse; } function initWorld() { // 创建游戏场景 var group = Matter.Body.nextGroup(true); var particleOptions = {...

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

19. html固定宽高,设置垂直居中没有效果。只有水平居中才生效。看了下源码,感觉在updatePos函数里的算法不对 [ 62%]

...29 17:47 浏览: 1387 关注: 2 人 momo199059 • 2018-01-04 11:56 HtmlDivElement类。也就是UIIDE里面html组件。在UI里设置了宽和高 调用 html._getCSSStyle().valign = "middle"; //垂直居中 html._getCSSStyle().align = "center"; //水平居中 然后 html.innerH...

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

20. 在Laya中使用Matter.js的最简示例 (JS) [ 61%]

...ity.y = 0;//关闭重力 // create a renderer var render = Render.create({ element: document.body, engine: engine }); // create two boxes and a ground var boxA = Bodies.rectangle(400, 200, 80, 80); var boxB = Bodies.rectangle(450, 50, 80, 80); var ground = Bodies.rectangle(400, 500, 810, 60, { isSta...

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