# Model3DStream

## Content

# Class: Model3DStream

Represents 3D stream, contains definition of a 3D model.

## Extends

- [`ObjectBase`](ObjectBase)

## Constructors

### Constructor

```ts
new Model3DStream(
   om, 
   bytes, 
   format): Model3DStream;
```

Creates a new Model3DStream.

#### Parameters

##### om

[`ObjectManager`](ObjectManager)

[ObjectManager](ObjectManager) that controls the lifetime of the Model3DStream.

##### bytes

`Uint8Array`

The 3D data.

##### format

[`Model3DStreamFormat`](../type-aliases/Model3DStreamFormat)

The format of 3D data.

#### Returns

`Model3DStream`

#### Overrides

```ts
ObjectBase.constructor
```

### Constructor

```ts
new Model3DStream(bytes, format): Model3DStream;
```

Creates a new Model3DStream.

#### Parameters

##### bytes

`Uint8Array`

The 3D data.

##### format

[`Model3DStreamFormat`](../type-aliases/Model3DStreamFormat)

The format of 3D data.

#### Returns

`Model3DStream`

#### Overrides

```ts
ObjectBase.constructor
```

## Accessors

### animationRepeatCount

#### Get Signature

```ts
get animationRepeatCount(): number;
```

Gets a value specifying the play count for the animation style.
A non-negative integer represents the number of times the animation shall be played.
A negative integer indicates that the animation shall be infinitely repeated.

##### Returns

`number`

#### Set Signature

```ts
set animationRepeatCount(value): void;
```

Sets a value specifying the play count for the animation style.
A non-negative integer represents the number of times the animation shall be played.
A negative integer indicates that the animation shall be infinitely repeated.

##### Parameters

###### value

`number`

##### Returns

`void`

***

### animationSpeed

#### Get Signature

```ts
get animationSpeed(): number;
```

Gets a positive number specifying the time multiplier that shall be used
when running the animation.
A value greater than one shortens the time it takes to play the animation,
or effectively speeds up the animation.

##### Returns

`number`

#### Set Signature

```ts
set animationSpeed(value): void;
```

Sets the transformation matrix that specifies a position and orientation of the camera in world coordinates.

##### Parameters

###### value

`number`

##### Returns

`void`

***

### animationStyle

#### Get Signature

```ts
get animationStyle(): string;
```

Gets the animation style.
The [Model3DAnimationStyle](../variables/Model3DAnimationStyle) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Returns

`string`

#### Set Signature

```ts
set animationStyle(value): void;
```

Sets the animation style.
The [Model3DAnimationStyle](../variables/Model3DAnimationStyle) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### defaultView

#### Get Signature

```ts
get defaultView(): Model3DView;
```

Gets the stream-level default [Model3DView](Model3DView) for this 3D stream.
The default view is read from the stream dictionary entry identified by the PDF name
<c>DV</c>. The entry may specify the default view in multiple forms (numeric index,
name, special keywords, or an embedded view dictionary).
This property encapsulates
the resolution logic and returns the effective [Model3DView](Model3DView) or <c>null</c>
when no default is defined or it cannot be resolved.

##### Returns

[`Model3DView`](Model3DView)

#### Set Signature

```ts
set defaultView(value): void;
```

Sets the stream-level default [Model3DView](Model3DView) object, the value can be specified
as object itself or zero-based index of 3D view in [Model3DStream.views](#views) collection.

##### Parameters

###### value

`number` \| [`Model3DView`](Model3DView)

##### Returns

`void`

***

### format

#### Get Signature

```ts
get format(): string;
```

Gets the format of the 3D data contained in the stream.
The [Model3DStreamFormat](../variables/Model3DStreamFormat) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Returns

`string`

#### Set Signature

```ts
set format(value): void;
```

Sets the format of the 3D data contained in the stream.
The [Model3DStreamFormat](../variables/Model3DStreamFormat) defines the values listed in the PDF specification;
this list may be extended in future revisions.

##### Parameters

###### value

`string`

##### Returns

`void`

***

### id

#### Get Signature

```ts
get id(): number;
```

Gets the reference to the object.

##### Returns

`number`

#### Inherited from

[`ObjectBase`](ObjectBase).[`id`](ObjectBase#id)

***

### om

#### Get Signature

```ts
get om(): ObjectManager;
```

Gets the owner [ObjectManager](ObjectManager) instance.

##### Returns

[`ObjectManager`](ObjectManager)

#### Inherited from

[`ObjectBase`](ObjectBase).[`om`](ObjectBase#om)

***

### views

#### Get Signature

```ts
get views(): Model3DViewCollection;
```

Gets a collection of [Model3DView](Model3DView) objects,
each of which specifies a named preset view of this Model3DStream.

##### Returns

[`Model3DViewCollection`](Model3DViewCollection)

## Methods

### free()

```ts
free(): void;
```

Detaches the object from the [ObjectManager](ObjectManager) and deallocates its memory, if possible.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`free`](ObjectBase#free)

***

### rebind()

```ts
rebind(omTo): void;
```

Rebinds the object from the current [ObjectManager](ObjectManager) to the specified one.

#### Parameters

##### omTo

[`ObjectManager`](ObjectManager)

The new [ObjectManager](ObjectManager) for the object.

#### Returns

`void`

#### Inherited from

[`ObjectBase`](ObjectBase).[`rebind`](ObjectBase#rebind)
