-
-
Notifications
You must be signed in to change notification settings - Fork 310
Migration Guide
-
Transform direction-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
Time
and unified time unit to second -
Migrate PhysicsManager
maxAllowedTimeStep
to 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 parameter adjustment:
new WebGLEngine("canvas")
->WebGLEngine.create({ canvas: "canvas"})
- WebGL graphic device parameter adjustment:
new WebGLEngine("canvas",{alpha:true})
->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) => { ...... }
- Canvas parameter adjustment:
-
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
-
-
The Oasis brand name has been changed to Galacean, and the corresponding
npm
package has also been changed fromoasis-engine
to@galacean/engine
. Upgrade steps:- Change
npm
package fromoasis-engine
to@galacean/engine
- Adjust all imports to
@galacean/engine
, for example:import { Entity } from "@galacean/engine;"
- Change
-
InputManager
support get multipointer
detailed data ability,InputManager.pointerMovingDelta
can useInputManager.pointers[x].deltaPosition
instead,InputManager.pointerPosition
useInputManager.pointers[x].position
instead 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
cloneTo
has deleted, should usecopyFrom
instead https://github.com/oasis-engine/engine/pull/844 - Math library
setValue
has deleted, should useset
instead https://github.com/oasis-engine/engine/pull/844 -
CameraClearFlags
has been modifiedCameraClearFlags.DepthColor
->CameraClearFlags.All
,CameraClearFlags.Depth
->CameraClearFlags.DepthStencil
by @cptbtptpbcptdtptp in https://github.com/oasis-engine/engine/pull/843
- The
physics
param ofWebGLEngine
andEngine
's constructor is removed, Please usePhysicsManager.initialize()
to set the backend physics engine. - Rename TextureCubeMap to TextureMap.
-
RenderColorTexture
andRenderDepthTexture
are removed, thecolorTextures
anddepthTexture
of theRenderTarget
need to adjust fromRenderColorTexture
andRenderDepthTexture
toTexture
.