Obscured painting surface appearance using Three.js

I am attempting to incorporate a blurred texture into my Three.js scene, but the results are not what I expected.

Canvas:

var c = document.getElementById("myCanvas");
var context1 = c.getContext("2d");

context1.filter = "blur(16px)";
context1.beginPath();
context1.fillStyle = "red";
context1.moveTo(35, 65);
context1.lineTo(905, 55);
context1.lineTo(605, 155);
context1.lineTo(65, 105);
context1.fill();

Canvas texture: http://jsfiddle.net/7Lzag9kc/

Three.js material:

var texture1 = new THREE.Texture(canvas1) 
texture1.needsUpdate = true;

var material = new THREE.MeshBasicMaterial({ 
     map: texture1,
     transparent: true, 
     side: THREE.DoubleSide, 
     alphaTest: 0.5
});

Three.js scene: http://jsfiddle.net/h31wv2xb/5/

What could be the issue here?

Answer №1

Consider eliminating the "alphaTest" parameter from your texture initialization.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Disable the stack label in a specific column of a stacked column chart using Highcharts

Looking at this stacked column graph in the fiddle link, you'll notice that one column is in grey color to indicate that it is disabled. I am trying to figure out how to hide the total from the top of the column that is grey or belongs to the 'Pe ...

Automatically shutting windows using jQuery after a certain number of seconds

I am currently trying to find a solution to this issue. The problem I am facing is that I need to close a window after it has been open for 7 seconds each time. I have managed to make the windows close using SetInterval, however, the timing is not precise ...

Expressjs Error- ReferenceError: cors has not been defined in this context

While working on creating a backend using ExpressJs, I encountered an error when running the backend. app.use(cors()) ^ ReferenceError: cors is not defined at Object.<anonymous> (C:\Users\hp\Desktop\Entri\kanba\ ...

Is there a way to navigate to a specific div when clicking on it?

Need help with scrolling after running code function scrollFunction() { document.getElementById('insert').scrollIntoView(); } I have a button that triggers some code and I want the page to scroll afterwards. Currently, it scroll ...

Issue with Mongoose: Create operations are not functioning properly right after performing Delete operations

I need to refresh my collection by deleting all existing documents and then repopulating them with new data from an API call. But when I try running the delete operations first, no new documents are created. Below is a simplified version of my controller ...

Utilizing the "return" keyword in Javascript outside of function declarations

Exploring the Impact of Using the Return Keyword in JavaScript Scripts Beyond Functions in Browsers and Node.js Recently, I experimented with utilizing the return keyword in a Node.js script like so: #!/usr/bin/env node return 10; My initial assumption ...

Tips for sending a JavaScript parameter to PHP

I am implementing a pop-up modal window that retrieves data from the myForm and saves the email field value to a JavaScript variable in index.php. How can I pass this JavaScript value to PHP and display it using echo, without refreshing the index.php windo ...

VueJS fails to display table information

I am facing an issue with rendering data from my API using VueJS 2. Although the backend services are successfully sending the data, the HTML table does not display it. There are no errors shown in the debug console, and even the Vue Debug extension for Fi ...

What advantages does NextJS offer that set it apart from other frameworks that also provide Server Side Render solutions?

I'm diving into the world of NextJS and as I explore this topic, one burning question arises: "What is the necessity of utilizing NextJS?" From what I understand, NextJS excels in rendering pages from the server and is heavily reliant on ReactJS. Howe ...

Add the word "String" in front of the moment timestamp

In my project, I have used React along with Material UI to show the message Running check... when the clicked state is set to true. If it's not true, then I am displaying a timestamp by utilizing the react-moment library. <Typography gutterBottom ...

transform a nested JavaScript object into a one-dimensional array

There is a JavaScript object in the following format: { "draw": "", "columns": [ { "data": "userid", "name": "", "searchable": true, "search": { "value": "", "regex": false } } ] } I want to tra ...

Managing events inside a JQuery dialog box

Currently, I have successfully implemented a JQuery dialog that allows users to change their password. The functionality works smoothly as the system checks if the two passwords match and if the new password meets the minimum requirements before making an ...

Retrieving saved data from LocalStorage upon page reload

<div ng-repeat="section in filterSections"> <h4>{{ section.title }}</h4> <div class="checkbox" ng-click="loaderStart()" ng-if="section.control == 'checkbox'" ng-repeat="option in section.options"> <label ...

Submit a form to the same page without reloading and toggle the visibility of a div after submission

Is there a way to submit a form without refreshing the page and hiding the current div while showing a hidden one? I attempted to use the following code, but it ends up submitting the form and reloading the page. <form method="post" name="searchfrm" a ...

How to incorporate a routing file within another routing file in Node.js

I have structured my routes as follows: / /business /business/stuff1 /business/stuff2 /business/admin For /business, I am using a separate file for the routing and functions. And similarly, for /business/admin, I also want to use a separate file f ...

The system encountered an error while trying to access the property "slug

I am currently working on a project that involves using next.js and wordpress. I have set up my api.js file, but I encountered an issue when trying to access the [slug] property from another component. The error message displayed is "Typerror: Cannot read ...

The application of Uglify to eliminate console logs can be inconsistent in its effectiveness

Having some trouble with my Vue3 app. I've implemented UglifyJS to remove console.logs in production environments, but it seems to be inconsistent. Sometimes it works fine, other times not so much. Every time I have to rebuild and hope for the best. I ...

What information is transferred when the submit button on a form is clicked?

Currently, I am utilizing node.js along with the jade templating engine. Within my jade file, I have a form structured like this: form.form-signin(style="padding-left:10px", action='/update', method='post') table.table.table-hove ...

extract the key identifier from the JSON reply

My JSON ResponseData example for form0 is provided below: { "MaterialType": "camera", "AssetID": 202773, "forms": [ { "release": "asyncCmd/accessCameraMulti", "action": "rest/Asset/202773/cameraAccessMultiple", ...

The disappearing act of the Show/Hide Button in Sencha Touch 2.3.1: what's the

I'm running into an issue with my sencha touch app. Here is the container I have defined: { xtype: 'container', text: 'SOMETHING', height: '15%', width: '15%', ...