大约有 82 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0034 秒)
... //加载Base64图片数据 sp1.loadImage(e.target.result as string); this.owner.addChild(sp1); } }); 上述代码中,用 Laya.loader.fetch 加载图片二进制数据,根据自定义的规则,可以解析数据加密方式,并获得完整图片数据。在这里我们更多的介绍一下 L...
来源: Laya3.0_文档 发布时间: 20230303
...撞到的物体 // this.text.text = "碰撞到了" + outHitResult.collider.owner.name; console.log("碰撞到物体!!" + outHitResult.collider.owner.name) } 附件 : --> 射线选取实体的问题.zip 2019-12-19 添加评论 已悬赏10元 --> 分享 微博 QZONE 微信 没有找到相关结果...
来源: Laya_社区 发布时间: 20191219
... } onStart():void{ this.lab=this.owner as Laya.Label; } onUpdate():void{ if(this.lab==null){ console.log("lab为空"); return; } t...
来源: Laya_社区 发布时间: 20200602
...能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect.x = this.target.x - 400; this.came...
来源: Laya_社区 发布时间: 20190214
...线检测到的精灵对象 var selectSprite3D:MeshSprite3D = out.collider.owner as MeshSprite3D; (selectSprite3D.meshRenderer.sharedMaterial as BlinnPhongMaterial).albedoColor = this.colorRed; if(this.oldSelectMesh) if(selectSprite3D!=this.oldSelectMesh) (this.oldSelectMesh.meshRenderer.sharedMater...
来源: Laya2.0_文档 发布时间: 20210714
...ypescript override public function onStart() { this.fixedConstraint = this.owner.getComponent(FixedConstraint); //设置打破约束的力的阈值 this.fixedConstraint.breakForce = 1000; } override public function onUpdate() { if(this.fixedConstraint) { var mass = this.fixedConstraint.connectedBody...
来源: Laya2.0_文档 发布时间: 20210714
... public animator:Laya.Animator = null; public Init(){ this.sprite = this.owner as Laya.Sprite3D; this.animator = this.sprite.getComponent(Laya.Animator) as Laya.Animator; console.log("11"); } public RoleMove(dir:Laya.Vector3) { let norDir:Laya.Vector3 = Laya.Vector3.ZERO; Laya.Vector3.normalize(...
来源: Laya_社区 发布时间: 20191026
...取这个物体身上的碰撞器就获取不到了,一直报空 (this.owner as Laya.Sprite3D).getComponent(Laya.PhysicsCollider) as Laya.PhysicsCollider;log里面也没有这个碰撞组件的信息,只有刚体和脚本的 但是把刚体去掉以后再导出,代码再去获取这个物...
来源: Laya_社区 发布时间: 20200927
...频纹理 */ @regClass() export class Script extends Laya.Script { declare owner: Laya.Sprite3D; @property(Laya.Scene3D) private scene: Laya.Scene3D; private videoPlane: Laya.Sprite3D; private videoTexture = new Laya.VideoTexture(); onAwake(): void { //获取场景中要添加视频纹理的3D节点...
来源: Laya3.0_文档 发布时间: 20251010
...除碰撞到的物体 text.text = "碰撞到了" + _outHitResult.collider.owner.name ; trace("碰撞到物体!!") } } ``` (图2)
来源: Laya2.0_文档 发布时间: 20210715