Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

build-threejs-app

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-threejs-app - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

5

bin/buildApp.js

@@ -8,5 +8,5 @@ #!/usr/bin/env node

if (process.argv.length < 3) {
console.log('You have to provide a name to your app.');
console.log('You have to provide a name for your project.');
console.log('For example :');
console.log(' npx build-threejs-app my-app');
console.log(' npx build-threejs-app <project-name>');
process.exit(1);

@@ -55,2 +55,3 @@ }

console.log('Done. Now run:');
console.log();
console.log(` cd ${projectName}`);

@@ -57,0 +58,0 @@ console.log(' npm run dev');

2

package.json
{
"name": "build-threejs-app",
"private": false,
"version": "0.0.4",
"version": "0.0.5",
"type": "module",

@@ -6,0 +6,0 @@ "bin": "bin/buildApp.js",

@@ -10,8 +10,14 @@ # Three.js Boilerplate

```bash
npx build-threejs-app <project-name>
npx build-threejs-app@latest <project-name>
```
__Change directory:__
```bash
cd <project-name>
```
__Install the dependencies:__
```
```bash
npm install

@@ -22,3 +28,3 @@ ```

```
```bash
npm run dev

@@ -42,3 +48,3 @@ ```

public\
|--models\ # Contain gltf models
|--models\ # Contain 3d models
|--textures\ # Contain textures

@@ -48,6 +54,6 @@ src\

|--helpers\ # Contain helper classes & functions
|--scenes\ # Contain scenes & objects
|--scenes\ # Contain scenes & its objects
|--shaders\ # Contain shaders
|--utils\ # Contain utility classes & functions
|--Camera.js # Handle cameras & controls
|--Camera.js # Handle cameras
|--Experience.js # Handle experience & scenes

@@ -54,0 +60,0 @@ |--Renderer.js # Handle renderers

@@ -26,4 +26,4 @@ import * as THREE from 'three';

);
this.perspectiveCamera.position.x = 5;
this.perspectiveCamera.position.y = 7.5;
this.perspectiveCamera.position.x = 10;
this.perspectiveCamera.position.y = 10;
this.perspectiveCamera.position.z = 10;

@@ -30,0 +30,0 @@

@@ -21,2 +21,3 @@ import * as THREE from 'three';

antialias: true,
alpha: true,
});

@@ -23,0 +24,0 @@

@@ -21,6 +21,2 @@ import Experience from '../Experience.js';

this.setModel();
if (this.debug.active) {
this.setDebugger();
}
}

@@ -40,14 +36,15 @@

this.scene.add(this.model);
}
setDebugger() {
this.debug.gui
.add(this.parameters, 'rotationSpeed', 0, 0.01)
.name('Box Speed')
.step(0.001);
this.experience.debug.gui
.add(this.parameters, 'size', 0.5, 2)
.onChange((value) => {
this.model.scale.set(value, value, value);
});
if (this.debug.active) {
this.debug.gui
.add(this.parameters, 'rotationSpeed', 0, 0.01)
.name('Box Speed')
.step(0.001);
this.debug.gui
.add(this.parameters, 'size', 0.5, 2)
.name('Box Size')
.onChange((value) => {
this.model.scale.set(value, value, value);
});
}
}

@@ -54,0 +51,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc