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

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

1. 缓动-逐字缓动 [ 100%]

... Laya.stage.width - w >> 1; let endY = Laya.stage.height / 2 - 50; let demoString = "LayaBox"; for (let i = 0, len = demoString.length; i > 1; var endY: number = Laya.stage.height / 2 - 50; var demoString: string = "LayaBox"; for (var i: number = 0, len: number = demoString.length; i > 1; var endY:i...

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

2. 混合模式-Lighter [ 90%]

...tage.graphics.drawRect( 0, 0, phoenixWidth, phoenixHeight, this.getHexColorString()); } getHexColorString() { bgColorChannels.r = Math.floor(bgColorChannels.r); // 绿色通道使用0 bgColorChannels.g = 0; //obj.g = Math.floor(obj.g); bgColorChannels.b = Math.floor(bgColorChannels.b); var r = bgCol...

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

3. 缓动-缓动函数演示 [ 85%]

...= parseInt(durationInput.text); }); } private createInputWidthLabel(label: string, prompt: string, x: number, y: number): Input { var text: Text = new Text(); text.text = label; text.color = "white"; Laya.stage.addChild(text); text.pos(x, y); var input: Input = new Input(); input.size(50, 20); input...

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

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

...= 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 = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.A...

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

5. 骨骼动画-Spine事件 [ 82%]

...rt WebGL = Laya.WebGL; export class Skeleton_SpineEvent { private mAniPath:string; private mStartX:number = 400; private mStartY:number = 500; private mFactory:Templet; private mActionIndex:number = 0; private mCurrIndex:number = 0; private mArmature:Skeleton; private mCurrSkinIndex:number = 0; priv...

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

6. 缓动-简单的Tween [ 80%]

...X; Tween.from(characterB, { x: 0 }, 1000); } private createCharacter(skin: string): Sprite { var character: Sprite = new Sprite(); character.loadImage(skin); Laya.stage.addChild(character); return character; } } } new laya.Tween_SimpleSample();package { import laya.display.Sprite; import laya.displa...

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

7. 鼠标交互-Hold [ 70%]

...eraction_Hold { private HOLD_TRIGGER_TIME: number = 1000; private apePath: string = "res/apes/monkey2.png"; //触发hold事件时间为1秒 private ape: Sprite; private isApeHold: Boolean; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, ...

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