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

star_mod_renderer

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

star_mod_renderer - npm Package Compare versions

Comparing version 1.0.16 to 1.0.17

2

default.js

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

export const DIRECTION_LIGHT_COLOR = '#c2c2c2';
export const DIRECTION_LIGHT_INTENSITY = 0.6;
export const AMBIENT_LIGHT_INTENSITY = 0.4;

@@ -90,0 +92,0 @@

7

helper/modelHelper/model.js

@@ -138,6 +138,9 @@ import * as THREE from 'three';

material.aoMap = texture.ormeTexture; // r
material.roughnessMap = texture.ormeTexture; // b
material.metalnessMap = texture.ormeTexture; // g
material.roughnessMap = texture.ormeTexture; // g
material.metalnessMap = texture.ormeTexture; // b
// TODO: 扩充 material 字段 emissiveIntensityMap 字段,增加渲染公式与对应逻辑获取
material.emissiveMap = texture.ormeTexture; // a
}
// 混合自发光贴图
if (texture.emissiveTexture) {

@@ -144,0 +147,0 @@ material.emissive = new THREE.Color(0xffffff);

{
"name": "star_mod_renderer",
"version": "1.0.16",
"version": "1.0.17",
"description": "star mod project render auxiliary ",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,3 +6,3 @@ import * as THREE from "three";

import { ViewHelper } from 'three/examples/jsm/helpers/ViewHelper.js';
import { SCENE_BACKGROUND_COLOR, AMBIENT_LIGHT_COLOR, DIRECTION_LIGHT_COLOR } from './default.js';
import { SCENE_BACKGROUND_COLOR, AMBIENT_LIGHT_COLOR, DIRECTION_LIGHT_COLOR, DIRECTION_LIGHT_INTENSITY, AMBIENT_LIGHT_INTENSITY } from './default.js';

@@ -18,2 +18,3 @@ export class RenderBase {

ambientLight = null;
hemisphereLight = null;
directionalLights = [];

@@ -181,9 +182,11 @@ signals = null;

// 临时
this.ambientLight = new THREE.AmbientLight(AMBIENT_LIGHT_COLOR, 0.6);
this.ambientLight = new THREE.AmbientLight(AMBIENT_LIGHT_COLOR, AMBIENT_LIGHT_INTENSITY);
this.hemisphereLight = new THREE.HemisphereLight(AMBIENT_LIGHT_COLOR, AMBIENT_LIGHT_COLOR, 0.2);
this.directionalLights = [
new THREE.DirectionalLight(DIRECTION_LIGHT_COLOR, 0.7),
new THREE.DirectionalLight(DIRECTION_LIGHT_COLOR, 0.7),
new THREE.DirectionalLight(DIRECTION_LIGHT_COLOR, 0.7)
new THREE.DirectionalLight(DIRECTION_LIGHT_COLOR, DIRECTION_LIGHT_INTENSITY),
new THREE.DirectionalLight(DIRECTION_LIGHT_COLOR, DIRECTION_LIGHT_INTENSITY),
new THREE.DirectionalLight(DIRECTION_LIGHT_COLOR, DIRECTION_LIGHT_INTENSITY)
];
this.addModel(this.ambientLight);
this.addModel(this.hemisphereLight);
this.directionalLights.forEach(item => {

@@ -197,2 +200,3 @@ this.addModel(item);

this.ambientLight.color.set(color);
this.hemisphereLight.color.set(color);
}

@@ -199,0 +203,0 @@

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