大约有 87 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0027 秒)
...次触碰,并未发生移动 if (first){ //获取触碰点的位置 lastPosition.x = touch.position.x; lastPosition.y = touch.position.y; first = false; } else{ //移动触碰点 var deltaY:int = touch.position.y - lastPosition.y; var deltaX:int = touch.position.x - lastPosition.x; lastPosition.x ...
来源: Laya2.0_文档 发布时间: 20210715
...,并未发生移动 if (this.first){ //获取触碰点的位置 this.lastPosition.x = this.touch.position.x; this.lastPosition.y = this.touch.position.y; first = false; } else{ //移动触碰点 var deltaY = this.touch.position.y - this.lastPosition.y; var deltaX = this.touch.position.x - this.las...
来源: Laya2.0_文档 发布时间: 20210715
...,并未发生移动 if (this.first){ //获取触碰点的位置 this.lastPosition.x = this.touch.position.x; this.lastPosition.y = this.touch.position.y; first = false; } else{ //移动触碰点 var deltaY = this.touch.position.y - this.lastPosition.y; var deltaX = this.touch.position.x - this.las...
来源: Laya2.0_文档 发布时间: 20210715
...: 顶点着色器 `outline.vs` 代码如下: ```c++ attribute vec4 a_Position; attribute vec3 a_Normal; uniform mat4 u_MvpMatrix; uniform float u_OutlineWidth; void main() { vec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0); gl_Position = u_MvpMatrix * position; } ``` 片元...
来源: Laya2.0_文档 发布时间: 20210714
...&group=Advance&name=Secne3DPlayer2D)) ```typescript //变换位置 this._position.x = Math.sin(this.scaleDelta += 0.01) * 2; this._position.z = Math.cos(this.scaleDelta += 0.01) * 2; //修改球的位置 this.sphere.transform.position = this._position; //计算位置 this._camera.viewport.project(...
来源: Laya2.0_文档 发布时间: 20210714
...&group=Advance&name=Secne3DPlayer2D)) ```typescript //变换位置 this._position.x = Math.sin(this.scaleDelta += 0.01) * 2; this._position.z = Math.cos(this.scaleDelta += 0.01) * 2; //修改球的位置 this.sphere.transform.position = this._position; //计算位置 this._camera.viewport.project(...
来源: Laya2.0_文档 发布时间: 20210715
...&group=Advance&name=Secne3DPlayer2D)) ```typescript //变换位置 this._position.x = Math.sin(this.scaleDelta += 0.01) * 2; this._position.z = Math.cos(this.scaleDelta += 0.01) * 2; //修改球的位置 this.sphere.transform.position = this._position; //计算位置 this._camera.viewport.project(...
来源: Laya2.0_文档 发布时间: 20210715
...ader.vs` 代码如下: ```c++ #include "Lighting.glsl"; attribute vec4 a_Position; uniform mat4 u_MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; gl...
来源: Laya2.0_文档 发布时间: 20210715
...: 顶点着色器 `outline.vs` 代码如下: ```c++ attribute vec4 a_Position; attribute vec3 a_Normal; uniform mat4 u_MvpMatrix; uniform float u_OutlineWidth; void main() { vec4 position = vec4(a_Position.xyz + a_Normal * u_OutlineWidth, 1.0); gl_Position = u_MvpMatrix * position; } ``` 片元...
来源: Laya2.0_文档 发布时间: 20210715
...ader.vs` 代码如下: ```c++ #include "Lighting.glsl"; attribute vec4 a_Position; uniform mat4 u_MvpMatrix; uniform mat4 u_WorldMat; attribute vec3 a_Normal; varying vec3 v_Normal; void main() { gl_Position = u_MvpMatrix * a_Position; mat3 worldMat=mat3(u_WorldMat); v_Normal=worldMat*a_Normal; gl...
来源: Laya2.0_文档 发布时间: 20210715