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

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

391. 2D线渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...所以绘制的图形也是在宽高范围内。 */ export class DrawLine extends Laya.Script { declare owner: Laya.Sprite; line2DRender: Laya.Line2DRender; lastMousePos: number[] = []; isDrawing: boolean = false; // 标记是否正在绘制 // 组件被激活后执行,此时所有节点和组件...

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

392. Windows扩展 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

...stLib"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { alert(testLib.nativeAdd(10, 11)); } } 因为LayaNative的扩展功能只支持Windows平台,所以只能通过Windows预览或发布为Windows项目才能得到正确的结果。运行效...

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

393. 2D灯光与网格 · LayaAir3.3 · 引擎文档 · LAYABOX [ 45%]

... const { regClass, property } = Laya; @regClass() export class lightTest extends Laya.Script { declare owner: Laya.Sprite; @property({ type: Laya.Sprite }) light1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh2: Laya.Sprite; private light1Ren...

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

394. 3d显示对象克隆体超出舞台不再显示的bug2.1.0.btea1 [ 45%]

...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { scene3d:Laya.Scene3D; sp:Laya.Sprite3D; sp2:Laya.Sprite3D; translateA = new Laya.Vector3(-0.05, 0, 0); translateD = new Laya.Vector3( 0.05, 0, 0); constructor() { super(); //添加3D场景 var sce...

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

395. UI加载完成后无法获取控件的大小——超详细版问题 [ 44%]

... Loader = laya.net.Loader; import Stage = laya.display.Stage; class TestUI extends ui.test.testwhUI { constructor() { super(); this.mypan.vScrollBarSkin = ""; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements); this.mypan.vScrollBar.on(Laya.Event.CHANGE, this, this.fitDOMElements_scroll); }...

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

396. LAYABOX游戏实时语音之APP版本 [ 44%]

...arAt(Math.floor(Math.random() * maxPos)); } return str;; } class LoginView extends ui.LoginUI { constructor() { super(); this.login.on(Laya.Event.CLICK, this, this.Loginyim); this.joinroom.on(Laya.Event.CLICK, this, this.JoinRoom); this.RecordAudio.on(Laya.Event.MOUSE_DOWN, this, this.StartRecordAud...

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

397. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 44%]

...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { private mat1: Laya.BlinnPhongMaterial; private newScene: Laya.Scene3D; private sMapRes = "remote/model/res/Conventional/map1.ls" private sBullRes = "remote/model/res/Conventional/bull.lh" private ...

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

398. 微信小游戏渲染开放域卡顿处理 [ 44%]

...开放域代码请勿使用该类      */     export class WXBitmap extends Laya.Sprite {         private $viewName: string;         private $texture: Laya.Texture;         private $bitmap: any;         private $timer: lie.Timer;         public auto: boolean = true;    // ...

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

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

...ndler; import ui.TestDialogUI; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var _path2:Sprite = new Sprite(); private var arr:Array = ; private var arr2:Array = ; ...

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

400. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 43%]

...直等于-1?  -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniCo...

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