大约有 112 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0029 秒)
...宽高: ```typescript var sp=new Laya.Sprite(); sp.loadImage("res/apes/monkey2.png",0,0,0,0,Laya.Handler.create(this,function() { console.log(sp.width,sp.height); })); Laya.stage.addChild(sp); ``` loadImage在加载完成的回调函数触发之后才可以正确获取宽高。 1. **直接调用si...
来源: Laya2.0_文档 发布时间: 20210714
...aya.WebGL; const HOLD_TRIGGER_TIME = 1000; const apePath = "../../res/apes/monkey2.png"; //触发hold事件时间为1秒 var ape, isApeHold; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; La...
来源: Laya_示例 发布时间: 20251130
...tion createApe() { target = new Sprite(); target.loadImage("../../res/apes/monkey2.png"); Laya.stage.addChild(target); target.pivot(55, 72); target.pos(100,100); } function createTimerLine() { timeLine.addLabel("turnRight",0).to(target,{x:450, y:100, scaleX:0.5, scaleY:0.5},2000,null,0) .addLabel("t...
来源: Laya_示例 发布时间: 20251130
...目开发更高效。const HOLD_TRIGGER_TIME = 1000, apePath = "res/apes/monkey2.png"; let isApeHold = false; class Interaction_Hold { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Ca...
来源: Laya2.0_示例 发布时间: 20251130
....DirectionLight()); Laya.loader.create("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh", Laya.Handler.create(this, onComplete)); function onComplete() { layaMonkey3D = scene.addChild(Laya.Sprite3D.load("../../res/threeDimen/skinModel/LayaMonkey/LayaMonkey.lh")); layaMonkey2D = Laya.stage.ad...
来源: Laya_示例 发布时间: 20251130
...prite(); Laya.stage.addChild(this.target); this.target.loadImage("res/apes/monkey2.png"); this.target.pivot(55, 72); this.target.pos(100,100); } createTimerLine() { const TimeLine = Laya.TimeLine, Event = Laya.Event; this.timeLine = new TimeLine(); // addLabel(label:String, offset:Number) offset: ...
来源: Laya2.0_示例 发布时间: 20251130
...a.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage....
来源: Laya2.0_文档 发布时间: 20210715
... > 新版本骨骼挂点 ```typescript Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPh...
来源: Laya2.0_文档 发布时间: 20210715
... > 新版本骨骼挂点 ```typescript Laya.Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Laya.Handler.create(this,function(res){ Laya.stage.addChild(res); //用于挂点的精灵 var box = new Laya.MeshSprite3D(Laya.PrimitiveMesh.createBox(1,1,1)); var material = new Laya.BlinnPh...
来源: Laya2.0_文档 发布时间: 20210714
...出。 > 新版本骨骼挂点 ```typescript Scene3D.load("LayaScene_SceneMonkey/Conventional/SceneMonkey.ls",Handler.create(this,function(res:Scene3D):void{ Laya.stage.addChild(res); //用于挂点的精灵 var box: MeshSprite3D = new MeshSprite3D(PrimitiveMesh.createBox(1,1,1)); var material: Blin...
来源: Laya2.0_文档 发布时间: 20210714