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

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

2771. 鼠标交互-双指旋转(多点触控) [ 39%]

...nt = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Interaction_Rotate { private sp: Sprite; private preRadian: number = 0; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = S...

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

2772. 鼠标交互-Hold [ 39%]

...dler = Laya.Handler; 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_示例 发布时间: 20260824

2773. 骨骼动画-Spine事件 [ 39%]

...rt Stat = Laya.Stat; import Tween = Laya.Tween; import 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 mArmatu...

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

2774. laya.d3.webxr.core.ButtonGamepad_API3.0 [ 39%]

...e layaair Options All Public Public/Protected All Inherited Externals Only exported Menu Globals "laya/d3/WebXR/core/WebXRGamepad" ButtonGamepad Class ButtonGamepad 类用来描述gamepad Button Hierarchy EventDispatcher ButtonGamepad Index Constructors constructor Properties handness index EVENT_PR...

来源: Laya3.0_api 发布时间: 20231115

2775. laya.gltf.glTFUtils_API3.0 [ 39%]

...ilable ts Options All Public Public/Protected All Inherited Externals Only exported Menu Globals "laya/gltf/glTFUtils" glTFUtils Class glTFUtils glTFUtils 用于解析 glTF 2.0 对象 Hierarchy glTFUtils Index Properties Extensions Extras Methods RegisterExtra UnRegisterExtra _createMesh _createMesh...

来源: Laya3.0_api 发布时间: 20231102

2776. 缓动-时间线 [ 39%]

...Laya.Keyboard; import TimeLine = Laya.TimeLine; import WebGL = Laya.WebGL; export class Tween_TimeLine { private target:Sprite; private timeLine:TimeLine = new TimeLine(); constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; La...

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

2777. 引用外部脚本的方式 · LayaAir3.4 · 引擎文档 · LAYABOX [ 39%]

... from "astar-typescript"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private aStarInstance: AStarFinder; onStart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1...

来源: Laya3.0_文档 发布时间: 20251010

2778. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 39%]

...染,但文档和教程搜索无果,想请教如何做才能实现。 export default class CMat extends Laya.BaseMaterial { public static _mainTex : number; public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propert...

来源: Laya_社区 发布时间: 20190814

2779. 物理引擎-布 [ 39%]

... Stat = Laya.Stat; import WebGL = Laya.WebGL; import Render = Laya.Render; export class Physics_Cloth { private stageWidth: number = 800; private stageHeight: number = 600; private Matter: any = Browser.window.Matter; private LayaRender: any = Browser.window.LayaRender; private mouseConstraint: any;...

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

2780. 支付宝小游戏 · LayaAir3.4 · 引擎文档 · LAYABOX [ 39%]

...载代码示例如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一...

来源: Laya3.0_文档 发布时间: 20251010