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

大约有 553 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0032 秒)

531. Sprite-轴心点 [ 43%]

...or = "#232628"; this.createApes(); } private createApes(): void { var gap: number = 300; this.sp1 = new Sprite(); this.sp1.loadImage("res/apes/monkey2.png", 0, 0); this.sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.height / 2); //设置轴心点为中心 this.sp1.pivot(55, 72); Laya.stage.addChil...

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

532. 射线检测-射线检测 [ 43%]

...BoxCollider)"; //指定精灵的层 sprite3d1.layer = Laya.Layer.getLayerByNumber(10); sprite3d2.layer = Laya.Layer.getLayerByNumber(10); sprite3d3.layer = Laya.Layer.getLayerByNumber(13); sprite3d4.layer = Laya.Layer.getLayerByNumber(13); /** * 给精灵添加碰撞器组件 * BoxCollider : 盒型...

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

533. 材质-物理基础渲染材质 [ 43%]

...or (var y = mnum; y >= 0; y--) { for (var x = 0; x = 0; y--) { for (var x: number = 0; x =0; y--) { for ( var x:int = 0; x < rnum; x++) { var mtl:PBRMaterial = new PBRMaterial(); mtl.use_groundtruth = false; mtl.diffuseTexture = Texture2D.load('../../../../res/threeDimen/pbr/c1.png'); mtl.normalText...

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

534. UI-Tab [ 42%]

...onSelect); Laya.stage.addChild(tab); return tab; } private onSelect(index: number): void { console.log("当前选择的标签页索引为 " + index); } } } new laya.UI_Tab();package { import laya.display.Stage; import laya.ui.Tab; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_T...

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

535. UI-Tab [ 42%]

...onSelect); Laya.stage.addChild(tab); return tab; } private onSelect(index: number): void { console.log("当前选择的标签页索引为 " + index); } } } new laya.UI_Tab();package { import laya.display.Stage; import laya.ui.Tab; import laya.utils.Handler; import laya.webgl.WebGL; public class UI_T...

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

536. 其他引擎的Demo-Example_21 [ 41%]

..."#5D0776", "#EC8A49", "#AF3666", "#F6C84C", "#4C779A"]; private colorCount:number = 0; private isDown:Boolean = false; private path:Array = []; private color:String = this.colors[0]; private liveGraphics:Graphics; private canvasGraphics:Graphics; constructor() { Laya.init(Browser.width, Browser.heig...

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

537. 其他引擎的Demo-Example_21 [ 40%]

..."#5D0776", "#EC8A49", "#AF3666", "#F6C84C", "#4C779A"]; private colorCount:number = 0; private isDown:Boolean = false; private path:Array = []; private color:String = this.colors[0]; private liveGraphics:Graphics; private canvasGraphics:Graphics; constructor() { Laya.init(Browser.width, Browser.heig...

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

538. 鼠标交互-Hold [ 37%]

...L = 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() { // 不支持WebGL时自动切换至Canvas Laya.init(Brows...

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

539. 鼠标交互-Hold [ 37%]

...L = 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() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.cli...

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

540. Sprite-新手引导 [ 36%]

...tip:"../../res/guide/help3.png", tipx:900, tipy:300 } ]; private guideStep:number = 0; private hitArea:HitArea; private interactionArea:Sprite; constructor() { Laya.init(1285, 727); Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_MIDDLE; //绘制一个蓝色方块,不被抠...

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