大约有 152 项符合查询结果, 库内数据总量为 30,786 项。 (搜索耗时: 0.0066 秒)
...ild(this.text); } } //激活启动类 new MultiTouch(); class MonkeyScript extends Laya.Script3D{ private _scene:Laya.Scene3D; private _text:Laya.Text; private _camera:Laya.Camera; private rotation:Laya.Vector3; private lastPosition:Laya.Vector2; priva...
来源: Laya_社区 发布时间: 20190605
...ipt /** * TypeScript语言的3D脚本示例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } ``` > 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), ###### ...
来源: Laya2.0_文档 发布时间: 20210715
...错,这个时候借用下any吧,如: classA implements IA{ } classB extends classA{ } var items:IA = ; function(item:classB):void { //items.push(item);//报错,提示类型错误 //方案一 items.push(<any>item); //方案二 var temp:IA = <IA>item; items.push(temp); ...
来源: Laya_社区 发布时间: 20161109
....addChild(this.text); } } //激活启动类 new Main(); class MonkeyScript extends Laya.Script3D{ constructor(){ super(); this.scene = null; this.text = null; this.camera = null; this.lastPosition = new Laya.Vect...
来源: Laya_社区 发布时间: 20190531
...: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方...
来源: Laya3.0_文档 发布时间: 20241014
...建,播放,暂停,销毁,清理对象池 export class Particle3D extends Sprite3D { private _isInited: boolean = false; private _filePath: string = null; private _particle: Laya.Sprite = null; private _shuriKenParticle3D: Array<ShuriKenParticle3D>= []; private _shurikenParticleSystem: ...
来源: Laya3.0_文档 发布时间: 20241014
....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> //public targe...
来源: Laya_社区 发布时间: 20170714
....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> //public targe...
来源: Laya_社区 发布时间: 20190224
...t { regClass, property } = Laya; @regClass() export class CameraMoveScript extends Laya.Script3D { /** @private */ protected _tempVector3: Laya.Vector3 = new Laya.Vector3(); protected lastMouseX: number = 0; protected lastMouseY: number = 0; protected yawPitchRoll: Laya.Vector3 = new Laya.Vector3();...
来源: Laya3.0_文档 发布时间: 20241014
...: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } event1(p1:any, p2:any): void { console.log("event1",p1,p2); } } 在脚本中创建event1的方法和接收两个参数,最后我们来运行动...
来源: Laya3.0_文档 发布时间: 20230519