Merge pull request #5764 from cocos-creator/3d-v1.0.1

Merge 3d v1.0.1
This commit is contained in:
pandamicro
2019-11-19 18:16:15 +08:00
committed by GitHub
3 changed files with 6 additions and 20 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ export class RenderScene {
* 获取 raycastSingleModel 后的检测结果
*/
get rayResultSingleModel () {
return this.rayResultSingleModel;
return resultSingleModel;
}
public static registerCreateFunc (root: Root) {
-14
View File
@@ -166,27 +166,13 @@ export class SplashScreen {
this.effect.shaders = this.program.shaders;
this.effect.onLoaded();
this.callBack = null;
this.cancelAnimate = false;
this.startTime = -1;
this.clearColors = [this.setting.clearColor];
this.device = device;
/** IOS adapt, use native size */
this.screenWidth = this.device.width;
this.screenHeight = this.device.height;
if (this.device.nativeWidth < this.device.nativeHeight) {
if (this.device.width > this.device.height) {
this.screenWidth = this.device.height;
this.screenHeight = this.device.width;
}
} else {
if (this.device.width < this.device.height) {
this.screenWidth = this.device.height;
this.screenHeight = this.device.width;
}
}
this.image = new Image();
this.image.onload = this.init.bind(this);
+5 -5
View File
@@ -149,7 +149,7 @@ export class PhysicsSystem extends System {
'group': -1,
'mask': -1,
'queryTrigger': true,
'maxDistance': Infinity
'maxDistance': 10000000
}
private readonly raycastResultPool = new RecyclePool<PhysicsRayResult>(() => {
@@ -198,12 +198,12 @@ export class PhysicsSystem extends System {
* 检测所有的碰撞盒,并记录所有被检测到的结果,通过 PhysicsSystem.instance.raycastResults 访问结果
* @param worldRay 世界空间下的一条射线
* @param mask 掩码
* @param maxDistance 最大检测距离
* @param maxDistance 最大检测距离,目前请勿传入 Infinity 或 Number.MAX_VALUE
* @param queryTrigger 是否检测触发器
* @return boolean 表示是否有检测到碰撞盒
* @note 由于目前 Layer 还未完善,mask 暂时失效,请留意更新公告
*/
public raycast (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = Infinity, queryTrigger = true): boolean {
public raycast (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = 10000000, queryTrigger = true): boolean {
this.raycastResultPool.reset();
this.raycastResults.length = 0;
this.raycastOptions.mask = mask;
@@ -217,12 +217,12 @@ export class PhysicsSystem extends System {
* 检测所有的碰撞盒,并记录与射线距离最短的检测结果,通过 PhysicsSystem.instance.raycastClosestResult 访问结果
* @param worldRay 世界空间下的一条射线
* @param mask 掩码
* @param maxDistance 最大检测距离
* @param maxDistance 最大检测距离,目前请勿传入 Infinity 或 Number.MAX_VALUE
* @param queryTrigger 是否检测触发器
* @return boolean 表示是否有检测到碰撞盒
* @note 由于目前 Layer 还未完善,mask 暂时失效,请留意更新公告
*/
public raycastClosest (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = Infinity, queryTrigger = true): boolean {
public raycastClosest (worldRay: ray, mask: number = Layers.Enum.DEFAULT, maxDistance = 10000000, queryTrigger = true): boolean {
this.raycastOptions.mask = mask;
this.raycastOptions.maxDistance = maxDistance;
this.raycastOptions.queryTrigger = queryTrigger;