@series-inc/rundot-3d-engine 0.6.16 → 0.6.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.
@@ -21,8 +21,10 @@ declare class GameObject extends THREE.Object3D {
21
21
  */
22
22
  addComponent<T extends Component>(component: T): T;
23
23
  /**
24
- * Gets a component of the specified type
25
- * @returns The component if found, undefined otherwise
24
+ * Gets a component of the specified type.
25
+ * Checks for an exact constructor match first, then falls back to an
26
+ * instanceof check so that abstract base classes (e.g. ColliderComponent)
27
+ * can be used to retrieve any matching subclass.
26
28
  */
27
29
  getComponent<T extends Component>(componentType: new (...args: any[]) => T): T | undefined;
28
30
  /**
@@ -46,6 +48,15 @@ declare class GameObject extends THREE.Object3D {
46
48
  * @returns Array of all matching components
47
49
  */
48
50
  getComponentsInChildren<T extends Component>(componentType: new (...args: any[]) => T): T[];
51
+ /**
52
+ * Get the number of components on this GameObject
53
+ */
54
+ getComponentCount(): number;
55
+ /**
56
+ * Check if any component on this GameObject has preventAutoInstancing set.
57
+ * Used by AutoInstancer to skip meshes with custom shader components.
58
+ */
59
+ hasAutoInstancingBlocker(): boolean;
49
60
  /**
50
61
  * Removes a component of the specified type
51
62
  * @returns true if component was found and removed
@@ -139,6 +150,11 @@ declare abstract class Component {
139
150
  * @param deltaTime Time in seconds since last frame
140
151
  */
141
152
  lateUpdate?(deltaTime: number): void;
153
+ /**
154
+ * When true, AutoInstancer will skip this GameObject's MeshRenderer.
155
+ * Set this in components that replace mesh materials (custom shaders).
156
+ */
157
+ preventAutoInstancing: boolean;
142
158
  /**
143
159
  * Check if the component is attached to a GameObject
144
160
  */