Skip to content

Commit

Permalink
Introduce ModelData class
Browse files Browse the repository at this point in the history
  • Loading branch information
samaneh-kazemi committed Nov 14, 2024
1 parent dd354f6 commit e99db48
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/model-viewer/src/three-components/ModelScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {$currentGLTF, $model, $originalGltfJson} from '../features/scene-graph.j
import {$nodeFromIndex, $nodeFromPoint} from '../features/scene-graph/model.js';
import ModelViewerElementBase, {$renderer, EffectComposerInterface, RendererInterface} from '../model-viewer-base.js';
import {ModelViewerElement} from '../model-viewer.js';
import {ModelData} from 'np./ModelData.js';
import {normalizeUnit} from '../styles/conversions.js';
import {NumberNode, parseExpressions} from '../styles/parsers.js';

Expand Down Expand Up @@ -65,6 +66,7 @@ const ndc = new Vector2();
* Provides lights and cameras to be used in a renderer.
*/
export class ModelScene extends Scene {
public modelData: ModelData;
public element: ModelViewerElement;
public canvas: HTMLCanvasElement;
public annotationRenderer = new CSS2DRenderer();
Expand Down Expand Up @@ -120,6 +122,8 @@ export class ModelScene extends Scene {
constructor({canvas, element, width, height}: ModelSceneConfig) {
super();

this.modelData = new ModelData("url.glb");

this.name = 'ModelScene';

this.element = element as ModelViewerElement;
Expand Down

0 comments on commit e99db48

Please sign in to comment.