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

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

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

...rowser; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_Swipe { //swipe滚动范围 private TrackLength: number = 200; //触发swipe的拖动距离 private TOGGLE_DIST: number = this.TrackLength / 2; private buttonPosition: number; private beginPosition: number; privat...

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

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...

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

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...

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

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

...a.Ease; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_CustomEvent { public static ROTATE: string = "rotate"; private sp: Sprite; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV =...

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

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")...

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

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

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

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

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

...50; var phoenixHeight = 400; var bgColorTweener = new Tween(); var gradientInterval = 2000; var bgColorChannels = { r: 99, g: 0, b: 0xFF }; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(phoenixWidth * 2, phoenixHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.al...

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

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

...andler; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_Hold { private HOLD_TRIGGER_TIME: number = 1000; private apePath: string = "../../res/apes/monkey2.png"; //触发hold事件时间为1秒 private ape: Sprite; private isApeHold: Boolean; constructor() { // 不支...

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

9. 高级应用-寻路导航 [ 66%]

...n(); this.index = 0; this.curPathIndex = 0; this.nextPathIndex = 1; this.pointCount = 10; Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); this.path = new Array(); //预加载所有资源 var resource = [ { url: "../../res/threeDimen/sce...

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