Myr
Constructor Summary
| Public Constructor | ||
| public |
constructor(baseEls: object) Instantiate MYR class |
|
Member Summary
| Public Members | ||
| public |
ambientLight(params: object): * Render an Ambient light with current cursor light settings |
|
| public |
Animate the Aframe element which is passed as arg, its same as spin but without linear easing |
|
| public |
assets: *[] |
|
| public |
baseEls: * |
|
| public |
Render an Aframe box with current Myr settings |
|
| public |
Interface for setting an object's parameters in the DOM the idea is the setup an event listener as an almost DOM ready listener. Ex. change(box(),"material","color:green;"); |
|
| public |
Render an Aframe circle with current Myr settings |
|
| public |
colorShift(outerElId: string, color: string): * Apply a colorShift animation toe the Aframe element |
|
| public |
colourNameToHex(colour: string): string: * Change the html color code to the hexadecimal |
|
| public |
Render an Aframe cone with current Myr settings |
|
| public |
|
|
| public |
cursor: {"color": string, "texture": *, "transparency": *, "position": *, "scale": *, "rotation": *, "radius": string, "phiLength": number, "loop": boolean, "textureColoring": *, "textureRepeatWidth": number, "textureRepeatHeight": number, "duration": number, "magnitude": *, "light": *} |
|
| public |
Render an Aframe cylinder with current Myr settings |
|
| public |
directionalLight(params: object): * Render a Directional light with current cursor light settings |
|
| public |
dodecahedron(params: object): * Render an Aframe dodecahedron with current Myr settings |
|
| public |
Looks like a temporary function that just apply physics with constant mass |
|
| public |
els: *[] |
|
| public |
Apply a fadeIn animation to the Aframe element which is passed as arg |
|
| public |
Apply a fadeOut animation to the Aframe element which is passed as arg |
|
| public |
genNewId: * Generate unique id that is assigned to each entity |
|
| public |
getColor: * Gets the current color of the cursor |
|
| public |
getCursorAttribute(key: string): *: * Get the any values of the exisitng cursor attribute |
|
| public |
getDuration: * Gets the current duration of the cursor |
|
| public |
Gets the element associated with the given element ID |
|
| public |
getLoop: * Gets the current lopp of the cursor |
|
| public |
getMagnitude: * Gets the current magnitude of the cursor |
|
| public |
getPhiLength: * Gets the current phi length of the cursor |
|
| public |
getRadius: * Gets the current radius of the cursor |
|
| public |
getRandomColor(colors: array): * Returns a random valid color. |
|
| public |
getTexture: * Gets the current texture of the cursor |
|
| public |
getXPos: * Gets the current x position of the cursor |
|
| public |
getXRotation: * Gets the current x rotation of the cursor |
|
| public |
getXScale: * Gets the current x scale of the cursor |
|
| public |
getYPos: * Gets the current y position of the cursor |
|
| public |
getYRotation: * Gets the current y rotation of the cursor |
|
| public |
getYScale: * Gets the current y scale of the cursor |
|
| public |
getZPos: * Gets the current z position of the cursor |
|
| public |
getZRotation: * Gets the current z rotation of the cursor |
|
| public |
getZScale: * Gets the current z scale of the cursor |
|
| public |
Load and render a custom glTF model with current Myr settings |
|
| public |
Apply a goAway animation to the Aframe element which is passed as arg |
|
| public |
Apply a goDown animation to the Aframe element which is passed as arg |
|
| public |
Apply a goLeft animation to the Aframe element which is passed as arg |
|
| public |
Apply a goRight animation to the Aframe element which is passed as arg |
|
| public |
Apply a goTowards animation to the Aframe element which is passed as arg |
|
| public |
Apply a goUp animation to the Aframe element which is passed as arg |
|
| public |
group: * Return a Entity that can be used to group elements together |
|
| public |
Apply a grow animation to the Aframe element which is passed as arg |
|
| public |
hemisphereLight(secondColor: string, params: object): * Render an Hemisphere light with current cursor light settings |
|
| public |
icosahedron(params: object): * Render an Aframe icosahedron with current Myr settings |
|
| public |
increasePosition(x: number, y: number, z: number): * Increases the current x, y, and z position of the cursor by the given amount |
|
| public |
increaseXPos(x: number): * Increases the current x position of the cursor by the given amount |
|
| public |
increaseYPos(y: number): * Increases the current y position of the cursor by the given amount |
|
| public |
increaseZPos(z: number): * Increases the current z position of the cursor by the given amount |
|
| public |
Infinite loop detector that's not use in anywhere |
|
| public |
init({}: *): * init creates and binds the myr object to the window |
|
| public |
Render an Aframe line with current Myr settings |
|
| public |
makeDroppable(outerElId: string, mass: number): * Allows the entity to be dropped |
|
| public |
makePushable(outerElId: string, mass: number): * Allows the entity to be pushed |
|
| public |
makeUnDroppable(outerElId: string): * Disallows the entity to be dropped |
|
| public |
makeUnPushable(outerElId: string): * Disallows the entity to be pushed |
|
| public |
mergeProps(shape: string, params: obj): * This creates an entity w shape of object and merges with supplied params |
|
| public |
octahedron(params: object): * Render an Aframe octahedron with current Myr settings |
|
| public |
Applies a given x rotation to the cursor |
|
| public |
Render an Aframe plane with current Myr settings |
|
| public |
pointLight(params: object): * Render an point light with current cursor light settings |
|
| public |
Render an Aframe polyhedron with current Myr settings |
|
| public |
push: * Looks like temporary function similar to makePushable that apply force the pass object to x,y,z direction Not working. |
|
| public |
res: {"els": *, "assets": *} |
|
| public |
reset: * Reset this.els to the base elements supplied to the constructor |
|
| public |
Reset the animation properties of the cursor to the default |
|
| public |
resetCursor: * Reset the cursor to the default |
|
| public |
Reset the light properties of the cursor to the default |
|
| public |
Reset the transformation properties of the cursor to the default |
|
| public |
Render an Aframe ring with current Myr settings |
|
| public |
Applies a given z rotation to the cursor |
|
| public |
sceneEl: * |
|
| public |
setBeamAngle(beamAngle: number): * Set the extent of the spotlight |
|
| public |
Sets the current color of the cursor. |
|
| public |
setCursorAttribute(key: string, value: any): * Sets the existing cursor as well as creates a new custom cursor attributes to apply to entity |
|
| public |
Set the decay of the light |
|
| public |
setDiffusion(diffusion: number): * Set the diffusion(penumbra) around the edge of the light |
|
| public |
setDistance(distance: number): * Set the distance of the light dims as it travels |
|
| public |
setDuration(i: number): * Sets the duration of the cursor |
|
| public |
setIntensity(intensity: number): * Set the intensity of the light |
|
| public |
setLightTarget(x: number, y: number, z: number): * Set the position of where the lights are facing towards |
|
| public |
Sets the loop of the cursor |
|
| public |
setMagnitude(i: number): * Sets the magnitude of the cursor |
|
| public |
setPhiLength(i: number): * Sets the phi length of the cursor |
|
| public |
setPosition(x: number, y: number, z: number): * Sets the x, y, and z position of the cursor |
|
| public |
Sets the radius of the cursor |
|
| public |
|
|
| public |
setRotation(x: number, y: number, z: number): * Sets the x, y, and z rotation of the cursor |
|
| public |
Sets the x, y, and z scale of the cursor |
|
| public |
setTexture(texture: string, w: number, h: number): * Sets the texture of the cursor. |
|
| public |
setTextureColoring(i: boolean): * Sets whether to enable to color the texture or not |
|
| public |
setTransparency(transparency: number): * Sets the transparency of the cursor |
|
| public |
Sets the x position of the cursor |
|
| public |
Applies a given scale along the x dimension of the cursor |
|
| public |
Sets the y position of the cursor |
|
| public |
Applies a given scale along the y dimension of the cursor |
|
| public |
Sets the z position of the cursor |
|
| public |
Applies a given scale along the z dimension of the cursor |
|
| public |
Apply a shrink animation to the Aframe element which is passed as arg |
|
| public |
sideToSide(outerElId: number, magnitude: number, loop: boolean, duration: number): * Apply a sideToSide animation to the Aframe element which is passed as arg |
|
| public |
It looks like a promise that sleep for certain ms and user can set further action after the time out. |
|
| public |
Render an Aframe sphere with current Myr settings |
|
| public |
Apply a spin animation to the Aframe element which is passed as arg |
|
| public |
Apply a spin animation on the X axis to the Aframe element which is passed as arg |
|
| public |
Apply a spin animation on the X axis to the Aframe element which is passed as arg |
|
| public |
Apply a spin animation on the Z axis to the Aframe element which is passed as arg |
|
| public |
Render a Spot light with current cursor light settings |
|
| public |
syncChange(outerElId: string, type: string, newParam: *): Error: * Interface for setting an object's parameters in the DOM w/o the event listener dispatching the events It's not working/I don't know how this work" |
|
| public |
tetrahedron(params: object): * Render an Aframe tetrahedron with current Myr settings |
|
| public |
Render an Aframe text with current Myr settings |
|
| public |
Render an Aframe torus with current Myr settings |
|
| public |
Render an Aframe torusknot with current Myr settings |
|
| public |
Transfer the object from MYR to the Entity. |
|
| public |
Render an Aframe triangle with current Myr settings |
|
| public |
Render an Aframe tube with current Myr settings |
|
| public |
Applies a given y rotation to the cursor |
|
| public |
Apply a yoyo animation to the Aframe element which is passed as arg |
|
Public Constructors
Public Members
public ambientLight(params: object): * source
Render an Ambient light with current cursor light settings
public animate(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Animate the Aframe element which is passed as arg, its same as spin but without linear easing
public assets: *[] source
public baseEls: * source
public change(outerElId: string, type: string, newParam: *): Error: * source
Interface for setting an object's parameters in the DOM the idea is the setup an event listener as an almost DOM ready listener.
Ex. change(box(),"material","color:green;");
public colorShift(outerElId: string, color: string): * source
Apply a colorShift animation toe the Aframe element
public colourNameToHex(colour: string): string: * source
Change the html color code to the hexadecimal
public cursor: {"color": string, "texture": *, "transparency": *, "position": *, "scale": *, "rotation": *, "radius": string, "phiLength": number, "loop": boolean, "textureColoring": *, "textureRepeatWidth": number, "textureRepeatHeight": number, "duration": number, "magnitude": *, "light": *} source
public directionalLight(params: object): * source
Render a Directional light with current cursor light settings
public dodecahedron(params: object): * source
Render an Aframe dodecahedron with current Myr settings
public drop(outerElId: string): string: * source
Looks like a temporary function that just apply physics with constant mass
public els: *[] source
public fadeIn(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a fadeIn animation to the Aframe element which is passed as arg
public fadeOut(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a fadeOut animation to the Aframe element which is passed as arg
public getCursorAttribute(key: string): *: * source
Get the any values of the exisitng cursor attribute
Return:
| * | Value of the cursor attribute if it exists |
public gltfModel(src: string, params: *): * source
Load and render a custom glTF model with current Myr settings
public goAway(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a goAway animation to the Aframe element which is passed as arg
public goDown(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a goDown animation to the Aframe element which is passed as arg
public goLeft(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a goLeft animation to the Aframe element which is passed as arg
public goRight(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a goRight animation to the Aframe element which is passed as arg
public goTowards(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a goTowards animation to the Aframe element which is passed as arg
public goUp(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a goUp animation to the Aframe element which is passed as arg
public grow(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a grow animation to the Aframe element which is passed as arg
public hemisphereLight(secondColor: string, params: object): * source
Render an Hemisphere light with current cursor light settings
public increasePosition(x: number, y: number, z: number): * source
Increases the current x, y, and z position of the cursor by the given amount
public increaseXPos(x: number): * source
Increases the current x position of the cursor by the given amount
public increaseYPos(y: number): * source
Increases the current y position of the cursor by the given amount
public increaseZPos(z: number): * source
Increases the current z position of the cursor by the given amount
public mergeProps(shape: string, params: obj): * source
This creates an entity w shape of object and merges with supplied params
public pointLight(params: object): * source
Render an point light with current cursor light settings
public push: * source
Looks like temporary function similar to makePushable that apply force the pass object to x,y,z direction Not working.
public res: {"els": *, "assets": *} source
public resetTransformationCursor: * source
Reset the transformation properties of the cursor to the default
public sceneEl: * source
public setCursorAttribute(key: string, value: any): * source
Sets the existing cursor as well as creates a new custom cursor attributes to apply to entity
public setDiffusion(diffusion: number): * source
Set the diffusion(penumbra) around the edge of the light
public setLightTarget(x: number, y: number, z: number): * source
Set the position of where the lights are facing towards
public setPosition(x: number, y: number, z: number): * source
Sets the x, y, and z position of the cursor
public setRandomColor: * source
public setRotation(x: number, y: number, z: number): * source
Sets the x, y, and z rotation of the cursor
public setTexture(texture: string, w: number, h: number): * source
Sets the texture of the cursor. Defaults is empty string.
public shrink(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a shrink animation to the Aframe element which is passed as arg
public sideToSide(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a sideToSide animation to the Aframe element which is passed as arg
public sleep(ms: number): * source
It looks like a promise that sleep for certain ms and user can set further action after the time out. I don't know the original purpose but I imagine it was something like this. ex. sleep(5000).then(()=>{ console.log("box!"); box(); }); But this will not render box on the scene because it adds the box to the list after Scene is renderered
public spin(outerElId: number, magnitude: number, loop: boolean, duration: number): * source
Apply a spin animation to the Aframe element which is passed as arg
public spinX(outerElId: number, magnitude: number, loop: boolean, duration: number, spinType: string): * source
Apply a spin animation on the X axis to the Aframe element which is passed as arg
public spinY(outerElId: number, magnitude: number, loop: boolean, duration: number, spinType: string): * source
Apply a spin animation on the X axis to the Aframe element which is passed as arg
public spinZ(outerElId: number, magnitude: number, loop: boolean, duration: number, spinType: string): * source
Apply a spin animation on the Z axis to the Aframe element which is passed as arg
public syncChange(outerElId: string, type: string, newParam: *): Error: * source
Interface for setting an object's parameters in the DOM w/o the event listener dispatching the events It's not working/I don't know how this work"
public text(text: string, params: object): * source
Render an Aframe text with current Myr settings
This is a bit tricky. We need to pass text so we can decide how to render it. This throws a warning since text is not part of the entity system. Instead we pass it and then pull it off again if we see it.