reearth / resium

React components for 🌏 Cesium
https://resium.reearth.io
MIT License
746 stars 135 forks source link

The Graphics component using resium in version 1.17.3 has no effect, but 1.17.2 does #656

Open XiaoM-dev opened 7 months ago

XiaoM-dev commented 7 months ago

When i try to use BoxGraphics or other Graphics components, it didn't work。But after I returned the version of resium to 1.17.2, the display worked fine。

import {
  Viewer,
  Entity,
  BoxGraphics
} from "resium";
import { Cartesian3, Color } from "cesium";

const App: React.FC = () => {
  return (
    <Viewer
      full
      animation={false}
      creditDisplay={undefined}
      timeline={false}
      fullscreenButton={false}
      creditContainer={document.createElement("div")}
    >
      <Entity
        name="PointGraphics"
        description="PointGraphics!!"
        position={Cartesian3.fromDegrees(-74.0707383, 60.7117244, 100)}
      >
        <BoxGraphics material={Color.RED} dimensions={new Cartesian3(400000.0, 300000.0, 500000.0)} />
      </Entity>
    </Viewer>
  );
};

export default App;

I'm using: "cesium": "^1.116.0", "resium": "1.17.3", "vite": "^5.2.0", "vite-plugin-cesium": "^1.2.22"

phoenix850508 commented 7 months ago

I have the exact same problem here, it works fine using version 1.17.2, but many components are not showing when using 1.17.3

My specs are: "cesium": "^1.116.0", "next": "14.2.1", "react": "^18", "react-dom": "^18", "resium": "^1.17.2",