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

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

71. 鼠标交互-鼠标交互 [ 97%]

... Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event...

来源: Laya_示例 发布时间: 20241001

72. Clip属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 97%]

...OWALL; Laya.stage.bgColor = "#232628"; //预加载资源 Laya.loader.load([this.buttonSkin, this.clipSkin, this.bgSkin], Laya.Handler.create(this, this.onSkinLoaded)); } private onSkinLoaded(): void { this.showBg(); this.createTimerAnimation(); this.showTotalSeconds(); this.createController(); } pri...

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

73. js环境下使用Loader加载图片在Sprite对象的.on函数无效 [ 97%]

...移越位部分的鼠标触发事件不会被触发 //设置背景图片 this.bgimg = new Laya.Sprite(); this.bgimg.width=2*scronw; this.bgimg.height=2*scronh; //加载显示图片,坐标位于0,0 var temptexture=Loader.getRes(pic); if (typeof(temptexture)!="undefined"){ this.bgimg.texture=Loader....

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

74. Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 [ 97%]

Laya.timer.frameLoop(1, this, this.aaa);对象移动会出现颤抖现象 this.loadHp(); Laya.timer.frameLoop(1, this, this.aaa); private bb:number = 6; private playerHB:logic.UI.role.PlayerHealthBar; private loadHp():void { this.playerHB = new logic.UI.role.PlayerHealthBar(); this.playerHB.pivotX ...

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

75. 骨骼动画-橡胶人 [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes4/stretchyman.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactor...

来源: Laya2.0_示例 发布时间: 20241001

76. 鼠标交互-双指缩放(多点触控) [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createSprite(); Laya.stage.on(Event.MOUSE_UP, this, this.onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, this.onMouseUp); } createSprite() { const Sprite = Laya.Sprite...

来源: Laya2.0_示例 发布时间: 20241001

77. 动画多层混合(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 97%]

...。 ```typescript //在混合模式的按钮监听事件中改变播放层 this.blendType++; //在切换动作的按钮监听事件中播放动作 switch (this.blendType) { case 0: if (this.motionCross) { //在当前动画状态和目标动画状态之间进行融合过渡播放 //第三个参数为...

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

78. 动画多层混合(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 97%]

...。 ```typescript //在混合模式的按钮监听事件中改变播放层 this.blendType++; //在切换动作的按钮监听事件中播放动作 switch (this.blendType) { case 0: if (this.motionCross) { //在当前动画状态和目标动画状态之间进行融合过渡播放 //第三个参数为...

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

79. 性能测试-卡通人物2 [ 97%]

...e(); Laya.stage.loadImage("res/cartoon2/background.jpg", 0, 0, 1280, 900); this.createCharacters(); text = new Text(); text.zOrder = 10000; text.fontSize = 60; text.color = "#ff0000" Laya.stage.addChild(text); Laya.timer.frameLoop(1, this, this.gameLoop); } createCharacters() { let char; let charSki...

来源: Laya2.0_示例 发布时间: 20241001

80. Cannot read property 'rayCast' of undefined [ 97%]

...ort default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let config3D = new Laya.Config3D(); config3D.isAlpha = t...

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