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

大约有 843 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0071 秒)

381. 请问Laya如果获取Laya.Event.CLICK时间的点击坐标? [ 72%]

...设置用户点击事件 function setUserClick(){ var clickRect = new Laya.Sprite(); clickRect.graphics.drawRect( 0, 0, Laya.stage.width, Laya.stage.height-100 ); clickRect.pos( 0, 0 ); clickRect.size( Laya.stage.width, Laya.stage.height-100 ); Laya.stage.addChild( clickRect ); clickRect.on( Laya.Ev...

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

382. 鼠标交互-双指缩放(多点触控) [ 72%]

...tat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; let w = 300, h = 300; this.sp = new Sprit...

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

383. 加载-销毁Texture使用的图片资源 [ 72%]

...言、LayaAirIDE让项目开发更高效。var leo; (function (leo) { var Sprite = laya.display.Sprite; var Animation = laya.display.Animation; var Text = laya.display.Text; var Stage = laya.display.Stage; var Browser = laya.utils.Browser; var Stat = laya.utils.Stat; var WebGL = laya.webgl.WebGL; va...

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

384. CPU优化方式(JavaScript-2D进阶篇(JS)-性能优化) [ 72%]

...。 1. 使用getBounds/ getGraphicBounds。 ```javascript var sp=new Laya.Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); var bounds:Laya.Rectangle=sp.getGraphicBounds(); Laya.stage.addChild(sp); ``` getBounds可以满足多数多数需求,但由于其需要计算边界,不适合频繁调...

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

385. laya.ui.ColorPicker [ 72%]

...ackagelaya.uiClasspublic class ColorPickerInheritanceColorPicker Component Sprite Node EventDispatcher Object ColorPicker 组件将显示包含多个颜色样本的列表,用户可以从中选择颜色。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties Property...

来源: laya_api 发布时间: 20170929

386. parameter 2 is not of type 'WebGLTexture' [ 72%]

...n_edit.height, 0, 0); var interceptT:Texture = new Texture(htmlC); var img:Sprite = new Sprite; img.graphics.drawImage(interceptT, 0, 0, btn_edit.width, btn_edit.height); Laya.stage.addChild(img);     如图和代码(一个按钮点击后draw图然后加入stage) 只要添加至stage后,随后...

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

387. laya.ui.CheckBox [ 72%]

...ckagelaya.uiClasspublic class CheckBoxInheritanceCheckBox Button Component Sprite Node EventDispatcher Object CheckBox 组件显示一个小方框,该方框内可以有选中标记。 CheckBox 组件还可以显示可选的文本标签,默认该标签位于 CheckBox 右侧。 CheckBox 使用 dat...

来源: laya_api 发布时间: 20170929

388. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 72%]

...路径三、地形处理3.1 高度图3.2 网格地形3D精灵 MeshTerrainSprite3D3.3 更新世界矩阵3.4 得到整数的网格索引3.5 得到世界坐标系下的真实坐标3.6 初始化目标点四、角色移动五、最终代码3D寻路 一、概述 本篇将讲解3D场景的寻路问题,...

来源: Laya3.0_文档 发布时间: 20230303

389. laya.ui.ColorPicker [ 72%]

...kagelaya.uiClasspublic class ColorPickerInheritanceColorPicker UIComponent Sprite Node EventDispatcher Object ColorPicker 组件将显示包含多个颜色样本的列表,用户可以从中选择颜色。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties Property...

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

390. HTMLDivElement设置宽度不生效 [ 72%]

...叠 要回复问题请先登录 发起人 Charles 相关问题 如何设置Sprite的宽高和点击区域? 使用钢体设置防穿后仍有几率会穿透 图片添加点击事件 有的不生效 关于同为object层,层级设置无效的问题 龙骨skeleton鼠标点击区域的设置 将list...

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