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

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

1. 其他引擎的Demo-Example_23 [ 100%]

...BG.jpg"); Laya.stage.frameLoop(1, this, this.animate); } animate() { const Sprite = Laya.Sprite, Point = Laya.Point; let laser; if (tick > frequency) { tick = 0; // iterate through the dudes and update the positions laser = new Sprite(); laser.loadImage("res/pixi/laser0" + ((type % 5) + 1) + ".png")...

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

2. Sprite-容器 [ 94%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_Container { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV ...

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

3. Sprite-节点控制 [ 93%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_NodeControl { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.align...

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

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

...ctionList(); this.createDurationCrontroller(); } createCharacter() { const Sprite = Laya.Sprite; character = new Sprite(); Laya.stage.addChild(character); character.loadImage("res/cartoonCharacters/1.png"); character.pos(100, 50); } createEaseFunctionList() { const List = Laya.List, Handler = Laya.H...

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

5. Sprite-轴心点 [ 93%]

...TypeScript三种开发语言、LayaAirIDE让项目开发更高效。class Sprite_Pivot { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = St...

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

6. 加载-销毁Texture使用的图片资源 [ 92%]

...Laya.stage.bgColor = "#232628"; Stat.show(); this.init(); } init() { const Sprite = Laya.Sprite, Animation = Laya.Animation, Text = Laya.Text, Event = Laya.Event; // 创建背景 this.spBg = Sprite.fromImage(PathBg); Laya.stage.addChild(this.spBg); // 创建动画 this.aniFly = new Animation(); this...

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

7. 鼠标交互-修正交互区域 [ 88%]

...stage.on(Event.MOUSE_DOWN, this, this.onDown); } createCoralRect() { const Sprite = Laya.Sprite, Event = Laya.Event; let coralRect = new Sprite(); coralRect.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height / 2, "#FF7F50"); //设置名称 coralRect.name = "珊瑚色容器"; coralRect.size(...

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

8. 2D物理-仿生机器人 [ 85%]

...s.Construct(); this.eventListener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = ground.addComponent(Laya.ChainCollider); chainCollider.po...

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

9. DOM元素-表单输入 [ 85%]

...e = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#fff"; this.form = new Laya.Sprite(); this.form.size(250,120); this.form.pos((Laya.stage.width - this.form.width) / 2, (Laya.stage.height - this.form.height) / 2); Laya.stage.addChild(this.form); this.rowHeight = 30; this.rowSpacing = 10; let rowHeightD...

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

10. 输入设备-指南针 [ 85%]

...nge); } // 方位指示器指向当前所朝方位 createCompass() { const Sprite = Laya.Sprite; compassImg = new Sprite(); Laya.stage.addChild(compassImg); compassImg.loadImage(compassImgPath); compassImg.pivot(compassImg.width / 2, compassImg.height / 2); compassImg.pos(Laya.stage.width / 2, 400);...

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