|
@@ -19,24 +19,24 @@
|
|
|
颜色可以用以下任意一种方式初始化。
|
|
|
<code>
|
|
|
//empty constructor - will default white
|
|
|
- const color = new THREE.Color();
|
|
|
+ const color1 = new THREE.Color();
|
|
|
|
|
|
//Hexadecimal color (recommended)
|
|
|
- const color = new THREE.Color( 0xff0000 );
|
|
|
+ const color2 = new THREE.Color( 0xff0000 );
|
|
|
|
|
|
//RGB string
|
|
|
- const color = new THREE.Color("rgb(255, 0, 0)");
|
|
|
- const color = new THREE.Color("rgb(100%, 0%, 0%)");
|
|
|
+ const color3 = new THREE.Color("rgb(255, 0, 0)");
|
|
|
+ const color4 = new THREE.Color("rgb(100%, 0%, 0%)");
|
|
|
|
|
|
//X11 color name - all 140 color names are supported.
|
|
|
//Note the lack of CamelCase in the name
|
|
|
- const color = new THREE.Color( 'skyblue' );
|
|
|
+ const color5 = new THREE.Color( 'skyblue' );
|
|
|
|
|
|
//HSL string
|
|
|
- const color = new THREE.Color("hsl(0, 100%, 50%)");
|
|
|
+ const color6 = new THREE.Color("hsl(0, 100%, 50%)");
|
|
|
|
|
|
//Separate RGB values between 0 and 1
|
|
|
- const color = new THREE.Color( 1, 0, 0 );
|
|
|
+ const color7 = new THREE.Color( 1, 0, 0 );
|
|
|
</code>
|
|
|
|
|
|
|