Răsfoiți Sursa

docs: added contact shadows to post

alvarosabu 2 ani în urmă
părinte
comite
ffa7bdae66
1 a modificat fișierele cu 28 adăugiri și 0 ștergeri
  1. 28 0
      docs/blog/announcing-v-2-1-0.md

+ 28 - 0
docs/blog/announcing-v-2-1-0.md

@@ -95,3 +95,31 @@ This was highly requested by the community, so thanks to everyone that contribut
   </TresCanvas>
 </template>
 ```
+
+#### Welcome `ContactShadows`
+
+![Contact Shadows](https://cientos.tresjs.org/cientos/contact-shadows.png)
+
+We have added support for [Contact Shadows](https://threejs.org/examples/?q=cont#webgl_shadow_contact). Is a technique used in 3D graphics to create shadows that appear where objects meet or "contact" each other. This is different from traditional shadowing techniques, which often only create shadows based on the position of a light source relative to an object.
+
+```html {11}
+<template>
+  <TresCanvas v-bind="gl">
+    <TresPerspectiveCamera :position="[11, 11, 11]" />
+    <OrbitControls />
+    <Box ref="boxRef" :args="[0.4, 0.4, 0.4]" :position="[0, 1, 0]">
+      <TresMeshNormalMaterial />
+    </Box>
+    <Icosahedron ref="icoRef" :args="[0.3]" :position="[1, 1, 1]">
+      <TresMeshNormalMaterial />
+    </Icosahedron>
+    <ContactShadows :blur="0.5" :resolution="512" :opacity="0.2" />
+    <Plane :args="[10, 10, 10]" :position="[0, -0.02, 0]">
+      <TresMeshBasicMaterial :color="'#ffffff'" />
+    </Plane>
+    <TresAmbientLight :intensity="1" />
+  </TresCanvas>
+</template>
+```
+
+### Precipitation abstraction