rayzee 5.0.1 → 5.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -12
- package/dist/rayzee.es.js +1 -3
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +1 -1
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/TSL/PathTracerCore.js +0 -10
- package/src/TSL/Random.js +0 -1
- package/src/TSL/RayIntersection.js +0 -3
- package/src/managers/RenderTargetManager.js +0 -1
package/README.md
CHANGED
|
@@ -60,11 +60,11 @@ npm install rayzee three
|
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
// Tweak settings
|
|
63
|
-
engine.set('bounces', 8);
|
|
64
|
-
engine.set('exposure', 1.2);
|
|
63
|
+
engine.settings.set('bounces', 8);
|
|
64
|
+
engine.settings.set('exposure', 1.2);
|
|
65
65
|
|
|
66
66
|
// Use namespaced APIs and direct methods
|
|
67
|
-
engine.cameraManager.
|
|
67
|
+
engine.cameraManager.switchCamera(0);
|
|
68
68
|
engine.lightManager.add('PointLight');
|
|
69
69
|
engine.screenshot();
|
|
70
70
|
```
|
|
@@ -196,7 +196,7 @@ engine.wake() // Resume render loop if idle
|
|
|
196
196
|
#### Loading Assets
|
|
197
197
|
|
|
198
198
|
```js
|
|
199
|
-
await engine.loadModel(url) // Load GLB/GLTF/FBX/OBJ/STL/PLY/DAE/3MF/USDZ
|
|
199
|
+
await engine.loadModel(url) // Load GLB/GLTF/FBX/OBJ/STL/PLY/DAE/3MF/USDZ/ZIP
|
|
200
200
|
await engine.loadObject3D(object3d) // Load a Three.js Object3D directly
|
|
201
201
|
await engine.loadEnvironment(url) // Load HDR/EXR environment map
|
|
202
202
|
```
|
|
@@ -204,14 +204,14 @@ await engine.loadEnvironment(url) // Load HDR/EXR environment map
|
|
|
204
204
|
#### Settings
|
|
205
205
|
|
|
206
206
|
```js
|
|
207
|
-
engine.set('bounces', 8) // Set a single parameter
|
|
208
|
-
engine.setMany({ // Set multiple parameters at once
|
|
207
|
+
engine.settings.set('bounces', 8) // Set a single parameter
|
|
208
|
+
engine.settings.setMany({ // Set multiple parameters at once
|
|
209
209
|
bounces: 8,
|
|
210
210
|
samplesPerPixel: 1,
|
|
211
211
|
exposure: 1.0
|
|
212
212
|
})
|
|
213
|
-
engine.get('bounces') // Read a parameter
|
|
214
|
-
engine.getAll() // Get all current settings
|
|
213
|
+
engine.settings.get('bounces') // Read a parameter
|
|
214
|
+
engine.settings.getAll() // Get all current settings
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
Key settings:
|
|
@@ -257,7 +257,7 @@ Camera switching, auto-focus, DOF, and direct Three.js access.
|
|
|
257
257
|
```js
|
|
258
258
|
engine.cameraManager.active // The active PerspectiveCamera
|
|
259
259
|
engine.cameraManager.controls // The OrbitControls instance
|
|
260
|
-
engine.cameraManager.
|
|
260
|
+
engine.cameraManager.switchCamera(index) // Switch between scene cameras
|
|
261
261
|
engine.cameraManager.getNames() // List available cameras
|
|
262
262
|
engine.cameraManager.focusOn(center) // Focus orbit camera on a world-space point
|
|
263
263
|
engine.cameraManager.setAutoFocusMode(mode) // 'auto' | 'manual'
|
|
@@ -310,8 +310,8 @@ Environment maps, sky modes, and procedural generation.
|
|
|
310
310
|
```js
|
|
311
311
|
engine.environmentManager.params // Current environment parameters
|
|
312
312
|
engine.environmentManager.texture // The loaded environment texture
|
|
313
|
-
await engine.
|
|
314
|
-
await engine.environmentManager.
|
|
313
|
+
await engine.loadEnvironment(url) // Load HDR/EXR environment map (method on engine)
|
|
314
|
+
await engine.environmentManager.setEnvironmentMap(tex) // Set a custom environment texture
|
|
315
315
|
await engine.environmentManager.setMode(mode) // 'hdri' | 'procedural' | 'gradient' | 'color'
|
|
316
316
|
await engine.environmentManager.generateProcedural() // Preetham-model sky
|
|
317
317
|
await engine.environmentManager.generateGradient() // Gradient sky
|
|
@@ -366,7 +366,7 @@ Transform gizmo controls.
|
|
|
366
366
|
```js
|
|
367
367
|
engine.transformManager.setMode('translate') // 'translate' | 'rotate' | 'scale'
|
|
368
368
|
engine.transformManager.setSpace('world') // 'world' | 'local'
|
|
369
|
-
engine.transformManager.
|
|
369
|
+
engine.transformManager.controls // Access the underlying TransformControls
|
|
370
370
|
```
|
|
371
371
|
|
|
372
372
|
### Output Methods
|
|
@@ -471,6 +471,7 @@ import {
|
|
|
471
471
|
AnimationManager,
|
|
472
472
|
TransformManager,
|
|
473
473
|
VideoRenderManager,
|
|
474
|
+
InteractionManager,
|
|
474
475
|
RenderPipeline,
|
|
475
476
|
RenderStage,
|
|
476
477
|
StageExecutionMode,
|
package/dist/rayzee.es.js
CHANGED
|
@@ -84,9 +84,7 @@ var Ht = K(0, "int"), Ut = Ht, Wt = new b(new Float32Array([
|
|
|
84
84
|
Wt.type = D, Wt.needsUpdate = !0;
|
|
85
85
|
var Gt = vt(Wt);
|
|
86
86
|
Gt.setUpdateMatrix(!1);
|
|
87
|
-
var Kt = q(bt(Gt));
|
|
88
|
-
z(1.61803398875);
|
|
89
|
-
var qt = z(.61803398875), Jt = z(.38196601125), Yt = /* @__PURE__ */ X("\n fn getSobolDirectionVector( index: i32 ) -> u32 {\n\n switch ( index ) {\n case 0: { return 2147483648u; }\n case 1: { return 1073741824u; }\n case 2: { return 536870912u; }\n case 3: { return 268435456u; }\n case 4: { return 134217728u; }\n case 5: { return 67108864u; }\n case 6: { return 33554432u; }\n case 7: { return 16777216u; }\n case 8: { return 8388608u; }\n case 9: { return 4194304u; }\n case 10: { return 2097152u; }\n case 11: { return 1048576u; }\n case 12: { return 524288u; }\n case 13: { return 262144u; }\n case 14: { return 131072u; }\n case 15: { return 65536u; }\n case 16: { return 32768u; }\n case 17: { return 16384u; }\n case 18: { return 8192u; }\n case 19: { return 4096u; }\n case 20: { return 2048u; }\n case 21: { return 1024u; }\n case 22: { return 512u; }\n case 23: { return 256u; }\n case 24: { return 128u; }\n case 25: { return 64u; }\n case 26: { return 32u; }\n case 27: { return 16u; }\n case 28: { return 8u; }\n case 29: { return 4u; }\n case 30: { return 2u; }\n default: { return 1u; }\n }\n\n }\n"), Xt = /* @__PURE__ */ X("\n fn pcgHash( state: u32 ) -> u32 {\n\n var s = state;\n s = s * 747796405u + 2891336453u;\n s = ( ( s >> ( ( s >> 28u ) + 4u ) ) ^ s ) * 277803737u;\n s = ( s >> 22u ) ^ s;\n return s;\n\n }\n"), Zt = /* @__PURE__ */ X("\n fn wang_hash( seed: u32 ) -> u32 {\n\n var s = seed;\n s = ( s ^ 61u ) ^ ( s >> 16u );\n s = s * 9u;\n s = s ^ ( s >> 4u );\n s = s * 0x27d4eb2du;\n s = s ^ ( s >> 15u );\n return s;\n\n }\n"), Qt = (e) => (e.assign(e.mul(1664525).add(1013904223)), z(e.shiftRight(8)).mul(1 / 16777216)), $t = (e) => (e.assign(Xt({ state: e })), z(e.shiftRight(8)).mul(1 / 16777216)), en = (e) => {
|
|
87
|
+
var Kt = q(bt(Gt)), qt = z(.61803398875), Jt = z(.38196601125), Yt = /* @__PURE__ */ X("\n fn getSobolDirectionVector( index: i32 ) -> u32 {\n\n switch ( index ) {\n case 0: { return 2147483648u; }\n case 1: { return 1073741824u; }\n case 2: { return 536870912u; }\n case 3: { return 268435456u; }\n case 4: { return 134217728u; }\n case 5: { return 67108864u; }\n case 6: { return 33554432u; }\n case 7: { return 16777216u; }\n case 8: { return 8388608u; }\n case 9: { return 4194304u; }\n case 10: { return 2097152u; }\n case 11: { return 1048576u; }\n case 12: { return 524288u; }\n case 13: { return 262144u; }\n case 14: { return 131072u; }\n case 15: { return 65536u; }\n case 16: { return 32768u; }\n case 17: { return 16384u; }\n case 18: { return 8192u; }\n case 19: { return 4096u; }\n case 20: { return 2048u; }\n case 21: { return 1024u; }\n case 22: { return 512u; }\n case 23: { return 256u; }\n case 24: { return 128u; }\n case 25: { return 64u; }\n case 26: { return 32u; }\n case 27: { return 16u; }\n case 28: { return 8u; }\n case 29: { return 4u; }\n case 30: { return 2u; }\n default: { return 1u; }\n }\n\n }\n"), Xt = /* @__PURE__ */ X("\n fn pcgHash( state: u32 ) -> u32 {\n\n var s = state;\n s = s * 747796405u + 2891336453u;\n s = ( ( s >> ( ( s >> 28u ) + 4u ) ) ^ s ) * 277803737u;\n s = ( s >> 22u ) ^ s;\n return s;\n\n }\n"), Zt = /* @__PURE__ */ X("\n fn wang_hash( seed: u32 ) -> u32 {\n\n var s = seed;\n s = ( s ^ 61u ) ^ ( s >> 16u );\n s = s * 9u;\n s = s ^ ( s >> 4u );\n s = s * 0x27d4eb2du;\n s = s ^ ( s >> 15u );\n return s;\n\n }\n"), Qt = (e) => (e.assign(e.mul(1664525).add(1013904223)), z(e.shiftRight(8)).mul(1 / 16777216)), $t = (e) => (e.assign(Xt({ state: e })), z(e.shiftRight(8)).mul(1 / 16777216)), en = (e) => {
|
|
90
88
|
let t = Qt(e).mul(We).toVar();
|
|
91
89
|
return q(Je(t), pt(t)).mul(ht(Qt(e)));
|
|
92
90
|
}, tn = /* @__PURE__ */ X("\n fn cranleyPatterson2D( p: vec2f, offset: vec2f ) -> vec2f {\n\n return fract( p + offset );\n\n }\n"), nn = /* @__PURE__ */ M(([e, t, n, r]) => {
|