mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2025-01-22 00:55:09 +01:00
move render function
This commit is contained in:
parent
0314078463
commit
1de526f83f
@ -51,7 +51,6 @@ class DoodlePreview extends React.Component {
|
||||
const { setSize, render } = this.state;
|
||||
const { pixelRatio } = this.props;
|
||||
setSize(width, height, pixelRatio);
|
||||
render();
|
||||
});
|
||||
};
|
||||
|
||||
|
2
src/d3/createScene.js
vendored
2
src/d3/createScene.js
vendored
@ -66,6 +66,8 @@ export default function createScene(state, canvas) {
|
||||
|
||||
camera.aspect = width / height;
|
||||
camera.updateProjectionMatrix();
|
||||
|
||||
render();
|
||||
};
|
||||
|
||||
return { scene, camera, renderer, render, setSize };
|
||||
|
Loading…
x
Reference in New Issue
Block a user