<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Melvin Debot</title>
    <description>The latest articles on DEV Community by Melvin Debot (@melvin_debot).</description>
    <link>https://dev.to/melvin_debot</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F689693%2F25e4964b-8cc7-487c-ae2a-8dcce6588878.png</url>
      <title>DEV Community: Melvin Debot</title>
      <link>https://dev.to/melvin_debot</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/melvin_debot"/>
    <language>en</language>
    <item>
      <title>Delete a string that already exists in my array</title>
      <dc:creator>Melvin Debot</dc:creator>
      <pubDate>Wed, 22 Sep 2021 09:03:15 +0000</pubDate>
      <link>https://dev.to/melvin_debot/delete-a-string-that-already-exists-in-my-array-2lh9</link>
      <guid>https://dev.to/melvin_debot/delete-a-string-that-already-exists-in-my-array-2lh9</guid>
      <description>&lt;p&gt;I would like to know if it is possible to delete a string already existing in my table my table when I push values with my input range&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;['--brightness 7 ', '--contrast 16 ', '--saturation 52 ','--contrast 4 ']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the result I would like &lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

['--brightness 7 ',  '--saturation 52 ','--contrast 4 ']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>array</category>
    </item>
    <item>
      <title>I can't import my obj file in Three Js</title>
      <dc:creator>Melvin Debot</dc:creator>
      <pubDate>Thu, 19 Aug 2021 15:45:57 +0000</pubDate>
      <link>https://dev.to/melvin_debot/i-can-t-import-my-obj-file-in-three-js-5409</link>
      <guid>https://dev.to/melvin_debot/i-can-t-import-my-obj-file-in-three-js-5409</guid>
      <description>&lt;p&gt;the error &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gAdQ9r6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwv17n885bf6cx1kisny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gAdQ9r6n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwv17n885bf6cx1kisny.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;br&gt;
Html&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="file" id="importMesh" accept=".obj"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Javascript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let scene = new THREE.Scene();
let camera = new THREE.PerspectiveCamera(
  75,
  window.innerWidth / window.innerHeight,
  0.1,
  1000
);
const mouse = new THREE.Vector2();
let raycaster = new THREE.Raycaster();
let arrayObject = [];
let canvas = document.getElementById('canvas')

let renderer = new THREE.WebGLRenderer({ alpha: true });
renderer.setClearColor(0xe5e5e5);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);


camera.position.z = 250;

let controls = new THREE.OrbitControls(camera, renderer.domElement);
controls.enableDamping = true;
controls.campingFactor = 0.25;
controls.enableZoom = true;

let keyLight = new THREE.DirectionalLight(
  new THREE.Color("hsl(70,100%,75%)"),
  1.0
);
keyLight.position.set(-100, 0, 100);

let fillLight = new THREE.DirectionalLight(
  new THREE.Color("hsl(240, 100%, 75%)"),
  0.75
);
fillLight.position.set(100, 0, 100);

let backLight = new THREE.DirectionalLight(0xffffff, 1.4);
backLight.position.set(100, 50, -100); 

scene.add(keyLight);
scene.add(fillLight);
scene.add(backLight);


let input = document.getElementById("importMesh");
input.addEventListener("change", function(event) {
  var file = this.files[0];
  console.log('file',file)
  var reader = new FileReader();
  reader.addEventListener("load", function (event) {
    var contents = event.target.result;
    let loader = new THREE.OBJLoader();
    let geometry = loader.parse(contents);
    console.log("load object", geometry);
    var material = new THREE.MeshStandardMaterial({
      vertexColors: true,
      color: 0xec0404,
      overdraw: 0.5,
    });

    var mesh = new THREE.Mesh(geometry, material);

    mesh.castShadow = true;
    mesh.receiveShadow = true;

    scene.add(mesh);
  }, false);
  if (reader.readAsBinaryString !== undefined) {
    reader.readAsBinaryString(file);
  } else {
    reader.readAsArrayBuffer(file);
  }
});

let animate = function() {
  requestAnimationFrame(animate);
  renderer.render(scene, camera);
};

animate();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>threejs</category>
    </item>
  </channel>
</rss>
