大约有 83 项符合查询结果, 库内数据总量为 14,852 项。 (搜索耗时: 0.0038 秒)
...s; import laya.display.Sprite; import laya.events.Event; import laya.maths.Point; import laya.utils.Browser; import laya.webgl.WebGL; import laya.wx.mini.MiniAdpter; public class LayaSample { public var sprite:Sprite = new Sprite(); public function LayaSample() { //初始化引擎 MiniAdpter.init();...
来源: Laya_社区 发布时间: 20190515
...void { //创建盒型MeshSprite3D let point = [{ x: 0, z: 0 }, { x: -2, z: 2 }]; var box = this.newScene.addChild(new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(0.75, 0.5, 0.5))) as Laya.MeshSprite3D; //...
来源: Laya_社区 发布时间: 20201120
... private radius:number = 150; //半径 private speed:number = .05; private points:Array<any> = ; private i:number = 0; constructor() { Laya.init(1100, 619, Laya.WebGL); Laya.loader.load("res/atlas/war.atlas",Laya.Handler.create(this,this.onLoaded),null,Laya.Loader.ATLAS); } private onLoaded():...
来源: Laya_社区 发布时间: 20171108
...: 我也试过scale了 但是效果是这样的 : 代码 : var point = new Sprite(); this.addChild(point); point.graphics.drawCircle(88, 86, 40, 'transparent'); var tx = new Sprite(); tx.loadImage(PATH + 'tx.jpg'); tx.scale(0.3,0.3); this.addChild(tx); tx.mask = point; 2017-09-28 0 2 ...
来源: Laya_社区 发布时间: 20170928
...oGlobal获取不到正确的全局坐标位置, 以下为代码: var local_point = new Point(view.userPanel.x, view.userPanel.y); var userPanel_stage_point = view.userPanel.parent.localToGlobal(local_point); 这里的view就是图中背景, 而userPanel就是图中红色框 而view在UI编...
来源: Laya_社区 发布时间: 20210218
...码片段: onTriggerEnter(other: any, self: any, contact: any) { let pointes = contact.getHitInfo().points; let potSelf = new Laya.Point(pointes[0].x, pointes[0].y); let potOther = new Laya.Point(pointes[0].x, pointes[0].y); self.owner.globalToLocal(potSelf); other.owner.globalToLocal(potO...
来源: Laya_社区 发布时间: 20190609
...= new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); this.point = new Laya.Vector2(); this._outHitInfo = new Laya.RaycastHit(); // this.phasorSpriter3D = new Laya.PhasorSpriter3D(); } MousePickingScene.prototype.lateRender = function (state) { MousePickingScene.__super.prototype.lat...
来源: Laya_社区 发布时间: 20170323
...aya.Sprite; constructor() { super(); } cameraPlayerOffset:Laya.Point=new Laya.Point(18,0); cameraOffset:Laya.Point=new Laya.Point(180,570); onEnable(): void { Laya.Physics.I.allowSleeping = false; this.strWorldRoot= this.owner.scene.strWorldRoot; ...
来源: Laya_社区 发布时间: 20231123
... 与内容相关的链接 提交 5 个回复 Victor 赞同来自: transformPoint(globalPoint:Laya.Point,localSp:Laya.Sprite):Laya.Point{ return localSp.globalToLocal(globalPoint,true); }globalPoint: 绿色框的坐标 -- 舞台中央坐标(Laya.stage.width*.5,Laya.stage.height*.5) localSp:黑框...
来源: Laya_社区 发布时间: 20180502
...88923133用户 赞同来自: let out = window.app.fcUtil.worldToViewportPoint(this.owner.transform.position, window.GameMag.Camera1); this.hpNode.x = out.x - this.hpNode.width / 2 this.hpNode.y = out.y + this.hpNode.height *3.5 //this.owner.transform 3d的物体 //this.hpNode 2d的ui ...
来源: Laya_社区 发布时间: 20201110