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

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

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

...ivate sEnemyRes = "remote/model/res/Conventional/man_1.lh" constructor() { super(); let self = this; Util3d.loadRes( [ this.sMapRes, this.sBullRes, this.sEnemyRes ], function (bIsFinish) { if (bIsFinish) { self.onResFinish(); } } ) } onResFinish() { let pNewScene = <Laya.Scene3D>Util3d.getRes(...

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

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

... arr2:Array = ; private var pop:TestDialogUI; public function TestView() { super(); _path.pivot(0,0); _path.pos(a.x,a.y); this.addChild(_path); _path.rotation = Math.atan2(b.y - a.y, b.x - a.x) / Math.PI * 180; _path2.rotation = Math.atan2(b.y - a.y+300, b.x - a.x) / Math.PI * 180; _path2.pos(a.x,a....

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

433. 抖音小游戏 · LayaAir3.0文档 · LAYABOX [ 38%]

...; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { //小游戏加载分包 Laya.loader.loadPackage("sub1", this.printProgress).then(() =&g...

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

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

.../*碰撞检测信息*/ private outHitInfo:Laya.RaycastHit; constructor() { super(); this.ray = new Laya.Ray(new Laya.Vector3(0,0,0),new Laya.Vector3(0,-2,0)); this.outHitInfo = new Laya.RaycastHit(); } /*覆写3D组件方法,指3D对象加载组件时执行 *owner:此组件所属的3D对象 */ p...

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

435. List属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 38%]

... = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: string): void { this.img.skin = src; } } } new laya.UI_List(); ```

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

436. 分享水波一个shader [ 38%]

...donly Time:number = Shader3D.propertyNameToID("u_Time");  constructor() { super();  var vs:string = ` attribute vec4 a_Position; attribute vec2 a_Textcoord; attribute vec3 a_Normal; uniform mat4 u_WorldMat; uniform mat4 u_MvpMatrix;   varying vec2 v_textcoord; varying vec3 v_normal; varying vec4 ...

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

437. 物理引擎,我按照官方例子做的,不知道那里写错了,总是报这个错,大神帮我看下 [ 38%]

...seConstraint:*; private var engine:*; /***/ public function Retitution() { super(); this.width = stageWidth; this.height = stageHeight; setup(); } private function setup():void { initMatter(); initWorld(); Laya.stage.on("resize",this,onResize); } private function initMatter():void { var gameWorld:Sp...

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

438. 怎么实现同一个工程内分包? [ 38%]

...tJS; public class LoginView extends Sprite { public function LoginView() { super(); addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { importJS("homeModule.js", homeModuleComplete); //导入包文件 "homeModule.js" } private function homeModuleComplete():vo...

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

439. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 38%]

...public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); CMat._mainCol = Laya.Shader3D.propertyNameToID("u_MainCol"); CMat.initShader(); this.inited = true; } this.setShaderName("CMatShader"); ...

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

440. 【LIST无法拖动】参照官方实例做的 [ 38%]

...xt;      private img: Image;     constructor(){         super();         this.size(Item.WID, Item.HEI);         this.img = new Image();         this.img.width = 200;         this.img.height = 200;         this.height = 230;    ...

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