@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnsx/three",
3
- "version": "0.184.17",
3
+ "version": "0.184.18",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -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;
@@ -1895,7 +1895,7 @@ class WebGLRenderer {
1895
1895
 
1896
1896
  const visible = object.layers.test( camera.layers );
1897
1897
 
1898
- if ( visible ) {
1898
+ if ( visible && ! object.selfHidden /* WITH_GENESYS */ ) {
1899
1899
 
1900
1900
  if ( object.isGroup ) {
1901
1901
 
@@ -1682,13 +1682,13 @@ class Renderer {
1682
1682
  renderList.begin();
1683
1683
 
1684
1684
  // WITH_GENESYS
1685
- ProfilerService.begin( '_projectObject' );
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( '_projectObject' );
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