Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos and spelling #5462

Merged
merged 1 commit into from
Feb 13, 2024
Merged
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
2 changes: 1 addition & 1 deletion examples/mixed-reality/watch/hand-menu-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ AFRAME.registerComponent('hand-menu-button', {
});

/*
User's hand can collide with multiple buttons simulatenously but only want one in a hovered state.
User's hand can collide with multiple buttons simultaneously but only want one in a hovered state.
This system keeps track of all the collided buttons, keeping just the closest to the hand in a hovered state.
*/
AFRAME.registerSystem('hand-menu-button', {
Expand Down
4 changes: 2 additions & 2 deletions examples/mixed-reality/watch/hand-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ AFRAME.registerComponent('hand-menu', {
},

onPinchStarted: (function () {
var auxMaxtrix = new THREE.Matrix4();
var auxMatrix = new THREE.Matrix4();
var auxQuaternion = new THREE.Quaternion();
return function (evt) {
if (!this.handHoveringEl || this.opened) { return; }
Expand All @@ -191,7 +191,7 @@ AFRAME.registerComponent('hand-menu', {
this.menuEl.emit('open');
function lookAtVector (sourcePoint, destPoint) {
return auxQuaternion.setFromRotationMatrix(
auxMaxtrix.identity()
auxMatrix.identity()
.lookAt(sourcePoint, destPoint, new THREE.Vector3(0, 1, 0)));
}

Expand Down
2 changes: 1 addition & 1 deletion examples/showcase/model-viewer/model-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ AFRAME.registerComponent('model-viewer', {
var arShadowEl = this.arShadowEl = document.createElement('a-entity');
// The title / legend displayed above the model.
var titleEl = this.titleEl = document.createElement('a-entity');
// Scene ligthing.
// Scene lighting.
var lightEl = this.lightEl = document.createElement('a-entity');
var sceneLightEl = this.sceneLightEl = document.createElement('a-entity');

Expand Down
4 changes: 2 additions & 2 deletions src/components/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ module.exports.Component = registerComponent('animation', {
value = anim.animatables[0].target.aframeProperty;

// Need to do a last value check for animation timeline since all the tweening
// begins simultaenously even if the value has not changed. Also better for perf
// anyways.
// begins simultaneously even if the value has not changed. Also better for perf
// anyway.
if (value === lastValue) { return; }
lastValue = value;

Expand Down
2 changes: 1 addition & 1 deletion src/components/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ module.exports.Component = registerComponent('cursor', {
// Clear fuseTimeout.
clearTimeout(this.fuseTimeout);

// Set intersection to another raycasted element if any.
// Set intersection to another raycast element if any.
if (ignoreRemaining === true) { return; }
intersections = this.el.components.raycaster.intersections;
if (intersections.length === 0) { return; }
Expand Down
10 changes: 5 additions & 5 deletions src/components/hand-tracking-grab-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ registerComponent('hand-tracking-grab-controls', {

grab: function () {
var grabbedEl = this.grabbedEl;
var grabedObjectWorldPosition;
var grabbedObjectWorldPosition;

grabedObjectWorldPosition = grabbedEl.object3D.getWorldPosition(this.grabbedObjectPosition);
grabbedObjectWorldPosition = grabbedEl.object3D.getWorldPosition(this.grabbedObjectPosition);

this.grabDeltaPosition.copy(grabedObjectWorldPosition).sub(this.pinchPosition);
this.grabDeltaPosition.copy(grabbedObjectWorldPosition).sub(this.pinchPosition);
this.grabInitialRotation.copy(this.auxQuaternion.copy(this.wristRotation).invert());

this.originalUpdateMatrixWorld = grabbedEl.object3D.updateMatrixWorld;
Expand Down Expand Up @@ -159,8 +159,8 @@ registerComponent('hand-tracking-grab-controls', {
// Both grabbing and grabbed entities position and rotation.

// 1. Move grabbed entity to the pinch position (middle point between index and thumb)
// 2. Apply the rotation delta (substract initial rotation) of the grabbing entity position (wrist).
// 3. Translate grabbed entity to the original position: distance betweeen grabbed and grabbing entities at collision time.
// 2. Apply the rotation delta (subtract initial rotation) of the grabbing entity position (wrist).
// 3. Translate grabbed entity to the original position: distance between grabbed and grabbing entities at collision time.
// 4. Apply grabbed entity rotation.
// 5. Preserve original scale.

Expand Down
4 changes: 2 additions & 2 deletions src/components/hp-mixed-reality-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var onButtonEvent = trackedControlsUtils.onButtonEvent;
// TODO: Add a more robust system for deriving gamepad name.
var GAMEPAD_ID = 'hp-mixed-reality';
var AFRAME_CDN_ROOT = require('../constants').AFRAME_CDN_ROOT;
var HP_MIXEDL_REALITY_MODEL_GLB_BASE_URL = AFRAME_CDN_ROOT + 'controllers/hp/mixed-reality/';
var HP_MIXED_REALITY_MODEL_GLB_BASE_URL = AFRAME_CDN_ROOT + 'controllers/hp/mixed-reality/';

var HP_MIXED_REALITY_POSITION_OFFSET = {x: 0, y: 0, z: 0.06};
var HP_MIXED_REALITY_ROTATION_OFFSET = {_x: Math.PI / 4, _y: 0, _z: 0, _order: 'XYZ'};
Expand Down Expand Up @@ -131,7 +131,7 @@ module.exports.Component = registerComponent('hp-mixed-reality-controls', {

// Load model.
if (!this.data.model) { return; }
this.el.setAttribute('gltf-model', HP_MIXEDL_REALITY_MODEL_GLB_BASE_URL + this.data.hand + '.glb');
this.el.setAttribute('gltf-model', HP_MIXED_REALITY_MODEL_GLB_BASE_URL + this.data.hand + '.glb');
},

addControllersUpdateListener: function () {
Expand Down
2 changes: 1 addition & 1 deletion src/components/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ module.exports.Component = registerComponent('layer', {
var gl = this.el.sceneEl.renderer.getContext();
var cubefaceTextures;

// dont flip the pixels as we load them into the texture buffer.
// don't flip the pixels as we load them into the texture buffer.
// TEXTURE_CUBE_MAP expects the Y to be flipped for the faces and it already
// is flipped in our texture image.
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
Expand Down
4 changes: 2 additions & 2 deletions src/components/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ module.exports.Component = registerComponent('link', {

/**
* 1. Swap plane that represents portal with sphere with a hole when the camera is close
* so user can peek inside portal. Sphere is rendered on oposite side of portal
* so user can peek inside portal. Sphere is rendered on opposite side of portal
* from where user enters.
* 2. Place the url/title above or inside portal depending on distance to camera.
* 3. Face portal to camera when far away from user.
Expand Down Expand Up @@ -228,7 +228,7 @@ module.exports.Component = registerComponent('link', {
this.semiSphereEl.setAttribute('visible', true);
this.peekCameraPortalOrientation = cameraPortalOrientation;
} else {
// Calculate wich side the camera is approaching the camera (back / front).
// Calculate which side the camera is approaching the camera (back / front).
// Adjust text orientation based on camera position.
if (cameraPortalOrientation <= 0.0) {
textEl.setAttribute('rotation', '0 180 0');
Expand Down
2 changes: 1 addition & 1 deletion src/components/look-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ module.exports.Component = registerComponent('look-controls', {
deltaY = 2 * Math.PI * (evt.touches[0].pageX - this.touchStart.x) / canvas.clientWidth;

direction = this.data.reverseTouchDrag ? 1 : -1;
// Limit touch orientaion to to yaw (y axis).
// Limit touch orientation to to yaw (y axis).
yawObject.rotation.y -= deltaY * 0.5 * direction;
this.touchStart = {
x: evt.touches[0].pageX,
Expand Down
2 changes: 1 addition & 1 deletion src/components/oculus-touch-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ module.exports.Component = registerComponent('oculus-touch-controls', {
}
}
}
// Pass along changed event with button state, using the buttom mapping for convenience.
// Pass along changed event with button state, using the button mapping for convenience.
this.el.emit(button + 'changed', evt.detail.state);
},

Expand Down
4 changes: 2 additions & 2 deletions src/components/raycaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module.exports.Component = registerComponent('raycaster', {
(data.far !== oldData.far || data.origin !== oldData.origin ||
data.direction !== oldData.direction || !oldData.showLine)) {
// Calculate unit vector for line direction. Can be multiplied via scalar and added
// to orign to adjust line length.
// to origin to adjust line length.
this.unitLineEndVec3.copy(data.direction).normalize();
this.drawLine();
}
Expand Down Expand Up @@ -400,7 +400,7 @@ module.exports.Component = registerComponent('raycaster', {
* Children are flattened by one level, removing the THREE.Group wrapper,
* so that non-recursive raycasting remains useful.
*
* Only push children defined as component attachements (e.g., setObject3D),
* Only push children defined as component attachments (e.g., setObject3D),
* NOT actual children in the scene graph hierarchy.
*
* @param {Array<Element>} els
Expand Down
6 changes: 3 additions & 3 deletions src/components/scene/ar-hit-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ module.exports.Component = register('ar-hit-test', {
this.el.emit('ar-hit-test-start');
}.bind(this));

// These are transient inputs so need to be handled seperately
// These are transient inputs so need to be handled separately
var profileToSupport = 'generic-touchscreen';
var transientHitTest = new HitTest(renderer, {
profile: profileToSupport
Expand Down Expand Up @@ -345,7 +345,7 @@ module.exports.Component = register('ar-hit-test', {
applyPose(applyPose.tempFakePose, object, this.bboxOffset);
object.visible = true;

// create an anchor attatched to the object
// create an anchor attached to the object
this.hitTest.anchorFromLastHitTestResult(object, this.bboxOffset);
}
}
Expand Down Expand Up @@ -452,7 +452,7 @@ module.exports.Component = register('ar-hit-test', {
var renderer = this.el.sceneEl.renderer;

if (frame) {
// if we are in XR then update the positions of the objects attatched to anchors
// if we are in XR then update the positions of the objects attached to anchors
HitTest.updateAnchorPoses(frame, renderer.xr.getReferenceSpace());
}
if (this.bboxNeedsUpdate) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/scene/real-world-meshing.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var THREE = require('../../lib/three');
/**
* Real World Meshing.
*
* Create entities with meshes corresponding to 3D surfaces detected in user's enviornment.
* Create entities with meshes corresponding to 3D surfaces detected in user's environment.
* It requires a browser with support for the WebXR Mesh and Plane detection modules.
*
*/
Expand Down
6 changes: 3 additions & 3 deletions src/components/scene/screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ var FRAGMENT_SHADER = [
].join('\n');

/**
* Component to take screenshots of the scene using a keboard shortcut (alt+s).
* Component to take screenshots of the scene using a keyboard shortcut (alt+s).
* It can be configured to either take 360&deg; captures (`equirectangular`)
* or regular screenshots (`projection`)
*
* This is based on https://github.com/spite/THREE.CubemapToEquirectangular
* To capture an equirectangular projection of the scene a THREE.CubeCamera is used
* The cube map produced by the CubeCamera is projected on a quad and then rendered to
* WebGLRenderTarget with an ortographic camera.
* WebGLRenderTarget with an orthographic camera.
*/
module.exports.Component = registerComponent('screenshot', {
schema: {
Expand Down Expand Up @@ -216,7 +216,7 @@ module.exports.Component = registerComponent('screenshot', {
renderer.setRenderTarget(output);
renderer.render(el.object3D, camera);
renderer.autoClear = autoClear;
// Read image pizels back.
// Read image pixels back.
renderer.readRenderTargetPixels(output, 0, 0, size.width, size.height, pixels);
renderer.setRenderTarget(null);
if (projection === 'perspective') {
Expand Down
2 changes: 1 addition & 1 deletion src/components/scene/xr-mode-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var HIDDEN_CLASS = 'a-hidden';
var ORIENTATION_MODAL_CLASS = 'a-orientation-modal';

/**
* UI for Aentering VR mode.
* UI for entering VR mode.
*/
module.exports.Component = registerComponent('xr-mode-ui', {
dependencies: ['canvas'],
Expand Down
4 changes: 2 additions & 2 deletions src/components/tracked-controls-webvr.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ module.exports.Component = registerComponent('tracked-controls-webvr', {
},

/**
* Determine whether a button press has occured and emit events as appropriate.
* Determine whether a button press has occurred and emit events as appropriate.
*
* @param {string} id - ID of the button to check.
* @param {object} buttonState - State of the button to check.
Expand All @@ -297,7 +297,7 @@ module.exports.Component = registerComponent('tracked-controls-webvr', {
},

/**
* Determine whether a button touch has occured and emit events as appropriate.
* Determine whether a button touch has occurred and emit events as appropriate.
*
* @param {string} id - ID of the button to check.
* @param {object} buttonState - State of the button to check.
Expand Down
4 changes: 2 additions & 2 deletions src/components/tracked-controls-webxr.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ module.exports.Component = registerComponent('tracked-controls-webxr', {
},

/**
* Determine whether a button press has occured and emit events as appropriate.
* Determine whether a button press has occurred and emit events as appropriate.
*
* @param {string} id - ID of the button to check.
* @param {object} buttonState - State of the button to check.
Expand All @@ -185,7 +185,7 @@ module.exports.Component = registerComponent('tracked-controls-webxr', {
},

/**
* Determine whether a button touch has occured and emit events as appropriate.
* Determine whether a button touch has occurred and emit events as appropriate.
*
* @param {string} id - ID of the button to check.
* @param {object} buttonState - State of the button to check.
Expand Down
2 changes: 1 addition & 1 deletion src/components/valve-index-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ module.exports.Component = registerComponent('valve-index-controls', {
controllerObject3D.rotation.copy(INDEX_CONTROLLER_ROTATION_OFFSET[this.data.hand]);

this.el.emit('controllermodelready', {
name: 'valve-index-controlls',
name: 'valve-index-controls',
model: this.data.model,
rayOrigin: new THREE.Vector3(0, 0, 0)
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/windows-motion-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ module.exports.Component = registerComponent('windows-motion-controls', {
},

loadModel: function (url) {
// The model is loaded by the gltf-model compoent when this attribute is initially set,
// The model is loaded by the gltf-model component when this attribute is initially set,
// removed and re-loaded if the given url changes.
this.el.setAttribute('gltf-model', 'url(' + url + ')');
},
Expand Down
6 changes: 3 additions & 3 deletions src/core/a-entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ class AEntity extends ANode {
// Initialize dependencies first
this.initComponentDependencies(componentName);

// If component name has an id we check component type multiplic
// If component name has an id we check component type multiplicity.
if (componentId && !COMPONENTS[componentName].multiple) {
throw new Error('Trying to initialize multiple ' +
'components of type `' + componentName +
Expand Down Expand Up @@ -677,7 +677,7 @@ class AEntity extends ANode {
newAttrValue[arg1] = arg2;
clobber = false;
} else {
// Update with a value, object, or CSS-style property string, with the possiblity
// Update with a value, object, or CSS-style property string, with the possibility
// of clobbering previous values.
newAttrValue = arg1;
clobber = (arg2 === true);
Expand Down Expand Up @@ -845,7 +845,7 @@ function mergeComponentData (attrValue, extraData) {
return utils.extend(extraData, utils.styleParser.parse(attrValue || {}));
}

// Return data, precendence to the defined value.
// Return data, precedence to the defined value.
return attrValue || extraData;
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Component.prototype = {
init: function () { /* no-op */ },

/**
* Map of event names to binded event handlers that will be lifecycle-handled.
* Map of event names to bound event handlers that will be lifecycle-handled.
* Will be detached on pause / remove.
* Will be attached on play.
*/
Expand Down Expand Up @@ -495,7 +495,7 @@ Component.prototype = {

if (this.isObjectBased) { utils.objectPool.clearObject(nextData); }

// 1. Gather default values (lowest precendence).
// 1. Gather default values (lowest precedence).
if (this.isSingleProperty) {
if (this.isObjectBased) {
// If object-based single-prop, then copy over the data to our pooled object.
Expand Down Expand Up @@ -532,7 +532,7 @@ Component.prototype = {
data = extendProperties(data, mixinData, this.isObjectBased);
}

// 3. Gather attribute values (highest precendence).
// 3. Gather attribute values (highest precedence).
if (componentDefined) {
if (this.isSingleProperty) {
// If object-based, copy the value to not modify the original.
Expand Down
4 changes: 2 additions & 2 deletions src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (isIOS) { require('../../utils/ios-orientationchange-blank-bug'); }
updated on every tick.
* @member {object} camera - three.js Camera object.
* @member {object} canvas
* @member {bool} isScene - Differentiates as scene entity as opposed to other entites.
* @member {bool} isScene - Differentiates as scene entity as opposed to other entities.
* @member {bool} isMobile - Whether browser is mobile (via UA detection).
* @member {object} object3D - Root three.js Scene object.
* @member {object} renderer
Expand Down Expand Up @@ -902,7 +902,7 @@ function setupCanvas (sceneEl) {
document.fullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement;
// No fullscren element === exit fullscreen
// No fullscreen element === exit fullscreen
if (!fullscreenEl) { sceneEl.exitVR(); }
document.activeElement.blur();
document.body.focus();
Expand Down
2 changes: 1 addition & 1 deletion src/core/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function stringifyProperty (value, propDefinition) {
// value when it's not an object we save one unnecessary call
// to JSON.stringify.
if (typeof value !== 'object') { return value; }
// if there's no schema for the property we use standar JSON stringify
// if there's no schema for the property we use standard JSON stringify
if (!propDefinition || value === null) { return JSON.stringify(value); }
return propDefinition.stringify(value);
}
Expand Down
2 changes: 1 addition & 1 deletion src/systems/geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function createGeometry (data) {
}

/**
* Decreate count of entity using a geometry.
* Decrease count of entity using a geometry.
*/
function decrementCacheCount (cacheCount, hash) {
cacheCount[hash]--;
Expand Down
2 changes: 1 addition & 1 deletion src/systems/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports.System = registerSystem('light', {
},

/**
* Prescibe default lights to the scene.
* Prescribe default lights to the scene.
* Does so by injecting markup such that this state is not invisible.
* These lights are removed if the user adds any lights.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/systems/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports.System = registerSystem('renderer', {
warn('Component `logarithmicDepthBuffer` is deprecated. Use `renderer="logarithmicDepthBuffer: true"` instead.');
}

// These properties are always the same, regardless of rendered oonfiguration
// These properties are always the same, regardless of rendered configuration
renderer.sortObjects = true;
renderer.setOpaqueSort(sortFrontToBack);
},
Expand Down
Loading
Loading