New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fozmo-3d-preview

Package Overview
Dependencies
Maintainers
0
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fozmo-3d-preview - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

10

lib/Fozmo3DPreview.d.ts

@@ -24,2 +24,12 @@ import { ENV } from './framework/defines/HHGameTypes';

exposure: number;
/**
* 色调映射
* @default EToneMapping.AgX
*/
toneMapping: EToneMapping;
/**
* 背景模糊的
* @default 0.3
*/
blurriness: number;
}

@@ -26,0 +36,0 @@ /**

4

lib/scenes/MainScene.d.ts

@@ -11,2 +11,4 @@ import { BaseScene, BaseSceneConfig } from '../Base/BaseScene';

private _composer;
private _smaaPass;
private _ssaaPass;
private _lutPass;

@@ -27,2 +29,4 @@ private _bloomPass;

private setPostProcessing;
private initSSAAPass;
private initSMAAPass;
private initBloomPass;

@@ -29,0 +33,0 @@ private setUpEffects;

@@ -18,2 +18,4 @@ import { EEncryptExt, ENormalExt, ResLoaderManager } from './../manager/ResLoaderManager';

import { Utils } from '../framework/Utils/Utils';
import { SMAAPass } from 'three/examples/jsm/postprocessing/SMAAPass';
import { SSAARenderPass } from 'three/examples/jsm/postprocessing/SSAARenderPass';
CameraControls.install({ THREE });

@@ -90,2 +92,8 @@ /**

DLColor: 0xffffff,
// smaa
SMAAEnable: true,
// ssaa
SSAAEnable: false,
SSAAsampleLevel: 4,
SSAAunbiased: true
};

@@ -118,2 +126,4 @@ const toneMappingOptions = {

_composer;
_smaaPass;
_ssaaPass;
_lutPass;

@@ -134,2 +144,10 @@ _bloomPass;

async init(url) {
if (Utils.isPhone()) {
params.SMAAEnable = true;
params.SSAAEnable = false;
}
else {
params.SMAAEnable = false;
params.SSAAEnable = true;
}
/* tslint:disable:no-string-literal */

@@ -162,2 +180,31 @@ await this.loadHDR(params.HDR);

gui.width = 350;
const aa = gui.addFolder('抗锯齿');
const smaa = aa.addFolder('SMAA Mobile');
smaa.add(params, 'SMAAEnable').onChange((v) => {
this._smaaPass.enabled = v;
if (v && this._ssaaPass.enabled) {
this._ssaaPass.enabled = !v;
}
});
const ssaa = aa.addFolder('SSAA PC');
ssaa.add(params, 'SSAAEnable').onChange((v) => {
this._ssaaPass.enabled = v;
if (v && this._smaaPass.enabled) {
this._smaaPass.enabled = !v;
}
});
ssaa.add(params, 'SSAAunbiased').onChange((v) => {
this._ssaaPass.unbiased = v;
});
ssaa.add(params, 'SSAAsampleLevel', {
'Level 0: 1 Sample': 0,
'Level 1: 2 Samples': 1,
'Level 2: 4 Samples': 2,
'Level 3: 8 Samples': 3,
'Level 4: 16 Samples': 4,
'Level 5: 32 Samples': 5
}).onChange((v) => {
this._ssaaPass.sampleLevel = v;
});
;
const toneMappingFolder = gui.addFolder('色调映射');

@@ -288,3 +335,3 @@ toneMappingFolder.add(params, 'toneMapping', Object.keys(toneMappingOptions)).onChange(() => {

gui.domElement.style.margin = '0px';
gui.open();
gui.close();
this._gui = gui;

@@ -325,5 +372,11 @@ }

composer.setPixelRatio(window.devicePixelRatio);
composer.setSize(window.innerWidth, window.innerHeight);
composer.setSize(this.container.clientWidth, this.container.clientHeight);
composer.addPass(new RenderPass(this.scene, this.camera));
composer.addPass(new OutputPass());
this.initSMAAPass();
composer.addPass(this._smaaPass);
this._smaaPass.enabled = params.SMAAEnable;
this.initSSAAPass();
composer.addPass(this._ssaaPass);
this._ssaaPass.enabled = params.SSAAEnable;
const lutPass = new LUTPass({});

@@ -338,2 +391,12 @@ composer.addPass(lutPass);

}
initSSAAPass() {
if (!this._ssaaPass) {
this._ssaaPass = new SSAARenderPass(this.scene, this.camera);
}
}
initSMAAPass() {
if (!this._smaaPass) {
this._smaaPass = new SMAAPass(this.container.clientWidth * this.renderer.getPixelRatio(), this.container.clientHeight * this.renderer.getPixelRatio());
}
}
initBloomPass() {

@@ -583,3 +646,12 @@ if (!this._bloomPass) {

this._bloomPass.dispose();
this._bloomPass = null;
}
if (this._smaaPass) {
this._smaaPass.dispose();
this._smaaPass = null;
}
if (this._ssaaPass) {
this._ssaaPass.dispose();
this._ssaaPass = null;
}
this._composer = null;

@@ -586,0 +658,0 @@ }

2

package.json
{
"name": "fozmo-3d-preview",
"version": "1.0.11",
"version": "1.0.12",
"description": "风之末 作品预览",

@@ -5,0 +5,0 @@ "main": "lib/Fozmo3DPreview.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