star_mod_renderer
Advanced tools
Comparing version 1.0.33 to 1.0.34
@@ -0,0 +0,0 @@ import * as THREE from 'star_mod_custom_three'; |
@@ -0,1 +1,3 @@ | ||
import * as THREE from 'star_mod_custom_three'; | ||
// 面数与顶点数计算 | ||
@@ -27,1 +29,10 @@ export function calculateVerticesAndFace(object) { | ||
} | ||
// 面数与顶点数计算 | ||
export function getModelSize(model) { | ||
const size = new THREE.Vector3(); | ||
new THREE.Box3().setFromObject(model).getSize(size); | ||
return new THREE.Vector3(parseInt(size.x), parseInt(size.y), parseInt(size.z)); | ||
} |
@@ -50,2 +50,3 @@ import * as THREE from 'star_mod_custom_three'; | ||
child.isCustomizeRenderObject = true; | ||
child.frustumCulled = false; | ||
if (child.geometry.attributes && child.geometry.attributes.uv && child.geometry.attributes.uv) { | ||
@@ -151,2 +152,3 @@ var uvs = child.geometry.attributes.uv.array; | ||
emissive: 1, | ||
side:THREE.DoubleSide, | ||
}); | ||
@@ -415,3 +417,3 @@ material.needsUpdate = true; | ||
material.alphaMap = material.map; | ||
material.transparent = true; | ||
material.transparent = false; | ||
material.alphaTest = 0.5; | ||
@@ -418,0 +420,0 @@ } |
{ | ||
"name": "star_mod_renderer", | ||
"version": "1.0.33", | ||
"version": "1.0.34", | ||
"description": "star mod project render auxiliary ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -113,4 +113,4 @@ import * as THREE from 'star_mod_custom_three'; | ||
this.dom.offsetWidth / this.dom.offsetHeight, | ||
1, | ||
100000 | ||
0.1, | ||
10000 | ||
); | ||
@@ -117,0 +117,0 @@ if (this.cameraControls) { |
@@ -159,9 +159,12 @@ import * as THREE from 'star_mod_custom_three'; | ||
}); | ||
console.log('file is :', file); | ||
// const animationGroup = file.sceneGraph.ren | ||
// this.mixer = new THREE.AnimationMixer(this.combinationModelGroup); | ||
// this.animationAction = this.mixer.clipAction(this.combinationModelGroup.animations[0]); | ||
// const helper = new THREE.SkeletonHelper( modelRender.getModel() ); | ||
// this.addModel(helper); | ||
// this.animationAction.play(); | ||
const modelRender = new ModelProcessor(file); | ||
const bones = this.combinationModelGroup.children[1].children[0].clone(true); | ||
if (this.combinationModelGroup.children[0].children[0].type === 'Bone') { | ||
this.combinationModelGroup.children[0].add(bones); | ||
} | ||
const flock = new THREE.AnimationObjectGroup(this.combinationModelGroup.children[0], this.maleHeadModel, this.combinationModelGroup.children[1]); | ||
this.mixer = new THREE.AnimationMixer(flock); | ||
this.animationAction = this.mixer.clipAction(modelRender.getModel().animations[0]); | ||
this.animationAction.play(); | ||
} | ||
@@ -168,0 +171,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288414
8021