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

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

2451. 使用百度地图显示当前位置(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 43%]

...dy.appendChild(mapDiv); // 适应窗口尺寸 refit(); Laya.stage.on(Laya.Event.RESIZE, this, refit); // 初始化地图 map = new BMap.Map(mapDiv); // 禁用部分交互 //map.disableDragging(); map.disableKeyboard(); map.disableScrollWheelZoom(); map.disableDoubleClickZoom(); map.disablePinchTo...

来源: Laya2.0_文档 发布时间: 20210715

2452. 官方提供的关系链代码执行报错,是不是wx的sharedCanvas不是Laya的canvas导致的问题 [ 43%]

... 是一个纹理处理类。 */ //class laya.resource.Texture extends laya.events.EventDispatcher var Texture=(function(_super){ function Texture(bitmap,uv){ /**图片或者canvas 。*/ //this.bitmap=null; /**UV信息。*/ //this.uv=null; /**沿 X 轴偏移量。*/ this.offsetX=0; /**沿 Y 轴偏移...

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

2453. Sprite-遮罩-放大镜 [ 43%]

... maskSp.pivot(50, 50); // 设置mask bg2.mask = maskSp; Laya.stage.on(Laya.Event.MOUSE_MOVE, this, () => { bg2.x = -Laya.stage.mouseX * 2; bg2.y = -Laya.stage.mouseY * 2; maskSp.x = Laya.stage.mouseX; maskSp.y = Laya.stage.mouseY; }); } } new Sprite_MagnifyingGlass();module laya { import Sprite = La...

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

2454. 自定义shader-地形shader [ 43%]

..., 20, -30), false); camera.addComponent(CameraMoveScript); scene.once(Laya.Event.HIERARCHY_LOADED, this, function () { setCustomMaterial(scene.getChildAt(2)); }); function setCustomMaterial(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var meshSprite3D = spirit3D; var customMaterial = new...

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

2455. 射线检测报错,outHitInfo.sprite3D=null; [ 43%]

...ERO); this.phasorSprite3D = new Laya.PhasorSpriter3D(); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,this.onMouseDown); }  private onMouseDown():void{ this.camera.viewportPointToRay(new Laya.Vector2(Laya.MouseManager.instance.mouseX,Laya.MouseManager.instance.mouseY),this.ray); Laya.Physics.rayCast(thi...

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

2456. 横竖屏切换,此引擎渲染有BUG [ 43%]

LayaAir引擎 横竖屏切换,此引擎渲染有BUG Laya.stage.on(Laya.Event.RESIZE, this, this.OnresizeFn); Laya.stage.alignH = "center";//"left";  Laya.stage.alignV = "middle";//"top";  Laya.stage.screenAdaptationEnabled=true;   oldWith: number = 0; oldheight: number = 0; HengPing(isFirst: b...

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

2457. list item 添加事件后无法监听 [ 43%]

...Source);     cell.setImg(cell.dataSource[index]);     cell.on(Laya.Event.CLICK, function() {         console.log("click")     }) }  function onSelect(index) {     console.log("当前选择的索引:" + index); } function createAPIList(api_list_view) {     let data = []...

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

2458. [LayaAir2]在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 43%]

...ss VideoDom { htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListene...

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

2459. [LayaAir3]laya3.2代码分包使用脚本集定义分包没效果 [ 43%]

...侦听) 预设怎么在代码中使用 项目分包后, 运行出错 event自定义事件的问题 刮刮卡效果实现 IDE通过.ui自动生成的ui代码报错 打包安卓,代码正常运行,但是黑屏 Tween没效果,对于渐变相机位移? dialog 自定义关闭效果,效果执...

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

2460. [LayaAir3]Laya 2.x/3.x 演示项目中 Laya.timer.scale 和 Laya.SpineSkeleton.playbackRate 对部分骨骼加速不生效 [ 43%]

...pineAni.playbackRate(10); //侦听点击,换动画 this.spineBtn.on(Laya.Event.CLICK, this, this.changeAni); }第二,你通过Laya.timer.scale设置比较大的值,受限制是因为引擎中作了一些优化保护,让动画不至于播放过快。如果你想自己控制速度,我们也...

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