https://i.sstatic.net/X7snd.png Recently diving into Three.js, I am faced with a challenge. I am attempting to display a 3D model in the canvas along with a logo and text message. However, when I try to capture the canvas using
renderer.domElement.toDataURL('image/jpeg')
, only the model image is captured, excluding the logo and text elements.
Attached is an example image for reference. How can I successfully capture the 3D model along with the logo and text elements included?
<canvas height="1024" id="stageCanvas" width="1024" style="cursor: pointer"></canvas>
<div ng-class="{'preview-gif-option1': gifImageType.type == 'Option 1'}" ng-if="gifImageType.type == 'Option 1'">
<img ng-src="{{watermarkImage}}" ng-show="watermarkImage != null" alt="" style="height:100px;width:100px" />
<pre>{{addressInfo.value}}</pre>
</div>
$scope.captureJpg = function() {
renderer.render(scene, camera);
renderer.setSize(WIDTH / 2, HEIGHT / 2);
rotateAngle = 0;
rotateObject(rotateAngle);
animate();
$scope.captureClicked = false;
console.log(renderer.domElement.toDataURL('image/jpeg'));
};