Create a 3D visual display with the use of three.js in Javascript

I'm navigating my second round with three.js and have been experimenting for a good 3 hours. However, I seem to be at a loss when it comes to determining my next steps.

My goal is to create something similar to the layout found here:

I've managed to set up the scene and all, but am struggling to find a method to arrange the products as seen on the website (not to mention implementing click events and camera movement towards the selected product).

Any suggestions or leads would be greatly appreciated!

EDIT:

Here's how I've attempted to arrange the products:

    arrangeProducts: function () {
        var self = this;

        this.products.forEach(function (element, index) {

            THREE.ImageUtils.crossOrigin = '';

            element.image = 'http://i.imgur.com/CSyFaYS.jpg';

            //texture
            var texture = THREE.ImageUtils.loadTexture(element.image, null);
            texture.magFilter = THREE.LinearMipMapLinearFilter;
            texture.minFilter = THREE.LinearMipMapLinearFilter;

            //material
            var material = new THREE.MeshBasicMaterial({
                map: texture
            });

            //plane geometry
            var geometry = new THREE.PlaneGeometry(element.width, element.height);

            //plane
            var plane = new THREE.Mesh(geometry, material);
            plane.overdraw = true;

            //set the random locations
            /*plane.position.x = Math.random() * (self.container.width - element.width);
            plane.position.y = Math.random() * (self.container.height - element.height);*/
            plane.position.z = -2500 + (Math.random() * 50) * 50;

            plane.position.x = Math.random() * self.container.width - self.container.width / 2;
            plane.position.y = Math.random() * 200 - 100;

            //add the plane to the scene
            self.scene.add(plane);
        });
    },

EDIT 2:

I've realized that I need to incorporate around 5 transparent concentric cylinders, place the products at random locations on each one, and position the camera in the center to rotate. However, I'm stuck on how to randomly place the images on the cylinders. Any insights on this would be incredibly helpful!

Answer №1

Exploring the three.js website will lead you to discover a plethora of inspiring examples that demonstrate the incredible possibilities and techniques within. However, mastery requires more than just 3 hours of browsing.

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

Using Angular to display asynchronous data with ngIf and observables

In cases where the data is not ready, I prefer to display a loader without sending multiple requests. To achieve this, I utilize the as operator for request reuse. <div class="loading-overlay" *ngIf="this.indicatorService.loadingIndicators[this?.indic ...

Testing Vue with Jest - Unable to test the window.scrollTo function

Is there a way to improve test coverage for a simple scroll to element function using getBoundingClientRect and window.scrollTo? Currently, the Jest tests only provide 100% branch coverage, with all other areas at 0. Function that needs testing: export de ...

Is there a way to retrieve data from a sealed JSON object using JavaScript?

The data is being fetched from the API and here is the response object: { "abc": [{ "xyz": "INFO 1", "pqr": "INFO 2" }, { "xyz": "INFO 3", "pqr": "INFO 4" } ] } We are lookin ...

Unable to retrieve scope data in controller function

Having trouble accessing the scope attribute fullName from the controller method login. What could be causing this issue? App.controller('LoginController', ['$scope', 'LoginService', '$location', function(scope, Log ...

Challenges with synchronizing Highcharts horizontally

I have been working on implementing synchronized charts in my application by using the example code provided by Highcharts here. My layout consists of columns created with the Materialize framework, and I placed the charts side by side in a row. However, I ...

Using client-side navigation within an integrated Shopify application

Seeking assistance in implementing client-side routing with react-router within a Shopify app that is embedded. Following the guidelines provided by Shopify on this page, but unsure about what needs to be included in a ./Routes file. Attempted to find rela ...

Error encountered while utilizing the infinite-react-carousel package in React

After entering "npm i infinite-react-carousel --save" into the terminal, an error message appears: "npm ERR! code ERESOLVE "npm ERR! ERESOLVE unable to resolve dependency tree" What could be causing this issue? How can I troubleshoot and resolve it? I h ...

Deactivate and circumvent Angular routing outside of the specified route URL

I am looking for a way to disable and bypass Angular routing when I have static pages or PHP-rendered views in my hybrid PHP and AngularJS app. Instead of being redirected by Angular's routing, I want to perform a full page reload to the routed link o ...

Just starting out with jQuery: seeking advice on a user-friendly slideshow plugin, any tips on troubleshooting?

I am currently trying to incorporate a basic jquery slideshow plugin, but I seem to be encountering some difficulties. The documentation mentions the need to install 'grunt' and 'node dependencies', which is confusing to me as I am new ...

Issue with Jquery animation persists: mouse cursor does not change and style remains unchanged even after clicking

I have encountered an issue with JQuery animation on Chrome. According to the requirements, I need to animate a div when a link is clicked. When the cursor hovers over the link, it should be underlined and change to a pointer. However, even after clickin ...

JavaScript detecting improper XHTML syntax

Is there an effective method to detect malformed XHTML within a string using JavaScript? Given that my page allows user-generated XHTML (from trusted users) to be inserted into the DOM, I aim to identify unclosed or overly closed tags. If found, I intend ...

Variations in jQuery's append method when dealing with a string, a reference to a jQuery object

Here are multiple ways to add a div element to the body of an HTML document. But what distinctions exist between them and in what scenarios should each be utilized for optimal performance? var newDiv = '<div id="divid"></div>'; $(&ap ...

Implementing pagination within nested ng-repeat in Angular app

I am currently utilizing Angular along with the Material library in my project. I am facing an issue with two nested ng-repeat loops within md-tables. The problem lies in the fact that the variable is getting overridden with each request in the nested loop ...

What is the best way to efficiently query a substantial dataset using Node.js in an asynchronous fashion?

I need to extract data from a mysql database by fetching 10 rows at a time until I reach 400k rows. To achieve this asynchronously, I am using recursion as shown in the code below: var migrate = function(offset, size) { Mysql.query(query, [offset, size] ...

Tips on allowing a rectangle to be draggable using HTML5

I have been experimenting with resizable and draggable rectangles in HTML5. I've managed to create resizable rectangles, but I am having trouble getting them to drag using mouse events. You can view my JSFiddle code at the following link: here. / ...

Ways to populate dynamic choices for multiple Select boxes within an ng-repeat loop

When I click the "Add Row" button on an Html form, dynamic rows are added. Each row contains a 'Country' select and a 'State' select. The issue I am facing is that when I select a country in one row, all other row values change as well. ...

AngularJS encountered an error: [$injector:modulerr] problem occurred during code execution

Hey there! I've been trying to set up a pop-up feature in Angular, but unfortunately, I keep encountering an error: Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=PopupDemo&p1=Error%…ogleapis.com%2Fa ...

A step-by-step guide on activating dark mode for the markdown-it-vue plugin while incorporating Vuetify styling

I'm looking to display some documentation in my Vue application. The documentation is in markdown format, so I have already integrated the markdown-it-vue plugin. However, I've run into an issue where the plugin doesn't support vuetify dark ...

Stop or terminate all ongoing requests in AngularJS

When switching routes, I want to prevent any pending requests from the previous route in order to avoid issues where responses from the previous route interfere with data on the current route. This sometimes happens when responses from the previous route t ...

Using JavaScript to transfer the data ID from a button to a form

I am working on a project where I have a button that triggers a modal: <button type="button" class="btn btn-primary add-subscription" data-toggle="modal" data-workspace_id="{{ workspace.id }}" data-target="# ...