Class: Item

LG > wb > Class > Item

LG.wb.Class.Item An Item Object containing the data and its representation of a Wikipedia page

new Item(brw, wpage)

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
brw Object
wpage String

Properties

alc

an array for Alchemy API results

Source:
../export/js/wb_item.js, line 13

alurl

The current Alchemy api url

Source:
../export/js/wb_item.js, line 52

categories

an array for Wikipedia Categories

Source:
../export/js/wb_item.js, line 13

click_items

an array for clickable 3D objects

Source:
../export/js/wb_item.js, line 13

deftbUrl

Default Thumbnail URL

Source:
../export/js/wb_item.js, line 13

dest

The current destination of the item

Source:
../export/js/wb_item.js, line 46

drift

The current drift of the item

Source:
../export/js/wb_item.js, line 44

favmeUrl

FavMe Icon Image

Source:
../export/js/wb_item.js, line 13

gottext

true if Wikipedia API returned Text

Source:
../export/js/wb_item.js, line 59

images

an object to hold some images

Source:
../export/js/wb_item.js, line 13

an array for Wikipedia Links

Source:
../export/js/wb_item.js, line 40

url

The Wikipedia Page URL of this item

Source:
../export/js/wb_item.js, line 55

wpage

The Wikipage

Source:
../export/js/wb_item.js, line 37

wpurl

The current Wikipedia api url

Source:
../export/js/wb_item.js, line 49

Methods

animate()

Animates the Item periodically

Source:
../export/js/wb_item.js, line 13

clickedFavme()

the favme icon was clicked

Source:
../export/js/wb_item.js, line 13

clickedImage()

the image was clicked

Source:
../export/js/wb_item.js, line 13

clickedLabel()

the label was clicked

Source:
../export/js/wb_item.js, line 13

goTo(x, y, z)

Tells the item to animate its position to the given coordinates

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
x Float
y Float
z Float

makeImage(w, h, img) → {THREE.Mesh}

make us an image of given width and height

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
w int The desired width of the image
h int The desired height of the image
img String The image Url
Returns:

the finished Image

makeLabel(w, h, t, col) → {THREE.Mesh}

make us a label of given width and height with arbitrary text and color

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
w int The desired width of the label
h int The desired height of the label
t String The desired text of the label
col String a string representing the text color e.g. "rgba(127,127,127,1)"
Returns:

the finished Text Label

search_dbp()

This will initiate a DBpedia parse action

Source:
../export/js/wb_item.js, line 13

search_wp()

This will initiate a wikipedia parse action

Source:
../export/js/wb_item.js, line 13

searchComplete(searcher)

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
searcher Object The google image search api results Callback for google image search

setimage(imgurl)

Sets the image of the texture this.imgmat to the given url

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
imgurl String the url of the image we want to display

wp_callback(data)

Wikipedia Calls this function when returning results

Source:
../export/js/wb_item.js, line 13
Parameters:
Name Type Description
data Array The resultset