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

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

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

... Laya.stage.width - w >> 1; var endY = Laya.stage.height / 2 - 50; var demoString = "LayaBox"; for (var 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...

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

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

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

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

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

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

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

4. 缓动-缓动函数演示 [ 86%]

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

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

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

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

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

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

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

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

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

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

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

8. 高级应用-寻路导航 [ 49%]

...ath(scene:Scene):void { for (var i:int = 0; i < pointCount; i++) { var str:String = "path" + i; path.push((scene.getChildByName('Scenes').getChildByName('Area').getChildByName(str) as MeshSprite3D).transform.localPosition); } } } }

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