Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,363 changes: 5,361 additions & 2 deletions dist/ARnftThreejs.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/markermedia/NFTaddTJS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ export default class NFTaddTJS {
this.names.push(name);
}

public remove(name: string) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this function should be renamed removeRoot because actually it does exactly this.

let obj = this.scene.getObjectByName('root-' + name)
this.scene.remove(obj);
}

/**
* You can get the names of the entities used in your project.
* @returns the names of the entities
Expand Down
1 change: 1 addition & 0 deletions types/markermedia/NFTaddTJS.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default class NFTaddTJS {
addModelWithCallback(url: string, name: string, callback: (gltf: any) => {}, objVisibility: boolean): void;
addImage(imageUrl: string, name: string, color: string, scale: number, configs: IPlaneConfig, objVisibility: boolean): void;
addVideo(id: string, name: string, scale: number, configs: IPlaneConfig, objVisibility: boolean): void;
remove(name: string): void;
getNames(): string[];
set oef(enable: boolean);
get oef(): boolean;
Expand Down