Answer the question
In order to leave comments, you need to log in
How to assign three.js to display content?
In all three.js examples, the canvas block is inserted programmatically, something like this:
var figure = document.getElementById ('....'); // блочный элемент, куда вставляю рендер
figure.appendChild( renderer.domElement );
<canvas id="threejs_here"> </canvas>
Answer the question
In order to leave comments, you need to log in
I want to write directly in HTML and somehow assign this canvas for three.js render output<canvas id="threejs_here"> </canvas>
<canvas ref="threejs"></canvas>
new THREE.WebGLRenderer({
canvas: this.$refs.threejs,
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question