大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0044 秒)
...测的问题 import BoxMove from "./BoxMove"; export default class GameUI extends Laya.Scene { constructor() { super(); //加载场景文件 this.loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加照相机 var camera = (scene.addChild(ne...
来源: Laya_社区 发布时间: 20190314
...义一个Item,界面分两层(可用两个Sprite进行划分) class Item extends ui.itemUI { private state = 0; constructor() { super(); //点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面一层的...
来源: Laya_社区 发布时间: 20180810
... import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite { public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSiz...
来源: Laya_社区 发布时间: 20151218
...oyedScenes属性查看还未被销毁的场景列表 */ export class Scene extends Sprite { /**创建后,还未被销毁的场景列表,方便查看还未被销毁的场景列表,方便内存管理,本属性只读,请不要直接修改*/ static readonly unDestroyedScenes: Set<Scene> ...
来源: Laya3.0_文档 发布时间: 20251010
...ort laya.utils.Handler; import laya.webgl.WebGL; public class Bootstrapper extends Sprite { protected var _list:List; protected var _items:Array; protected var _loadingBg:Sprite; public function Bootstrapper() { Laya.init(696, 1118, WebGL); Laya.stage.bgColor = "#232628"; Laya.stage.scaleMode = Stag...
来源: Laya_社区 发布时间: 20170323
...create(); window.show(); 也可以扩展GWindow类使用: class MyWindow extends Laya.GWindow { protected onInit() { this.contentPane = ((await Laya.loader.load("Examples/windows/Window1.lh")) as Laya.Prefab).create(); } protected onShown() { //处理窗口显示后的逻辑,例如更新UI等。...
来源: Laya3.0_文档 发布时间: 20251010
...的参照shader原文档 2.要修改shader里面的值 class ShaderValue extends Laya.Value2D {class ShaderValue extends Laya.Value2D { constructor () { super(0, 0) var _vlen = 8 * Laya.CONST3D2D.BYTES_PE this.position = [2, Laya.WebGLContext.FLOAT, false, _vlen, 0] this.texcoord = [2, Laya.WebGLCon...
来源: Laya_社区 发布时间: 20180531
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Image }) public img: Laya.Image; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): vo...
来源: Laya3.0_文档 发布时间: 20251010
...给一个3d物体挂在脚本的时候 比如有个脚本是: class Test extends Laya.Script3D{ } 如xxx是一个3D节点,代码里执行: let script:Test = xxx.addComponent(Test); 在web端没问题,在微信开发者工具里运行报错,已上传Demo项目 附件 : --> IdleDemo.zip 20...
来源: Laya_社区 发布时间: 20200309
...uglify-js对代码进行压缩有,会有很多重复的一下语句 var __extends = this && this.__extends || function() { var extendStatics = Object.setPrototypeOf || { __proto__: [] }instanceof Array && function(d, b) { d.__proto__ = b } || function(d, b) { for (var p in b) if (b.h...
来源: Laya_社区 发布时间: 20171212