@gnsx/three 0.184.17 → 0.184.18
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/build/three.cjs +21 -1
- package/build/three.core.js +20 -0
- package/build/three.core.min.js +1 -1
- package/build/three.module.js +1 -1
- package/build/three.module.min.js +1 -1
- package/build/three.webgpu.js +3 -3
- package/build/three.webgpu.min.js +1 -1
- package/build/three.webgpu.nodes.js +3 -3
- package/build/three.webgpu.nodes.min.js +1 -1
- package/package.json +1 -1
- package/src/core/Object3D.js +17 -0
- package/src/loaders/ObjectLoader.js +3 -0
- package/src/renderers/WebGLRenderer.js +1 -1
- package/src/renderers/common/Renderer.js +3 -3
package/package.json
CHANGED
package/src/core/Object3D.js
CHANGED
|
@@ -290,6 +290,17 @@ class Object3D extends EventDispatcher {
|
|
|
290
290
|
*/
|
|
291
291
|
this.visible = true;
|
|
292
292
|
|
|
293
|
+
// WITH_GENESYS
|
|
294
|
+
/**
|
|
295
|
+
* When set to `true`, this object itself is hidden.
|
|
296
|
+
* Doesn't affect the visibility of the children.
|
|
297
|
+
*
|
|
298
|
+
* @type {boolean}
|
|
299
|
+
* @default false
|
|
300
|
+
*/
|
|
301
|
+
this.selfHidden = false;
|
|
302
|
+
// !WITH_GENESYS
|
|
303
|
+
|
|
293
304
|
/**
|
|
294
305
|
* When set to `true`, the 3D object gets rendered into shadow maps.
|
|
295
306
|
*
|
|
@@ -1303,6 +1314,9 @@ class Object3D extends EventDispatcher {
|
|
|
1303
1314
|
if ( this.castShadow === true ) object.castShadow = true;
|
|
1304
1315
|
if ( this.receiveShadow === true ) object.receiveShadow = true;
|
|
1305
1316
|
if ( this.visible === false ) object.visible = false;
|
|
1317
|
+
// WITH_GENESYS
|
|
1318
|
+
if ( this.selfHidden === true ) object.selfHidden = true;
|
|
1319
|
+
// !WITH_GENESYS
|
|
1306
1320
|
if ( this.frustumCulled === false ) object.frustumCulled = false;
|
|
1307
1321
|
if ( this.renderOrder !== 0 ) object.renderOrder = this.renderOrder;
|
|
1308
1322
|
if ( this.static !== false ) object.static = this.static;
|
|
@@ -1604,6 +1618,9 @@ class Object3D extends EventDispatcher {
|
|
|
1604
1618
|
|
|
1605
1619
|
this.layers.mask = source.layers.mask;
|
|
1606
1620
|
this.visible = source.visible;
|
|
1621
|
+
// WITH_GENESYS
|
|
1622
|
+
this.selfHidden = source.selfHidden;
|
|
1623
|
+
// !WITH_GENESYS
|
|
1607
1624
|
|
|
1608
1625
|
this.castShadow = source.castShadow;
|
|
1609
1626
|
this.receiveShadow = source.receiveShadow;
|
|
@@ -1166,6 +1166,9 @@ class ObjectLoader extends Loader {
|
|
|
1166
1166
|
}
|
|
1167
1167
|
|
|
1168
1168
|
if ( data.visible !== undefined ) object.visible = data.visible;
|
|
1169
|
+
// WITH_GENESYS
|
|
1170
|
+
if ( data.selfHidden !== undefined ) object.selfHidden = data.selfHidden;
|
|
1171
|
+
// !WITH_GENESYS
|
|
1169
1172
|
if ( data.frustumCulled !== undefined ) object.frustumCulled = data.frustumCulled;
|
|
1170
1173
|
if ( data.renderOrder !== undefined ) object.renderOrder = data.renderOrder;
|
|
1171
1174
|
if ( data.static !== undefined ) object.static = data.static;
|
|
@@ -1682,13 +1682,13 @@ class Renderer {
|
|
|
1682
1682
|
renderList.begin();
|
|
1683
1683
|
|
|
1684
1684
|
// WITH_GENESYS
|
|
1685
|
-
ProfilerService.begin( '
|
|
1685
|
+
ProfilerService.begin( 'projectObject' );
|
|
1686
1686
|
// !WITH_GENESYS
|
|
1687
1687
|
|
|
1688
1688
|
this._projectObject( scene, camera, 0, renderList, renderContext.clippingContext );
|
|
1689
1689
|
|
|
1690
1690
|
// WITH_GENESYS
|
|
1691
|
-
ProfilerService.end( '
|
|
1691
|
+
ProfilerService.end( 'projectObject' );
|
|
1692
1692
|
// !WITH_GENESYS
|
|
1693
1693
|
|
|
1694
1694
|
renderList.finish();
|
|
@@ -3142,7 +3142,7 @@ class Renderer {
|
|
|
3142
3142
|
|
|
3143
3143
|
const visible = object.layers.test( camera.layers );
|
|
3144
3144
|
|
|
3145
|
-
if ( visible ) {
|
|
3145
|
+
if ( visible && ! object.selfHidden /* WITH_GENESYS */ ) {
|
|
3146
3146
|
|
|
3147
3147
|
if ( object.isGroup ) {
|
|
3148
3148
|
|