大约有 207 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0041 秒)
...的参照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
...1. 可绑定内容的骨骼动画 export default class BindSkeleton extends Laya.Skeleton { private __bindList:BindSource[]; constructor(){ super(); this.__bindList=[]; } /** * 绑定 * @param source */ bind(source:BindSource):void{ let index:number=this.__bindList.indexOf(source); if(...
来源: Laya_社区 发布时间: 20190805
...了个例子,发现个新问题 import Sprite = Laya.Sprite; class Test extends Sprite{ constructor(){ super(); this._initView(); } private _initView():void { let sprite:Sprite = new Sprite(); sprite.loadImage("res/scene/1001/layer1/qiang.jpg", 100, 100, 100, 100); this.addChild(sprite); sprite = ...
来源: Laya_社区 发布时间: 20180308
...bel使用的并不是 ide中自己做的bmf字体。 class cloneLabel extends Laya.Label { constructor(_label) { super(); this.align = _label.align; this.x = _label.x; this.y = _label.y; this.width = _label.width; this.height = _label.height; this.fontSize = _label.fontSize; this.color = _label...
来源: Laya_社区 发布时间: 20180517
...Frame % 60 === 0) { text.text = Stat.FPS.toString(); } } } class Character extends Laya.Sprite { constructor(images) { super(); this.speed = 5; this.bloodBar; this.animation; this.nameLabel; this.createAnimation(images); this.createBloodBar(); this.createNameLabel(); } createAnimation(images) { cons...
来源: Laya2.0_示例 发布时间: 20251130
...如下所示: const { regClass } = Laya; @regClass() export class Script extends Laya.Script { } 1.2 IDE中如何找到被识别的组件脚本 只有使用了@regClass()装饰器标识,才会被LayaAir3-IDE识别为自定义组件脚本,可以被节点(实体)所添加, 添加组件的...
来源: Laya3.0_文档 发布时间: 20251010
...ull: undefined preload.js:55 at setPrototypeOf (<anonymous>) at __extends (file:///E:/SVN/ZQ2/client2.0/bin/js/bundle.js:6:9) at file:///E:/SVN/ZQ2/client2.0/bin/js/bundle.js:41201:5 at Object.172.../GameManager (file:///E:/SVN/ZQ2/client2.0/bin/js/bundle.js:41206:2) at o (file:///...
来源: Laya_社区 发布时间: 20190222
...ss laya.html.dom.HTMLDivElement Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent Uncaught Can not find class laya.ani.bone.Skeleton 脚本重命名后报Uncaught Can not find class 错误 发布微信小游戏运行错误,Class constructor xx cannot be invoked without 'ne...
来源: Laya_社区 发布时间: 20180706
...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } } 其次,可以在Scene2D节点下添加...
来源: Laya3.0_文档 发布时间: 20251010
...Vector4; import WebGLContext = Laya.WebGLContext; export class SceneScript extends Script { private _originPosition:Vector3 = new Vector3(0, -1, 1); private _phasorSpriter3D:PhasorSpriter3D; private _color:Vector4 = new Vector4(1, 0, 0, 1); private _point:Vector2 = new Vector2(); private _camera:Cam...
来源: Laya_社区 发布时间: 20180201