<!DOCTYPEhtml><html><head><metacharset="utf-8"><title>立方体</title><style>body{margin: 0;}</style></head><body><scriptsrc="https://unpkg.com/three/build/three.js"></script><script>// Our Javascript will go here.</script></body></html>
2.创建一个场景
const scene =newTHREE.Scene();const camera =newTHREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight,0.1,1000);const renderer =newTHREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
Transformation(2D-Model)
Scale(缩放) [ x ′ y ′ ] [ s 0 0 s ] [ x y ] (等比例缩放) \left[ \begin{matrix} x \\ y \end{matrix} \right] \left[ \begin{matrix} s & 0 \\ 0 & s \end{matrix} \right] \left[ \begin{matrix} x \\ y \en…