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

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

1. 鼠标交互-滑动 [ 100%]

...gth / 2; let buttonPosition, beginPosition, endPosition; let button; class Interaction_Swipe { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Brow...

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

2. 缓动-逐字缓动 [ 95%]

...; for (var i: number = 0, len: number = demoString.length; i > 1; var endY:int = Laya.stage.height / 2 - 50; var demoString:String = "LayaBox"; for (var i:int = 0, len:int = demoString.length; i < len; ++i) { var letterText:Text = createLetter(demoString.charAt(i)); letterText.x = w / len * i + offs...

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

3. 骨骼动画-Spine事件 [ 87%]

...tartY:Number = 500; private var mFactory:Templet; private var mActionIndex:int = 0; private var mCurrIndex:int = 0; private var mArmature:Skeleton; private var mCurrSkinIndex:int = 0; private var mFactory2:Templet; private var mLabelSprite:Sprite; public function Skeleton_SpineEvent() { WebGL.enable...

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

4. 鼠标交互-自定义事件 [ 86%]

...言、LayaAirIDE让项目开发更高效。const ROTATE = "rotate"; class Interaction_CustomEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Handler = Laya.Handler; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth,...

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

5. 缓动-简单的Tween [ 78%]

...olor = "#232628"; setup(); } private function setup():void { var terminalX:int = 200; var characterA:Sprite = createCharacter("../../res/cartoonCharacters/1.png"); characterA.pivot(46.5, 50); characterA.y = 100; var characterB:Sprite = createCharacter("../../res/cartoonCharacters/2.png"); characterB...

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

6. 缓动-缓动函数演示 [ 77%]

...'QuadInOut'); data.push('quartIn', 'quartOut', 'quartInOut'); data.push('quintIn', 'quintOut', 'quintInOut'); data.push('sineIn', 'sineOut', 'sineInOut'); data.push('strongIn', 'strongOut', 'strongInOut'); easeFunctionsList.array = data; } renderList(item) { item.setLabel(item.dataSource); } onEaseF...

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

7. 混合模式-Lighter [ 77%]

..., phoenixHeight = 400, bgColorChannels = { r: 99, g: 0, b: 0xFF }, gradientInterval = 2000; class BlendMode_Lighter { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite, Tween = Laya.Tween; // 不支持WebGL时自动切换至C...

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

8. 鼠标交互-Hold [ 68%]

...IME = 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时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.sta...

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