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

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

241. 区块地图-滚动地图 [ 52%]

...DE让项目开发更高效。let mLastMouseX = 0, mLastMouseY = 0, mX, mY; class TiledMap_ScrollMap { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Event = Laya.Event, Stat = Laya.Stat; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.width, Browser...

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

242. 3D中摄像机绕物体旋转该如何实现? [ 51%]

...ewer); modelViewer.AroundPos = plane.transform.position; */ export default class ModelViewer extends Laya.Script { // Text m_debugTip; public canRotation_X: boolean = true; public canRotation_Y: boolean = true; public canScale: boolean = true; /// <summary> /// Around center. /// </summary&...

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

243. 官方案例里摄像机绕物体旋转脚本的问题 [ 51%]

...ewer); modelViewer.AroundPos = plane.transform.position; */ export default class ModelViewer extends Laya.Script { // Text m_debugTip; public canRotation_X: boolean = true; public canRotation_Y: boolean = true; public canScale: boolean = true; /// <summary> /// Around center. /// </summary&...

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

244. 鼠标交互-拖动 [ 51%]

....Browser; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class Interaction_Drag { private ApePath: string = "../../res/apes/monkey2.png"; private ape: Sprite; private dragRegion: Rectangle; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Bro...

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

245. 物体随着鼠标滑动旋转脚本 [ 51%]

...    this.mainCameraAnimation = null;     this.scene = null; } Laya.class(ObjectRotate, "ObjectRotate", Laya.Script);  //这是什么意思有什么作用 ObjectRotate.prototype._initialize = function (owner) {     var _this = this;     ObjectRotate.__super.prototype._initialize.call...

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

246. 【官网代码】加载dom音频报错,怎么回事? [ 50%]

....net.HttpRequest;import laya.net.Loader;import laya.utils.Browser; public class Main{private var AudioContext:Object;private var audioContext:Object;private var analyser:Object;private var audioBufferSourceNode:Object;public function Main(){Laya.init(500,500);AudioContext =Browser.window.AudioConte...

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

247. runTime使用(ActionScript-IDE篇(AS3)-组件化开发相关) [ 50%]

...laya.utils.Tween; /** *ImageRunTime逻辑类 * @author mengjia * */ public class ImageRunTime extends Image { //缩放时间100毫秒 public var scaleTime:int = 100; public function ImageRunTime() { //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按...

来源: Laya2.0_文档 发布时间: 20210714

248. 3D变换 · LayaAir3.3 · 引擎文档 · LAYABOX [ 50%]

...x、y和z方向上分别移动距离1,示例代码如下: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite3D }) public cube: Laya.Sprite3D; // 平移距离 private translate: Laya.Vector3 = new Laya.Vector3(1, 1, 1); cons...

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

249. 动画-旧版骨骼动画 [ 49%]

....utils.Stat; import common.CameraMoveScript; /** * ... * @author */ public class SkinAnimation_Old { private var zombie:Sprite3D; private var changeActionButton:Button; private var curStateIndex:int = 0; private var skinAniUrl:Array = [ "../../../../res/threeDimen/skinModel/Zombie/old/Assets/Zombie/...

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

250. 区块地图-滚动地图 [ 48%]

...= Laya.Handler; import Stat = Laya.Stat; import WebGL = Laya.WebGL; export class TiledMap_SimpleDemo { private tiledMap: TiledMap; private mLastMouseX: number = 0; private mLastMouseY: number = 0; private mX: number = 0; private mY: number = 0; constructor() { // 不支持WebGL时自动切换至Canv...

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