JavaScript
import * as THREE from "https://threejs.org/build/three.module.js";
import { SVGLoader } from "https://threejs.org/examples/jsm/loaders/SVGLoader.js";
var camera, scene, renderer, geometry, material, mesh;
init();
animate();
function init() {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.set( 0, 0, 500 );
scene.add(camera);
let loader = new SVGLoader();
var data = loader.parse(
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="logosvg.com" x="0px" y="0px" viewBox="0 0 400 300" style="enable-background:new 0 0 400 300;" xml:space="preserve"> <style type="text/css"> .st0{fill:#FF0000;} </style> <path id="logo" class="st0" d="M256,140.7c0,2.4,3.5,3.4,8.3,5.2c8.7,3.1,19.4,7.4,19.4,20.1c0,12.1-9.9,20.7-27.4,20.7 c-10.1,0-19.5-2.9-26.1-7.7l2.9-18.6c6.4,5.7,16.1,9.7,23.2,9.7c4.9,0,7.3-2,7.3-4c0-2.5-3.7-3.8-8.4-5.5 c-7.8-2.6-19.3-6.4-19.3-18.9c0-11.9,9.6-21.2,27.2-21.2c8.9,0,16.6,2.5,22.2,5.5l-2.5,17.1c-4.6-2.6-12.1-5.9-19.4-6 C258.4,137,256,138.7,256,140.7z M81.1,121.8l-9.6,63.1H53.7h-3l1.4-6.1c-5.2,6.1-11.5,7.9-18.9,7.9c-13.3,0-23.9-11.1-23.9-28.6 c0-21.8,14.5-37.8,31.2-37.8c5.3,0,15.3,0.7,18.6,7.3l1.2-5.5h0v-0.2H81.1z M55.2,153.1c0-6.9-5.5-12.6-12.5-12.6 c-7,0-12.6,5.6-12.6,12.6c0,7,5.4,12.6,12.6,12.6C49.6,165.7,55.3,160.2,55.2,153.1z M233.1,121.8l-9.6,63.1h-17.9h-3l1.4-6.1 c-5.2,6.1-11.5,7.9-18.9,7.9c-13.3,0-23.9-11.1-23.9-28.6c0-21.8,14.5-37.8,31.2-37.8c5.3,0,15.3,0.7,18.6,7.3l1.2-5.5h2.1v-0.2 H233.1z M207.3,153.1c0-6.9-5.5-12.6-12.5-12.6c-7,0-12.6,5.6-12.6,12.6c0,7,5.4,12.6,12.6,12.6 C201.6,165.7,207.3,160.2,207.3,153.1z M390.7,121.8l-9.6,63.1h-17.9h-3l1.4-6.1c-5.2,6.1-11.5,7.9-18.9,7.9 c-13.3,0-23.9-11.1-23.9-28.6c0-21.8,14.5-37.8,31.2-37.8c5.3,0,15.3,0.7,18.6,7.3l1.2-5.5h2.1v-0.2H390.7z M364.8,153.1...