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.26 to 1.0.27

4

default.js

@@ -63,2 +63,6 @@ import * as THREE from 'star_mod_custom_three';

export const newEnvMapMenu = {
a: 'https://westar-cdn-source-1258344700.cos.ap-nanjing.myqcloud.com/mod/modOfficial/1686570043_a_sky.png'
}
export function getEnvMapByName(name, env) {

@@ -65,0 +69,0 @@ if (!envMapMenu[name]) {

@@ -125,2 +125,41 @@ import * as THREE from 'star_mod_custom_three';

updateModelMaterialType(channel, type) {
this.model.traverse(child => {
if (child.material) {
// 玻璃材质特殊处理
if (type === 4) {
if (Array.isArray(child.material)) {
child.material[channel] = new THREE.MeshPhysicalMaterial({
transmission: 0.8,
opacity: 1,
metalness: 0,
roughness: 0,
ior: 1.5,
thickness: 0,
specularIntensity: 1,
specularColor: new THREE.Color(0xffffff),
reflectivity: 0.5,
color: new THREE.Color(0xffffff),
});
child.material[channel].needsUpdate = true;
} else {
child.material = new THREE.MeshPhysicalMaterial({
transmission: 0.8,
opacity: 1,
metalness: 0,
roughness: 0,
ior: 1.5,
thickness: 0,
specularIntensity: 1,
specularColor: new THREE.Color(0xffffff),
reflectivity: 0.5,
color: new THREE.Color(0xffffff),
});
child.material.needsUpdate = true;
}
}
}
})
}
updateModelMaterialTexture(channel, texture) {

@@ -165,2 +204,9 @@ this.model.traverse(child => {

const material = Array.isArray(child.material) ? child.material[channel] : child.material;
if (material.isMeshPhysicalMaterial) {
if (param.color) {
material.color = new THREE.Color(param.color);
material.needsUpdate = true;
}
return;
}
if (param.renderBlendMode === 0) {

@@ -215,2 +261,5 @@ material.alphaMap = null;

child.material.envMap = envMap;
if (child.material.isMeshPhysicalMaterial) {
// child.material.transmissionMap = envMap;
}
child.material.needsUpdate = true;

@@ -217,0 +266,0 @@ }

2

package.json
{
"name": "star_mod_renderer",
"version": "1.0.26",
"version": "1.0.27",
"description": "star mod project render auxiliary ",

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

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