-
-
Notifications
You must be signed in to change notification settings - Fork 395
Migration Guide
-
Transformdirection-related API adjusted from method to property:-
getWorldForward(forward: Vector3)->get worldForward -
getWorldRight(right: Vector3)->get worldRight -
getWorldUp(up: Vector3)->get worldUp
-
-
Time-related adjustments:
-
Redesign
Timeand unified time unit to second -
Migrate PhysicsManager
maxAllowedTimeStepto TimemaximumDeltaTime
-
-
Parameter adjustment related to physical collision in the script:
-
onCollisionEnter(other: ColliderShape): void->onCollisionEnter(other: Collision): void -
onCollisionExit(other: ColliderShape): void->onCollisionExit(other: Collision): void -
onCollisionStay(other: ColliderShape): void->onCollisionStay(other: Collision): void
-
-
glTF Loader Asset type adjustment,
AssetType.Prefab->AssetType.GLTF -
The initialization of the engine is adjusted to be asynchronous:
-
Canvas and WebGL graphic device parameter adjustment, before:
new WebGLEngine("canvas",{alpha:true})
Now:
WebGLEngine.create({ canvas: "canvas"}, graphicDeviceOptions:{alpha:true}})
-
PhyscX backend does not require a separate initialization,before:
PhysXPhysics.initialize().then(() => { const engine = new WebGLEngine("canvas"); engine.physicsManager.initialize(PhysXPhysics); ...... }
Now:
WebGLEngine.create({ canvas: "canvas", physics: new PhysXPhysics()}).then( (engine) => { ...... }
-
-
SkyBoxMaterial
textureCubeMap->texture -
Built-in shader variables and macro changes:
-
u_viewMat->camera_ViewMat -
u_projMat->camera_ProjMat -
u_VPMat->camera_VPMat -
u_viewInvMat->camera_ViewInvMat -
u_cameraPos->camera_Position -
u_localMat->renderer_LocalMat -
u_modelMat->renderer_ModelMat -
u_MVMat->renderer_MVMat -
u_MVPMat->renderer_MVPMat -
u_normalMat->renderer_NormalMat -
u_normalTexture->material_NormalTexture -
u_normalIntensity->material_NormalIntensity -
u_baseColor->material_BaseColor -
u_metal->material_Metal -
u_roughness->material_Roughness -
u_PBRSpecularColor->material_PBRSpecularColor -
u_glossiness->material_Glossiness -
u_alphaCutoff->material_AlphaCutoff -
u_roughnessMetallicTexture->material_RoughnessMetallicTexture -
u_shadowInfo->scene_ShadowInfo -
oasis_RendererLayer->renderer_Layer -
u_directLightCullingMask->scene_DirectLightCullingMask -
u_directLightColor->scene_DirectLightColor -
u_directLightDirection->scene_DirectLightDirection -
u_pointLightCullingMask->scene_PointLightCullingMask -
u_pointLightPosition->scene_PointLightPosition -
u_pointLightDistance->scene_PointLightDistance -
u_spotLightCullingMask->scene_SpotLightCullingMask -
u_spotLightColor->scene_SpotLightColor -
u_spotLightPosition->scene_SpotLightPosition -
u_spotLightDirection->scene_SpotLightDirection -
u_spotLightDistance->scene_SpotLightDistance -
u_spotLightAngleCos->scene_SpotLightAngleCos -
u_spotLightPenumbraCos->scene_SpotLightPenumbraCos -
u_env_specularSampler->scene_EnvSpecularSampler -
u_env_sh->scene_EnvSH -
u_envMapLight->scene_EnvMapLight -
u_occlusionTextureCoord->material_OcclusionTextureCoord -
u_occlusionTexture->material_OcclusionTexture -
u_occlusionIntensity->material_OcclusionIntensity -
u_emissiveColor->material_EmissiveColor -
u_emissiveTexture->material_EmissiveTexture -
O3_HAS_NORMAL->RENDERER_HAS_NORMAL -
O3_HAS_TANGENT->RENDERER_HAS_TANGENT -
NORMALTEXTURE->MATERIAL_HAS_NORMALTEXTURE -
HAS_CLEARCOATNORMALTEXTURE->MATERIAL_HAS_CLEAR_COAT_NORMAL_TEXTURE -
BASETEXTURE->MATERIAL_HAS_BASETEXTURE -
ALPHA_CUTOFF->MATERIAL_IS_ALPHA_CUTOFF -
ROUGHNESSMETALLICTEXTURE->MATERIAL_HAS_ROUGHNESS_METALLIC_TEXTURE -
O3_DIRECT_LIGHT_COUNT->SCENE_DIRECT_LIGHT_COUNT -
O3_POINT_LIGHT_COUNT->SCENE_POINT_LIGHT_COUNT -
O3_SPOT_LIGHT_COUNT->SCENE_SPOT_LIGHT_COUNT -
OASIS_CALCULATE_SHADOWS->SCENE_IS_CALCULATE_SHADOWS -
O3_USE_SPECULAR_ENV->SCENE_USE_SPECULAR_ENV -
O3_USE_SH->SCENE_USE_SH -
O3_USE_SPECULAR_ENV->SCENE_USE_SPECULAR_ENV -
OCCLUSIONTEXTURE->MATERIAL_HAS_OCCLUSION_TEXTURE -
O3_HAS_UV1->RENDERER_HAS_UV1 -
EMISSIVETEXTURE->MATERIAL_HAS_EMISSIVETEXTURE
-
-
The Oasis brand name has been changed to Galacean, and the corresponding
npmpackage has also been changed fromoasis-engineto@galacean/engine. Upgrade steps:- Change
npmpackage fromoasis-engineto@galacean/engine - Adjust all imports to
@galacean/engine, for example:import { Entity } from "@galacean/engine;"
- Change
-
InputManagersupport get multipointerdetailed data ability,InputManager.pointerMovingDeltacan useInputManager.pointers[x].deltaPositioninstead,InputManager.pointerPositionuseInputManager.pointers[x].positioninstead https://github.com/ant-galaxy/oasis-engine/pull/1005
- Sprite region origin should adjust from letf-top to left-bottom https://github.com/oasis-engine/engine/pull/809
- Math library
cloneTohas deleted, should usecopyFrominstead https://github.com/oasis-engine/engine/pull/844 - Math library
setValuehas deleted, should usesetinstead https://github.com/oasis-engine/engine/pull/844 -
CameraClearFlagshas been modifiedCameraClearFlags.DepthColor->CameraClearFlags.All,CameraClearFlags.Depth->CameraClearFlags.DepthStencilby @cptbtptpbcptdtptp in https://github.com/oasis-engine/engine/pull/843
- The
physicsparam ofWebGLEngineandEngine's constructor is removed, Please usePhysicsManager.initialize()to set the backend physics engine. - Rename TextureCubeMap to TextureMap.
-
RenderColorTextureandRenderDepthTextureare removed, thecolorTexturesanddepthTextureof theRenderTargetneed to adjust fromRenderColorTextureandRenderDepthTexturetoTexture.