Skip to content

Migration Guide

ChenMo edited this page Apr 21, 2023 · 32 revisions

0.9.0 → 1.0.0

  • 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 Time maximumDeltaTime

  • 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) => {
      ......
      }
  • 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

0.9.0 Beta → 0.9.0

  • The Oasis brand name has been changed to Galacean, and the corresponding npm package has also been changed from oasis-engine to @galacean/engine. Upgrade steps:

    • Change npm package from oasis-engine to @galacean/engine
    • Adjust all imports to @galacean/engine, for example: import { Entity } from "@galacean/engine;"

0.8.0 → 0.9.0 Beta

0.7.0 → 0.8.0

0.6.0 → 0.7.0

  • The physics param of WebGLEngine and Engine's constructor is removed, Please use PhysicsManager.initialize() to set the backend physics engine.
  • Rename TextureCubeMap to TextureMap.
  • RenderColorTexture and RenderDepthTexture are removed, the colorTextures and depthTexture of the RenderTarget need to adjust from RenderColorTexture and RenderDepthTexture to Texture.