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

大约有 420 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0039 秒)

231. 鼠标事件能否在有图形的区域感应,特别是子项坐标为负数时(已经找到问题) [ 58%]

... import laya.display.Sprite; import laya.events.Event; public class MainUi extends Sprite { private var testPan:Sprite; public function MainUi() { super(); this.graphics.drawRect(0,0,500,500,"#fff0cc"); testPan = new Sprite(); testPan.name = "testPan"; this.addChild( testPan ); testPan.pos( 300,300)...

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

232. 多光源渲染(TypeScript-3D基础(TS)-LayaAir3D之灯光) [ 58%]

... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...

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

233. 多光源渲染(JavaScript-3D基础(JS)-LayaAir3D之灯光) [ 58%]

... > 移动灯光脚本 ```typescript export default class LightMoveScript extends Laya.Script3D { //需要操作的光源数组 public lights = []; //光源对应的位置偏移数组 public offsets = []; //光源对应的移动半径数组 public moveRanges = []; public onUpdate(){ var seed = Laya.t...

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

234. CameraMoveScript.as在哪儿下载群里的有错 [ 58%]

...ents.KeyBoardManager; /** * ... * @author */ public class CameraMoveScript extends Script { protected var lastMouseX:Number; protected var lastMouseY:Number; protected var yawPitchRoll:Vector3 = new Vector3(); protected var resultRotation:Quaternion = new Quaternion(); protected var tempRotationZ:Qu...

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

235. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 58%]

...是IDE篇的。   我试着用代码实现物理效果class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:l...

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

236. Laya2.7.1 射线提示rayCast未定义 [ 58%]

Laya2.7.1 射线提示rayCast未定义 export default class click3d extends Laya.Script3D{ constructor() { super(); //创建场景 this.scene = Laya.stage.addChild(new Laya.Scene3D()); //添加相机 this.camera = (this.scene.addChild(new Laya.Camera(0, 0.1, 100))); this.camera.transform.translate(...

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

237. Laya.timer.loop() 报错 Cannot read property 'loop' of null [ 58%]

...laya/ui/List"; import { Laya } from "laya"; export default class test_move extends Image{ // /** @prop {name:move_img, tips:"用来移动的箭头", type:Image} */ // public _move_img: Image; // public _list: List; //创建一个 List 类的实例对象 list 。 private n:number = 0; private x0:numb...

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

238. 预设/场景的导出(TypeScript-3D基础(TS)-LayaAir3D之3D场景可视化编辑) [ 58%]

...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { constructor(){ super(); //加载场景 Laya.Scene3D.load('LayaScene_test/Conventional/test.ls',Laya.Handler.create(this,this.onComplete)); } /** * 加载完成 */ private onComplete(scene:Laya.Sce...

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

239. ios苹果手机,同时播放声音出现巨大杂音 [ 58%]

...如下:附件是两个音频文件   export default class GameMain extends Laya.Scene {     constructor() {          super();          //设置单例的引用方式,方便其他类引用         GameMain.instance = this;         //加载场景文...

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

240. import自己写的类,new出来后为什么一片漆黑 [ 58%]

...并且创建一个类。代码如下:module npc { export class BaseNPC extends Laya.Sprite { constructor() { super(); this.graphics.drawCircle(0, 0, 10, "#ff0000"); } } }   然后在我的主文件中import,并new出来。代码如下:import BaseNPC = npc.BaseNPC; var npcc:BaseNPC = new BaseN...

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